From 8ae3679aa1339ce9abee53adb69902bd6b7513dc Mon Sep 17 00:00:00 2001 From: George Hazan <george.hazan@gmail.com> 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 --- protocols/AimOscar/src/avatars.cpp | 8 +- protocols/AimOscar/src/chat.cpp | 2 +- protocols/AimOscar/src/connection.cpp | 22 +- protocols/AimOscar/src/conv.cpp | 2 +- protocols/AimOscar/src/file.cpp | 2 +- protocols/AimOscar/src/links.cpp | 18 +- protocols/AimOscar/src/popup.cpp | 2 +- protocols/AimOscar/src/server.cpp | 2 +- protocols/AimOscar/src/ui.cpp | 2 +- protocols/AimOscar/src/utility.cpp | 14 +- protocols/FacebookRM/src/avatars.cpp | 4 +- protocols/FacebookRM/src/chat.cpp | 4 +- protocols/FacebookRM/src/communication.cpp | 8 +- protocols/FacebookRM/src/contacts.cpp | 2 +- protocols/FacebookRM/src/dialogs.cpp | 2 +- protocols/FacebookRM/src/messages.cpp | 4 +- protocols/FacebookRM/src/process.cpp | 4 +- protocols/FacebookRM/src/proto.cpp | 26 +- protocols/GTalkExt/src/avatar.cpp | 6 +- protocols/GTalkExt/src/googletalk.h | 74 +- protocols/GTalkExt/src/handlers.cpp | 42 +- protocols/GTalkExt/src/inbox.cpp | 10 +- protocols/GTalkExt/src/notifications.cpp | 18 +- protocols/GTalkExt/src/notifications.h | 2 +- protocols/GTalkExt/src/options.cpp | 8 +- protocols/GTalkExt/src/options.h | 2 +- protocols/GTalkExt/src/tipper_items.cpp | 2 +- protocols/Gadu-Gadu/src/avatar.cpp | 30 +- protocols/Gadu-Gadu/src/core.cpp | 20 +- protocols/Gadu-Gadu/src/dialogs.cpp | 14 +- protocols/Gadu-Gadu/src/gg.cpp | 14 +- protocols/Gadu-Gadu/src/gg_proto.cpp | 10 +- protocols/Gadu-Gadu/src/groupchat.cpp | 22 +- protocols/Gadu-Gadu/src/image.cpp | 66 +- protocols/Gadu-Gadu/src/import.cpp | 38 +- protocols/Gadu-Gadu/src/oauth.cpp | 12 +- protocols/Gadu-Gadu/src/ownerinfo.cpp | 2 +- protocols/Gadu-Gadu/src/popups.cpp | 4 +- protocols/Gadu-Gadu/src/services.cpp | 8 +- protocols/Gadu-Gadu/src/sessions.cpp | 4 +- protocols/Gadu-Gadu/src/userutils.cpp | 8 +- protocols/IRCG/src/clist.cpp | 4 +- protocols/IRCG/src/commandmonitor.cpp | 348 +- protocols/IRCG/src/input.cpp | 232 +- protocols/IRCG/src/irclib.cpp | 38 +- protocols/IRCG/src/ircproto.cpp | 48 +- protocols/IRCG/src/options.cpp | 46 +- protocols/IRCG/src/output.cpp | 46 +- protocols/IRCG/src/scripting.cpp | 8 +- protocols/IRCG/src/services.cpp | 176 +- protocols/IRCG/src/stdafx.h | 10 +- protocols/IRCG/src/tools.cpp | 60 +- protocols/IRCG/src/userinfo.cpp | 4 +- protocols/IRCG/src/windows.cpp | 180 +- protocols/IcqOscarJ/src/editlist.cpp | 2 +- protocols/IcqOscarJ/src/editstring.cpp | 4 +- protocols/IcqOscarJ/src/fam_04message.cpp | 2 +- protocols/IcqOscarJ/src/icq_avatar.cpp | 10 +- protocols/IcqOscarJ/src/icq_proto.cpp | 2 +- protocols/IcqOscarJ/src/icq_xstatus.cpp | 10 +- protocols/JabberG/src/jabber.cpp | 22 +- protocols/JabberG/src/jabber_adhoc.cpp | 78 +- protocols/JabberG/src/jabber_agent.cpp | 12 +- protocols/JabberG/src/jabber_api.cpp | 2 +- protocols/JabberG/src/jabber_archive.cpp | 36 +- protocols/JabberG/src/jabber_bookmarks.cpp | 12 +- protocols/JabberG/src/jabber_byte.cpp | 78 +- protocols/JabberG/src/jabber_caps.cpp | 80 +- protocols/JabberG/src/jabber_caps.h | 174 +- protocols/JabberG/src/jabber_captcha.cpp | 38 +- protocols/JabberG/src/jabber_chat.cpp | 186 +- protocols/JabberG/src/jabber_console.cpp | 24 +- protocols/JabberG/src/jabber_disco.cpp | 260 +- protocols/JabberG/src/jabber_disco.h | 18 +- protocols/JabberG/src/jabber_events.cpp | 16 +- protocols/JabberG/src/jabber_file.cpp | 22 +- protocols/JabberG/src/jabber_filterlist.cpp | 2 +- protocols/JabberG/src/jabber_form.cpp | 106 +- protocols/JabberG/src/jabber_frame.cpp | 16 +- protocols/JabberG/src/jabber_ft.cpp | 130 +- protocols/JabberG/src/jabber_groupchat.cpp | 116 +- protocols/JabberG/src/jabber_ibb.cpp | 26 +- protocols/JabberG/src/jabber_icolib.cpp | 44 +- protocols/JabberG/src/jabber_iq.cpp | 62 +- protocols/JabberG/src/jabber_iq_handlers.cpp | 118 +- protocols/JabberG/src/jabber_iqid.cpp | 326 +- protocols/JabberG/src/jabber_iqid_muc.cpp | 44 +- protocols/JabberG/src/jabber_menu.cpp | 20 +- protocols/JabberG/src/jabber_message_handlers.cpp | 8 +- protocols/JabberG/src/jabber_message_manager.cpp | 28 +- protocols/JabberG/src/jabber_misc.cpp | 78 +- protocols/JabberG/src/jabber_notes.cpp | 38 +- protocols/JabberG/src/jabber_opt.cpp | 604 +-- protocols/JabberG/src/jabber_password.cpp | 4 +- protocols/JabberG/src/jabber_privacy.cpp | 142 +- protocols/JabberG/src/jabber_privacy.h | 2 +- protocols/JabberG/src/jabber_proto.cpp | 126 +- protocols/JabberG/src/jabber_rc.cpp | 328 +- protocols/JabberG/src/jabber_search.cpp | 78 +- protocols/JabberG/src/jabber_search.h | 2 +- protocols/JabberG/src/jabber_secur.cpp | 16 +- protocols/JabberG/src/jabber_svc.cpp | 64 +- protocols/JabberG/src/jabber_thread.cpp | 386 +- protocols/JabberG/src/jabber_userinfo.cpp | 36 +- protocols/JabberG/src/jabber_util.cpp | 94 +- protocols/JabberG/src/jabber_vcard.cpp | 92 +- protocols/JabberG/src/jabber_xml.cpp | 50 +- protocols/JabberG/src/jabber_xml.h | 4 +- protocols/JabberG/src/jabber_xstatus.cpp | 76 +- protocols/JabberG/src/jabber_xstatus.h | 2 +- protocols/MRA/src/MraAdvancedSearch.cpp | 8 +- protocols/MRA/src/MraAvatars.cpp | 4 +- protocols/MRA/src/MraChat.cpp | 8 +- protocols/MRA/src/MraConstans.h | 2 +- protocols/MRA/src/MraIcons.cpp | 6 +- protocols/MRA/src/MraPlaces.h | 4656 ++++++++++----------- protocols/MRA/src/MraProto.cpp | 8 +- protocols/MRA/src/MraRTFMsg.cpp | 4 +- protocols/MRA/src/MraSendCommand.cpp | 8 +- protocols/MRA/src/Mra_functions.cpp | 20 +- protocols/MRA/src/Mra_menus.cpp | 2 +- protocols/MRA/src/Mra_options.cpp | 4 +- protocols/MRA/src/Mra_proto.cpp | 18 +- protocols/MRA/src/Mra_svcs.cpp | 10 +- protocols/MSN/src/msn_auth.cpp | 10 +- protocols/MSN/src/msn_chat.cpp | 20 +- protocols/MSN/src/msn_commands.cpp | 4 +- protocols/MSN/src/msn_links.cpp | 10 +- protocols/MSN/src/msn_mail.cpp | 2 +- protocols/MSN/src/msn_misc.cpp | 60 +- protocols/MSN/src/msn_proto.cpp | 2 +- protocols/MSN/src/msn_skypeab.cpp | 4 +- protocols/MSN/src/msn_soapstore.cpp | 2 +- protocols/MSN/src/msn_std.cpp | 2 +- protocols/MSN/src/msn_svcs.cpp | 12 +- protocols/MinecraftDynmap/src/chat.cpp | 8 +- protocols/MinecraftDynmap/src/communication.cpp | 4 +- protocols/MinecraftDynmap/src/proto.cpp | 2 +- protocols/Omegle/src/chat.cpp | 10 +- protocols/Omegle/src/communication.cpp | 8 +- protocols/Omegle/src/proto.cpp | 2 +- protocols/Sametime/src/conference.cpp | 54 +- protocols/Sametime/src/files.cpp | 42 +- protocols/Sametime/src/messaging.cpp | 30 +- protocols/Sametime/src/options.cpp | 66 +- protocols/Sametime/src/places.cpp | 4 +- protocols/Sametime/src/sametime.cpp | 20 +- protocols/Sametime/src/sametime_proto.cpp | 46 +- protocols/Sametime/src/sametime_session.cpp | 60 +- protocols/Sametime/src/session_announce_win.cpp | 6 +- protocols/Sametime/src/userlist.cpp | 28 +- protocols/Sametime/src/utils.cpp | 12 +- protocols/SkypeWeb/src/skype_avatars.cpp | 6 +- protocols/SkypeWeb/src/skype_chatrooms.cpp | 26 +- protocols/SkypeWeb/src/skype_db.h | 4 +- protocols/SkypeWeb/src/skype_events.cpp | 20 +- protocols/SkypeWeb/src/skype_files.cpp | 2 +- protocols/SkypeWeb/src/skype_login.cpp | 8 +- protocols/SkypeWeb/src/skype_messages.cpp | 4 +- protocols/SkypeWeb/src/skype_mslogin.cpp | 2 +- protocols/SkypeWeb/src/skype_popups.cpp | 6 +- protocols/SkypeWeb/src/skype_profile.cpp | 442 +- protocols/SkypeWeb/src/skype_proto.cpp | 2 +- protocols/SkypeWeb/src/skype_utils.cpp | 14 +- protocols/Steam/src/steam_avatars.cpp | 4 +- protocols/Steam/src/steam_contacts.cpp | 16 +- protocols/Steam/src/steam_login.cpp | 10 +- protocols/Steam/src/steam_messages.cpp | 2 +- protocols/Steam/src/steam_options.cpp | 8 +- protocols/Steam/src/steam_polling.cpp | 34 +- protocols/Steam/src/steam_proto.cpp | 8 +- protocols/Tlen/src/tlen_advsearch.cpp | 2 +- protocols/Tlen/src/tlen_avatar.cpp | 4 +- protocols/Tlen/src/tlen_opt.cpp | 10 +- protocols/Tlen/src/tlen_picture.cpp | 2 +- protocols/Tlen/src/tlen_userinfo.cpp | 82 +- protocols/Tlen/src/tlen_voice.cpp | 10 +- protocols/Tox/src/tox.cpp | 2 +- protocols/Tox/src/tox_accounts.cpp | 2 +- protocols/Tox/src/tox_avatars.cpp | 8 +- protocols/Tox/src/tox_chatrooms.cpp | 2 +- protocols/Tox/src/tox_network.cpp | 2 +- protocols/Tox/src/tox_options.cpp | 36 +- protocols/Tox/src/tox_profile.cpp | 8 +- protocols/Tox/src/tox_transfer.cpp | 10 +- protocols/Twitter/src/StringUtil.cpp | 2 +- protocols/Twitter/src/chat.cpp | 6 +- protocols/Twitter/src/connection.cpp | 2 +- protocols/Twitter/src/proto.cpp | 8 +- protocols/Twitter/src/ui.cpp | 30 +- protocols/Twitter/src/utility.cpp | 2 +- protocols/VKontakte/src/misc.cpp | 274 +- protocols/VKontakte/src/vk_avatars.cpp | 8 +- protocols/VKontakte/src/vk_chats.cpp | 66 +- protocols/VKontakte/src/vk_dialogs.cpp | 2 +- protocols/VKontakte/src/vk_feed.cpp | 148 +- protocols/VKontakte/src/vk_files.cpp | 16 +- protocols/VKontakte/src/vk_history.cpp | 12 +- protocols/VKontakte/src/vk_messages.cpp | 6 +- protocols/VKontakte/src/vk_options.cpp | 20 +- protocols/VKontakte/src/vk_proto.cpp | 4 +- protocols/VKontakte/src/vk_search.cpp | 8 +- protocols/VKontakte/src/vk_status.cpp | 8 +- protocols/VKontakte/src/vk_struct.cpp | 6 +- protocols/VKontakte/src/vk_thread.cpp | 16 +- protocols/WhatsApp/src/avatars.cpp | 14 +- protocols/WhatsApp/src/chat.cpp | 8 +- protocols/WhatsApp/src/constants.h | 2 +- protocols/WhatsApp/src/contacts.cpp | 10 +- protocols/WhatsApp/src/dialogs.cpp | 8 +- protocols/WhatsApp/src/media.cpp | 4 +- protocols/WhatsApp/src/messages.cpp | 2 +- protocols/WhatsApp/src/proto.cpp | 8 +- protocols/Yahoo/src/avatar.cpp | 8 +- protocols/Yahoo/src/chat.cpp | 6 +- protocols/Yahoo/src/file_transfer.cpp | 2 +- protocols/Yahoo/src/links.cpp | 8 +- protocols/Yahoo/src/search.cpp | 8 +- protocols/Yahoo/src/yahoo.cpp | 2 +- 219 files changed, 6460 insertions(+), 6460 deletions(-) (limited to 'protocols') diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp index 4b53eaa8a4..52280c13e2 100644 --- a/protocols/AimOscar/src/avatars.cpp +++ b/protocols/AimOscar/src/avatars.cpp @@ -118,7 +118,7 @@ void CAimProto::avatar_retrieval_handler(const char* sn, const char* /*hash*/, c int CAimProto::get_avatar_filename(MCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext) { - int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName); + int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName); if (ext && _taccess(pszDest, 0)) CreateDirectoryTreeT(pszDest); @@ -127,19 +127,19 @@ int CAimProto::get_avatar_filename(MCONTACT hContact, TCHAR* pszDest, size_t cbL DBVARIANT dbv; if (getTString(hContact, AIM_KEY_AH, &dbv)) return GAIR_NOAVATAR; - tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s"), dbv.ptszVal); + tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", dbv.ptszVal); db_free(&dbv); bool found = false; if (ext == NULL) { - mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T(".*")); + mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L".*"); _tfinddata_t c_file; long hFile = _tfindfirst(pszDest, &c_file); if (hFile > -1L) { do { if (_tcsrchr(c_file.name, '.')) { - mir_sntprintf(pszDest + tPathLen2, cbLen - tPathLen2, _T("\\%s"), c_file.name); + mir_sntprintf(pszDest + tPathLen2, cbLen - tPathLen2, L"\\%s", c_file.name); found = true; } } while (_tfindnext(hFile, &c_file) == 0); diff --git a/protocols/AimOscar/src/chat.cpp b/protocols/AimOscar/src/chat.cpp index 3bf8adab9f..82508f63f0 100644 --- a/protocols/AimOscar/src/chat.cpp +++ b/protocols/AimOscar/src/chat.cpp @@ -203,7 +203,7 @@ int CAimProto::OnGCMenuHook(WPARAM, LPARAM lParam) static const struct gc_item Items[] = { { TranslateT("User &details"), 10, MENU_ITEM, FALSE }, { TranslateT("User &history"), 20, MENU_ITEM, FALSE }, - { _T(""), 100, MENU_SEPARATOR, FALSE }, + { L"", 100, MENU_SEPARATOR, FALSE }, { TranslateT("&Leave chat session"), 110, MENU_ITEM, FALSE } }; gcmi->nItems = _countof(Items); diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp index 3ac57d6e0b..a6a41bef4d 100755 --- a/protocols/AimOscar/src/connection.cpp +++ b/protocols/AimOscar/src/connection.cpp @@ -155,11 +155,11 @@ bool parse_clientlogin_response(NETLIBHTTPREQUEST *nlhr, NETLIBHTTPHEADER *my_he } ptrW buf_w(mir_utf8decodeW(nlhr->pData)); - HXML root = xmlParseString(buf_w, &datalen, _T("")); + HXML root = xmlParseString(buf_w, &datalen, L""); if (!root) return false; - HXML status = xmlGetChildByPath(root, _T("response/statusCode"), 0); + HXML status = xmlGetChildByPath(root, L"response/statusCode", 0); if (!status) return false; @@ -168,12 +168,12 @@ bool parse_clientlogin_response(NETLIBHTTPREQUEST *nlhr, NETLIBHTTPHEADER *my_he if (wcscmp(status_text, L"200")) return false; - HXML secret_node = xmlGetChildByPath(root, _T("response/data/sessionSecret"), 0); - HXML hosttime_node = xmlGetChildByPath(root, _T("response/data/hostTime"), 0); + HXML secret_node = xmlGetChildByPath(root, L"response/data/sessionSecret", 0); + HXML hosttime_node = xmlGetChildByPath(root, L"response/data/hostTime", 0); if (!secret_node || !hosttime_node) return false; - HXML token_node = xmlGetChildByPath(root, _T("response/data/token/a"), 0); + HXML token_node = xmlGetChildByPath(root, L"response/data/token/a", 0); if (!token_node) return false; @@ -218,11 +218,11 @@ bool parse_start_socar_session_response(const char *response, CMStringA &bos_hos int datalen = 0; ptrW buf_w(mir_utf8decodeW(response)); - HXML root = xmlParseString(buf_w, &datalen, _T("")); + HXML root = xmlParseString(buf_w, &datalen, L""); if (!root) return false; - HXML status = xmlGetChildByPath(root, _T("response/statusCode"), 0); + HXML status = xmlGetChildByPath(root, L"response/statusCode", 0); if (!status) return false; @@ -231,9 +231,9 @@ bool parse_start_socar_session_response(const char *response, CMStringA &bos_hos if (wcscmp(status_text, L"200")) return false; - HXML host_node = xmlGetChildByPath(root, _T("response/data/host"), 0); - HXML port_node = xmlGetChildByPath(root, _T("response/data/port"), 0); - HXML cookie_node = xmlGetChildByPath(root, _T("response/data/cookie"), 0); + HXML host_node = xmlGetChildByPath(root, L"response/data/host", 0); + HXML port_node = xmlGetChildByPath(root, L"response/data/port", 0); + HXML cookie_node = xmlGetChildByPath(root, L"response/data/cookie", 0); if (!host_node || !port_node || !cookie_node) return false; @@ -246,7 +246,7 @@ bool parse_start_socar_session_response(const char *response, CMStringA &bos_hos cookie = _T2A(cookie_w); if (encryption) { - HXML tls_node = xmlGetChildByPath(root, _T("response/data/tlsCertName"), 0); //tls is optional, so this is not fatal error + HXML tls_node = xmlGetChildByPath(root, L"response/data/tlsCertName", 0); //tls is optional, so this is not fatal error if (tls_node) { LPCTSTR certname_w = xmlGetText(tls_node); if (certname_w) diff --git a/protocols/AimOscar/src/conv.cpp b/protocols/AimOscar/src/conv.cpp index f114c52311..287aec3a84 100644 --- a/protocols/AimOscar/src/conv.cpp +++ b/protocols/AimOscar/src/conv.cpp @@ -538,7 +538,7 @@ char* rtf_to_html(HWND hwndDlg, int DlgItem) isSize = 1; else isSize = 3; - TCHAR text[3] = _T(""); + TCHAR text[3] = L""; SendDlgItemMessage(hwndDlg, DlgItem, EM_GETSELTEXT, 0, (LPARAM)&text); if (Bold != isBold) { Bold = isBold; diff --git a/protocols/AimOscar/src/file.cpp b/protocols/AimOscar/src/file.cpp index 8774998b51..9d19984558 100644 --- a/protocols/AimOscar/src/file.cpp +++ b/protocols/AimOscar/src/file.cpp @@ -324,7 +324,7 @@ int CAimProto::receiving_file(file_transfer *ft, HANDLE hServerPacketRecver, NET mir_free(buf); TCHAR fname[256]; - mir_sntprintf(fname, _T("%s%s"), ft->pfts.tszWorkingDir, name); + mir_sntprintf(fname, L"%s%s", ft->pfts.tszWorkingDir, name); mir_free(name); mir_free(ft->pfts.tszCurrentFile); ft->pfts.tszCurrentFile = mir_tstrdup(fname); diff --git a/protocols/AimOscar/src/links.cpp b/protocols/AimOscar/src/links.cpp index ea187bfbe6..25ae226baa 100644 --- a/protocols/AimOscar/src/links.cpp +++ b/protocols/AimOscar/src/links.cpp @@ -84,16 +84,16 @@ static INT_PTR ServiceParseAimLink(WPARAM, LPARAM lParam) open chatroom: aim:gochat?roomname=ROOM&exchange=NUM */ /* add a contact to the list */ - if (!_tcsnicmp(arg, _T("addbuddy?"), 9)) { + if (!_tcsnicmp(arg, L"addbuddy?", 9)) { TCHAR *tok, *tok2; char *sn = NULL, *group = NULL; for (tok = arg + 8; tok != NULL; tok = tok2) { tok2 = _tcschr(++tok, '&'); /* first token */ if (tok2) *tok2 = 0; - if (!_tcsnicmp(tok, _T("screenname="), 11) && *(tok + 11) != 0) + if (!_tcsnicmp(tok, L"screenname=", 11) && *(tok + 11) != 0) sn = mir_t2a(url_decode(tok + 11)); - if (!_tcsnicmp(tok, _T("groupname="), 10) && *(tok + 10) != 0) + if (!_tcsnicmp(tok, L"groupname=", 10) && *(tok + 10) != 0) group = mir_utf8encodeT(url_decode(tok + 10)); /* group is currently ignored */ } if (sn == NULL) { @@ -111,16 +111,16 @@ static INT_PTR ServiceParseAimLink(WPARAM, LPARAM lParam) return 0; } /* send a message to a contact */ - else if (!_tcsnicmp(arg, _T("goim?"), 5)) { + else if (!_tcsnicmp(arg, L"goim?", 5)) { TCHAR *tok, *tok2, *msg = NULL; char *sn = NULL; for (tok = arg + 4; tok != NULL; tok = tok2) { tok2 = _tcschr(++tok, '&'); /* first token */ if (tok2) *tok2 = 0; - if (!_tcsnicmp(tok, _T("screenname="), 11) && *(tok + 11) != 0) + if (!_tcsnicmp(tok, L"screenname=", 11) && *(tok + 11) != 0) sn = mir_t2a(url_decode(tok + 11)); - if (!_tcsnicmp(tok, _T("message="), 8) && *(tok + 8) != 0) + if (!_tcsnicmp(tok, L"message=", 8) && *(tok + 8) != 0) msg = url_decode(tok + 8); } if (sn == NULL) return 1; /* parse failed */ @@ -134,7 +134,7 @@ static INT_PTR ServiceParseAimLink(WPARAM, LPARAM lParam) } /* open a chatroom */ - else if (!_tcsnicmp(arg, _T("gochat?"), 7)) { + else if (!_tcsnicmp(arg, L"gochat?", 7)) { TCHAR *tok, *tok2; char *rm = NULL; int exchange = 0; @@ -142,12 +142,12 @@ static INT_PTR ServiceParseAimLink(WPARAM, LPARAM lParam) for (tok = arg + 6; tok != NULL; tok = tok2) { tok2 = _tcschr(++tok, '&'); /* first token */ if (tok2) *tok2 = 0; - if (!_tcsnicmp(tok, _T("roomname="), 9) && *(tok + 9) != 0) { + if (!_tcsnicmp(tok, L"roomname=", 9) && *(tok + 9) != 0) { rm = mir_t2a(url_decode(tok + 9)); for (char *ch = rm; *ch; ++ch) if (*ch == '+') *ch = ' '; } - if (!_tcsnicmp(tok, _T("exchange="), 9)) + if (!_tcsnicmp(tok, L"exchange=", 9)) exchange = _ttoi(tok + 9); } if (rm == NULL || exchange <= 0) { diff --git a/protocols/AimOscar/src/popup.cpp b/protocols/AimOscar/src/popup.cpp index 13d1888690..03b4fa8ba3 100644 --- a/protocols/AimOscar/src/popup.cpp +++ b/protocols/AimOscar/src/popup.cpp @@ -88,7 +88,7 @@ void CAimProto::ShowPopup(const char* msg, int flags, char* url) if (flags & MAIL_POPUP) { size_t len = mir_tstrlen(ppd.lptzText); - mir_sntprintf(&ppd.lptzText[len], _countof(ppd.lptzText) - len, _T(" %s"), TranslateT("Open mail account?")); + mir_sntprintf(&ppd.lptzText[len], _countof(ppd.lptzText) - len, L" %s", TranslateT("Open mail account?")); if (MessageBox(NULL, ppd.lptzText, ppd.lptzContactName, MB_YESNO | MB_ICONINFORMATION) == IDYES) ShellExecuteA(NULL, "open", url, NULL, NULL, SW_SHOW); } diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp index c780fb5129..fa297a5664 100644 --- a/protocols/AimOscar/src/server.cpp +++ b/protocols/AimOscar/src/server.cpp @@ -1661,7 +1661,7 @@ void CAimProto::snac_mail_response(SNAC &snac)//family 0x0018 if (new_mail && num_msgs) { TCHAR msg[1024]; - int len = mir_sntprintf(msg, _T("%S@%S (%d)\r\n%s "), sn, address, num_msgs, + int len = mir_sntprintf(msg, L"%S@%S (%d)\r\n%s ", sn, address, num_msgs, TranslateT("You've got mail! Checked at")); SYSTEMTIME stLocal; diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp index d8df3f87f6..2b906bc355 100755 --- a/protocols/AimOscar/src/ui.cpp +++ b/protocols/AimOscar/src/ui.cpp @@ -1267,7 +1267,7 @@ static void clist_chat_invite_send(MCONTACT hItem, HWND hwndList, chat_list_item int chk = SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0); if (chk) { if (IsHContactInfo(hItem)) { - TCHAR buf[128] = _T(""); + TCHAR buf[128] = L""; SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf); char *sn = mir_t2a(buf); diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp index 8212a70b42..b5e23b21aa 100755 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -533,14 +533,14 @@ int CAimProto::open_contact_file(const char*, const TCHAR* file, const char*, TC { path = (TCHAR*)mir_alloc(MAX_PATH * sizeof(TCHAR)); - int pos = mir_sntprintf(path, MAX_PATH, _T("%s\\%S"), VARST(_T("%miranda_userdata%")), m_szModuleName); + int pos = mir_sntprintf(path, MAX_PATH, L"%s\\%S", VARST(L"%miranda_userdata%"), m_szModuleName); if (contact_dir) - pos += mir_sntprintf(path + pos, MAX_PATH - pos, _T("\\%S"), m_szModuleName); + pos += mir_sntprintf(path + pos, MAX_PATH - pos, L"\\%S", m_szModuleName); if (_taccess(path, 0)) CreateDirectoryTreeT(path); - mir_sntprintf(path + pos, MAX_PATH - pos, _T("\\%s"), file); + mir_sntprintf(path + pos, MAX_PATH - pos, L"\\%s", file); int fid = _topen(path, _O_CREAT | _O_RDWR | _O_BINARY, _S_IREAD); if (fid < 0) { TCHAR errmsg[512]; @@ -553,7 +553,7 @@ int CAimProto::open_contact_file(const char*, const TCHAR* file, const char*, TC void CAimProto::write_away_message(const char* sn, const char* msg, bool utf) { TCHAR* path; - int fid = open_contact_file(sn, _T("away.html"), "wb", path, 1); + int fid = open_contact_file(sn, L"away.html", "wb", path, 1); if (fid >= 0) { if (utf) _write(fid, "\xEF\xBB\xBF", 3); char* s_msg = process_status_msg(msg, sn); @@ -562,7 +562,7 @@ void CAimProto::write_away_message(const char* sn, const char* msg, bool utf) _write(fid, "'s Away Message:</h3>", 21); _write(fid, s_msg, (unsigned)mir_strlen(s_msg)); _close(fid); - ShellExecute(NULL, _T("open"), path, NULL, NULL, SW_SHOW); + ShellExecute(NULL, L"open", path, NULL, NULL, SW_SHOW); mir_free(path); mir_free(s_msg); } @@ -571,7 +571,7 @@ void CAimProto::write_away_message(const char* sn, const char* msg, bool utf) void CAimProto::write_profile(const char* sn, const char* msg, bool utf) { TCHAR* path; - int fid = open_contact_file(sn, _T("profile.html"), "wb", path, 1); + int fid = open_contact_file(sn, L"profile.html", "wb", path, 1); if (fid >= 0) { if (utf) _write(fid, "\xEF\xBB\xBF", 3); char* s_msg = process_status_msg(msg, sn); @@ -580,7 +580,7 @@ void CAimProto::write_profile(const char* sn, const char* msg, bool utf) _write(fid, "'s Profile:</h3>", 16); _write(fid, s_msg, (unsigned)mir_strlen(s_msg)); _close(fid); - ShellExecute(NULL, _T("open"), path, NULL, NULL, SW_SHOW); + ShellExecute(NULL, L"open", path, NULL, NULL, SW_SHOW); mir_free(path); mir_free(s_msg); } diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp index e7a9849290..b85699b520 100644 --- a/protocols/FacebookRM/src/avatars.cpp +++ b/protocols/FacebookRM/src/avatars.cpp @@ -33,7 +33,7 @@ bool FacebookProto::GetDbAvatarInfo(PROTO_AVATAR_INFORMATION &pai, std::string * utils::text::replace_first(url, "%s", std::string(id)); } - std::tstring filename = GetAvatarFolder() + _T('\\') + std::tstring(_A2T(id)) + _T(".jpg"); + std::tstring filename = GetAvatarFolder() + _T('\\') + std::tstring(_A2T(id)) + L".jpg"; _tcsncpy_s(pai.filename, filename.c_str(), _TRUNCATE); pai.format = ProtoGetAvatarFormat(pai.filename); @@ -126,7 +126,7 @@ void FacebookProto::UpdateAvatarWorker(void *) std::tstring FacebookProto::GetAvatarFolder() { TCHAR path[MAX_PATH]; - mir_sntprintf(path, _T("%s\\%s"), VARST(_T("%miranda_avatarcache%")), m_tszUserName); + mir_sntprintf(path, L"%s\\%s", VARST(L"%miranda_avatarcache%"), m_tszUserName); return path; } diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 9ec90536a7..79d9874e93 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -376,7 +376,7 @@ int FacebookProto::OnGCMenuHook(WPARAM, LPARAM lParam) { { LPGENT("User &details"), 10, MENU_ITEM, FALSE }, { LPGENT("User &history"), 20, MENU_ITEM, FALSE }, - { _T(""), 100, MENU_SEPARATOR, FALSE }, + { L"", 100, MENU_SEPARATOR, FALSE }, { LPGENT("&Leave chat session"), 110, MENU_ITEM, FALSE } }; gcmi->nItems = _countof(Items); @@ -415,7 +415,7 @@ void FacebookProto::PrepareNotificationsChatRoom() { MCONTACT hNotificationsChatRoom = ChatIDToHContact(FACEBOOK_NOTIFICATIONS_CHATROOM); if (hNotificationsChatRoom == NULL || getDword(hNotificationsChatRoom, "Status", ID_STATUS_OFFLINE) != ID_STATUS_ONLINE) { TCHAR nameT[200]; - mir_sntprintf(nameT, _T("%s: %s"), m_tszUserName, TranslateT("Notifications")); + mir_sntprintf(nameT, L"%s: %s", m_tszUserName, TranslateT("Notifications")); // Create the group chat session GCSESSION gcw = { sizeof(gcw) }; diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 128613ed06..21ff44d15d 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -735,7 +735,7 @@ void facebook_client::insert_reader(MCONTACT hContact, time_t timestamp, const s // Load old readers ptrT told(parent->getTStringA(hContact, FACEBOOK_KEY_MESSAGE_READERS)); if (told) - treaders = std::tstring(told) + _T(", "); + treaders = std::tstring(told) + L", "; // Append new reader name and remember them treaders += utils::text::prepare_name(treaderName, true); @@ -932,13 +932,13 @@ bool facebook_client::login(const char *username, const char *password) // 2) Approve last unknown login if (resp.data.find("name=\"submit[This was me]\"") != std::string::npos) { CMString tszTitle; - tszTitle.AppendFormat(_T("%s - %s"), parent->m_tszUserName, TranslateT("Check last login")); + tszTitle.AppendFormat(L"%s - %s", parent->m_tszUserName, TranslateT("Check last login")); CMString tszMessage(TranslateT("Do you recognize this activity?")); std::string activity = utils::text::slashu_to_utf8(utils::text::source_get_value(&resp.data, 3, "<body", "</strong></div>", "</div>")); activity = utils::text::trim(utils::text::html_entities_decode(utils::text::remove_html(activity))); if (!activity.empty()) { - tszMessage.AppendFormat(_T("\n\n%s"), ptrT(mir_utf8decodeT(activity.c_str()))); + tszMessage.AppendFormat(L"\n\n%s", ptrT(mir_utf8decodeT(activity.c_str()))); } if (MessageBox(0, tszMessage, tszTitle, MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON1) == IDYES) { @@ -1694,7 +1694,7 @@ bool facebook_client::save_url(const std::string &url, const std::tstring &filen CreateDirectoryTreeT(dir.c_str()); // Write to file - FILE *f = _tfopen(filename.c_str(), _T("wb")); + FILE *f = _tfopen(filename.c_str(), L"wb"); if (f != NULL) { fwrite(resp->pData, 1, resp->dataLength, f); fclose(f); diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index a75d61f58c..95e4307ad0 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -371,7 +371,7 @@ void FacebookProto::LoadChatInfo(facebook_chatroom *fbc) continue; if (namesUsed > 0) - fbc->chat_name += _T(", "); + fbc->chat_name += L", "; std::tstring tname = _A2T(participant.c_str(), CP_UTF8); fbc->chat_name += utils::text::prepare_name(tname, false); diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index d12af3fd03..2f349531ff 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -202,7 +202,7 @@ INT_PTR CALLBACK FBMindProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpara SendDlgItemMessage(hwnd, IDC_URL, EM_LIMITTEXT, 1024, 0); ptrT place(data->proto->getTStringA(FACEBOOK_KEY_PLACE)); - SetDlgItemText(hwnd, IDC_PLACE, place != NULL ? place : _T("Miranda NG")); + SetDlgItemText(hwnd, IDC_PLACE, place != NULL ? place : L"Miranda NG"); bShowContacts = data->proto->getByte("PostStatusExpand", 0) > 0; ResizeHorizontal(hwnd, bShowContacts); diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index a7fdc4674f..bfb4dd24d4 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -217,11 +217,11 @@ void FacebookProto::StickerAsSmiley(std::string sticker, const std::string &url, std::string b64 = ptrA(mir_base64_encode((PBYTE)sticker.c_str(), (unsigned)sticker.length())); b64 = utils::url::encode(b64); - std::tstring filename = GetAvatarFolder() + _T("\\stickers\\"); + std::tstring filename = GetAvatarFolder() + L"\\stickers\\"; ptrT dir(mir_tstrdup(filename.c_str())); filename += (TCHAR*)_A2T(b64.c_str()); - filename += _T(".png"); + filename += L".png"; // Check if we have this sticker already and download it it not if (GetFileAttributes(filename.c_str()) == INVALID_FILE_ATTRIBUTES) { diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index c76b0c6800..80cd20e3d7 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -520,7 +520,7 @@ std::string truncateUtf8(std::string &text, size_t maxLength) { // TODO: Probably there is much simpler and nicer way std::tstring ttext = ptrT(mir_utf8decodeT(text.c_str())); if (ttext.length() > maxLength) { - ttext = ttext.substr(0, maxLength) + _T("\x2026"); // unicode ellipsis + ttext = ttext.substr(0, maxLength) + L"\x2026"; // unicode ellipsis return std::string(_T2A(ttext.c_str(), CP_UTF8)); } // It's not longer, return given string @@ -805,7 +805,7 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message> &messages, boo if (!hChatContact) { // hopefully shouldn't happen, but who knows? - debugLog(_T("!!! No hChatContact for %s"), fbc->thread_id.c_str()); + debugLog(L"!!! No hChatContact for %s", fbc->thread_id.c_str()); continue; } diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index c5dbb60c2c..7f7720f350 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -52,7 +52,7 @@ FacebookProto::FacebookProto(const char* proto_name, const TCHAR* username) : m_pagePrefix = (pagePrefix != NULL) ? _T2A(pagePrefix, CP_UTF8) : TEXT_EMOJI_PAGE; if (m_tszDefaultGroup == NULL) - m_tszDefaultGroup = mir_tstrdup(_T("Facebook")); + m_tszDefaultGroup = mir_tstrdup(L"Facebook"); CreateProtoService(PS_CREATEACCMGRUI, &FacebookProto::SvcCreateAccMgrUI); CreateProtoService(PS_GETMYAWAYMSG, &FacebookProto::GetMyAwayMsg); @@ -92,7 +92,7 @@ FacebookProto::FacebookProto(const char* proto_name, const TCHAR* username) : if (m_hNetlibUser == NULL) { TCHAR error[200]; mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName); - MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR); + MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR); } facy.set_handle(m_hNetlibUser); @@ -271,7 +271,7 @@ HANDLE FacebookProto::SearchByEmail(const TCHAR* email) HANDLE FacebookProto::SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName) { TCHAR arg[200]; - mir_sntprintf(arg, _T("%s %s %s"), nick, firstName, lastName); + mir_sntprintf(arg, L"%s %s %s", nick, firstName, lastName); return SearchByEmail(arg); // Facebook is using one search method for everything (except IDs) } @@ -886,7 +886,7 @@ void FacebookProto::OpenUrlThread(void *p) { open_url *data = static_cast<open_url*>(p); - ShellExecute(NULL, _T("open"), data->browser, data->url, NULL, SW_SHOWDEFAULT); + ShellExecute(NULL, L"open", data->browser, data->url, NULL, SW_SHOWDEFAULT); delete data; } @@ -1009,7 +1009,7 @@ void FacebookProto::InitPopups() char name[256]; // Client - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Client errors")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Client errors")); mir_snprintf(name, "%s_%s", m_szModuleName, "Client"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1020,7 +1020,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Newsfeeds - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Wall posts")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Wall posts")); mir_snprintf(name, "%s_%s", m_szModuleName, "Newsfeed"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1031,7 +1031,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Notifications - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Notifications")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Notifications")); mir_snprintf(name, "%s_%s", m_szModuleName, "Notification"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1042,7 +1042,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Others - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Other events")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Other events")); mir_snprintf(name, "%s_%s", m_szModuleName, "Other"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1053,7 +1053,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Friendship changes - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Friendship events")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Friendship events")); mir_snprintf(name, "%s_%s", m_szModuleName, "Friendship"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1064,7 +1064,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Ticker - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Real-time friends activity")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Real-time friends activity")); mir_snprintf(name, "%s_%s", m_szModuleName, "Ticker"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1075,7 +1075,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // On this day - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("\"On this day\" posts")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("\"On this day\" posts")); mir_snprintf(name, "%s_%s", m_szModuleName, "OnThisDay"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1143,7 +1143,7 @@ void FacebookProto::MessageRead(MCONTACT hContact) return; TCHAR ttime[64]; - _tcsftime(ttime, _countof(ttime), _T("%X"), localtime(&time)); + _tcsftime(ttime, _countof(ttime), L"%X", localtime(&time)); StatusTextData st = { 0 }; st.cbSize = sizeof(st); @@ -1152,7 +1152,7 @@ void FacebookProto::MessageRead(MCONTACT hContact) if (isChatRoom(hContact)) { // Load readers names ptrT treaders(getTStringA(hContact, FACEBOOK_KEY_MESSAGE_READERS)); - mir_sntprintf(st.tszText, TranslateT("Message read: %s by %s"), ttime, treaders ? treaders : _T("???")); + mir_sntprintf(st.tszText, TranslateT("Message read: %s by %s"), ttime, treaders ? treaders : L"???"); CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st); } else if (!ServiceExists(MS_MESSAGESTATE_UPDATE)){ mir_sntprintf(st.tszText, TranslateT("Message read: %s"), ttime); diff --git a/protocols/GTalkExt/src/avatar.cpp b/protocols/GTalkExt/src/avatar.cpp index bf6ec8389e..b0d6c61896 100644 --- a/protocols/GTalkExt/src/avatar.cpp +++ b/protocols/GTalkExt/src/avatar.cpp @@ -23,8 +23,8 @@ #include "resources.h" #include "options.h" -#define AVA_FILE_NAME_FORMAT _T("%s\\%s\\AvatarCache\\Jabber\\") _T(SHORT_PLUGIN_NAME) _T(".pseudoava.png") -#define AVA_RES_TYPE _T("PNG") +#define AVA_FILE_NAME_FORMAT L"%s\\%s\\AvatarCache\\Jabber\\" _T(SHORT_PLUGIN_NAME) L".pseudoava.png" +#define AVA_RES_TYPE L"PNG" #define SRMM_MODULE_NAME "SRMM" #define SRMM_AVATAR_SETTING_NAME "Avatar" @@ -154,7 +154,7 @@ void SetAvatar(MCONTACT hContact) return; if (ava) - CallService(MS_AV_SETAVATART, hContact, (LPARAM)_T("")); + CallService(MS_AV_SETAVATART, hContact, (LPARAM)L""); CallService(MS_AV_SETAVATART, hContact, (LPARAM)avaFile); db_set_ts(hContact, SRMM_MODULE_NAME, SRMM_AVATAR_SETTING_NAME, avaFile); } diff --git a/protocols/GTalkExt/src/googletalk.h b/protocols/GTalkExt/src/googletalk.h index 3c9f686bb5..7595e3de7c 100644 --- a/protocols/GTalkExt/src/googletalk.h +++ b/protocols/GTalkExt/src/googletalk.h @@ -21,50 +21,50 @@ #pragma once -#define MESSAGE_URL_FORMAT_STANDARD _T("%s/#inbox/%x%08x") -#define MESSAGE_URL_FORMAT_HTML _T("%s/h/?v=c&th=%x%08x") +#define MESSAGE_URL_FORMAT_STANDARD L"%s/#inbox/%x%08x" +#define MESSAGE_URL_FORMAT_HTML L"%s/h/?v=c&th=%x%08x" -#define JABBER_FEAT_GTALK_SHARED_STATUS _T("google:shared-status") +#define JABBER_FEAT_GTALK_SHARED_STATUS L"google:shared-status" -#define JABBER_EXT_GTALK_PMUC _T("pmuc-v1") +#define JABBER_EXT_GTALK_PMUC L"pmuc-v1" -#define NOTIFY_FEATURE_XMLNS _T("google:mail:notify") -#define SETTING_FEATURE_XMLNS _T("google:setting") -#define DISCOVERY_XMLNS _T("http://jabber.org/protocol/disco#info") +#define NOTIFY_FEATURE_XMLNS L"google:mail:notify" +#define SETTING_FEATURE_XMLNS L"google:setting" +#define DISCOVERY_XMLNS L"http://jabber.org/protocol/disco#info" -#define ATTRNAME_TYPE _T("type") -#define ATTRNAME_FROM _T("from") -#define ATTRNAME_TO _T("to") -#define ATTRNAME_URL _T("url") -#define ATTRNAME_TID _T("tid") -#define ATTRNAME_UNREAD _T("unread") -#define ATTRNAME_XMLNS _T("xmlns") -#define ATTRNAME_ID _T("id") -#define ATTRNAME_TOTAL_MATCHED _T("total-matched") -#define ATTRNAME_NAME _T("name") -#define ATTRNAME_ADDRESS _T("address") -#define ATTRNAME_RESULT_TIME _T("result-time") -#define ATTRNAME_NEWER_THAN_TIME _T("newer-than-time") -#define ATTRNAME_NEWER_THAN_TID _T("newer-than-tid") -#define ATTRNAME_VALUE _T("value") -#define ATTRNAME_VAR _T("var") +#define ATTRNAME_TYPE L"type" +#define ATTRNAME_FROM L"from" +#define ATTRNAME_TO L"to" +#define ATTRNAME_URL L"url" +#define ATTRNAME_TID L"tid" +#define ATTRNAME_UNREAD L"unread" +#define ATTRNAME_XMLNS L"xmlns" +#define ATTRNAME_ID L"id" +#define ATTRNAME_TOTAL_MATCHED L"total-matched" +#define ATTRNAME_NAME L"name" +#define ATTRNAME_ADDRESS L"address" +#define ATTRNAME_RESULT_TIME L"result-time" +#define ATTRNAME_NEWER_THAN_TIME L"newer-than-time" +#define ATTRNAME_NEWER_THAN_TID L"newer-than-tid" +#define ATTRNAME_VALUE L"value" +#define ATTRNAME_VAR L"var" -#define IQTYPE_RESULT _T("result") -#define IQTYPE_SET _T("set") -#define IQTYPE_GET _T("get") +#define IQTYPE_RESULT L"result" +#define IQTYPE_SET L"set" +#define IQTYPE_GET L"get" -#define NODENAME_MAILBOX _T("mailbox") -#define NODENAME_QUERY _T("query") -#define NODENAME_IQ _T("iq") -#define NODENAME_USERSETTING _T("usersetting") -#define NODENAME_MAILNOTIFICATIONS _T("mailnotifications") -#define NODENAME_SUBJECT _T("subject") -#define NODENAME_SNIPPET _T("snippet") -#define NODENAME_SENDERS _T("senders") -#define NODENAME_FEATURE _T("feature") -#define NODENAME_NEW_MAIL _T("new-mail") +#define NODENAME_MAILBOX L"mailbox" +#define NODENAME_QUERY L"query" +#define NODENAME_IQ L"iq" +#define NODENAME_USERSETTING L"usersetting" +#define NODENAME_MAILNOTIFICATIONS L"mailnotifications" +#define NODENAME_SUBJECT L"subject" +#define NODENAME_SNIPPET L"snippet" +#define NODENAME_SENDERS L"senders" +#define NODENAME_FEATURE L"feature" +#define NODENAME_NEW_MAIL L"new-mail" -#define SETTING_TRUE _T("true") +#define SETTING_TRUE L"true" #define RESPONSE_TIMEOUT (1000 * 60 * 60) #define TIMER_INTERVAL (1000 * 60 * 2) diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 1f5c6f02e6..1948a21dbf 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -26,8 +26,8 @@ #include "notifications.h" #include "options.h" -#define JABBER_IQID _T("mir_") -#define JABBER_IQID_FORMAT _T("mir_%d") +#define JABBER_IQID L"mir_" +#define JABBER_IQID_FORMAT L"mir_%d" LRESULT CALLBACK PopupProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam); @@ -53,7 +53,7 @@ void MakeUrlHex(LPTSTR url, LPCTSTR tid) ULARGE_INTEGER iTid; iTid.QuadPart = _tstoi64(tid); LPTSTR tidInUrl = _tcsstr(url, tid); LPTSTR trail = tidInUrl + mir_tstrlen(tid); - wsprintf(tidInUrl, _T("%x%08x"), iTid.HighPart, iTid.LowPart); //!!!!!!!!!!!! + wsprintf(tidInUrl, L"%x%08x", iTid.HighPart, iTid.LowPart); //!!!!!!!!!!!! wmemmove(tidInUrl + mir_tstrlen(tidInUrl), trail, mir_tstrlen(trail) + 1); } @@ -296,12 +296,12 @@ BOOL SendHandler(IJabberInterface *ji, HXML node, void *) ji->AddTemporaryIqHandler(DiscoverHandler, JABBER_IQ_TYPE_RESULT, _ttoi(ptszId + 4), NULL, RESPONSE_TIMEOUT, 500); } - if (!mir_tstrcmp(xmlGetName(node), _T("presence")) && xmlGetAttrValue(node, ATTRNAME_TO) == 0) { + if (!mir_tstrcmp(xmlGetName(node), L"presence") && xmlGetAttrValue(node, ATTRNAME_TO) == 0) { if (!gta->m_bGoogleSharedStatus) return FALSE; - HXML statNode = xmlGetChildByPath(node, _T("status"), 0); - HXML showNode = xmlGetChildByPath(node, _T("show"), 0); + HXML statNode = xmlGetChildByPath(node, L"status", 0); + HXML showNode = xmlGetChildByPath(node, L"show", 0); if (statNode) { LPCTSTR status = xmlGetText(showNode); LPCTSTR msg = xmlGetText(statNode); @@ -337,12 +337,12 @@ BOOL OnIqSetGoogleSharedStatus(IJabberInterface *ji, HXML iqNode, void *) int status; HXML query = xmlGetChildByPath(iqNode, NODENAME_QUERY, 0); - HXML node = xmlGetChildByPath(query, _T("invisible"), 0); - if (0 == mir_tstrcmpi(_T("true"), xmlGetAttrValue(node, _T("value")))) + HXML node = xmlGetChildByPath(query, L"invisible", 0); + if (0 == mir_tstrcmpi(L"true", xmlGetAttrValue(node, L"value"))) status = ID_STATUS_INVISIBLE; else { - LPCTSTR txt = xmlGetText(xmlGetChildByPath(query, _T("show"), 0)); - if (txt && 0 == mir_tstrcmpi(_T("dnd"), txt)) + LPCTSTR txt = xmlGetText(xmlGetChildByPath(query, L"show", 0)); + if (txt && 0 == mir_tstrcmpi(L"dnd", txt)) status = ID_STATUS_DND; else if (gta->m_pa->ppro->m_iStatus == ID_STATUS_DND || gta->m_pa->ppro->m_iStatus == ID_STATUS_INVISIBLE) status = ID_STATUS_ONLINE; @@ -363,20 +363,20 @@ void GoogleTalkAcc::SendIqGoogleSharedStatus(LPCTSTR status, LPCTSTR msg) HXML query = xmlAddChild(iq, NODENAME_QUERY, NULL); xmlAddChild(query, ATTRNAME_XMLNS, JABBER_FEAT_GTALK_SHARED_STATUS); - xmlAddAttrInt(query, _T("version"), 2); + xmlAddAttrInt(query, L"version", 2); - xmlAddChild(query, _T("status"), msg); - if (!mir_tstrcmp(status, _T("invisible"))) { - xmlAddChild(query, _T("show"), _T("default")); - xmlAddAttr(xmlAddChild(query, _T("invisible"), 0), _T("value"), _T("true")); + xmlAddChild(query, L"status", msg); + if (!mir_tstrcmp(status, L"invisible")) { + xmlAddChild(query, L"show", L"default"); + xmlAddAttr(xmlAddChild(query, L"invisible", 0), L"value", L"true"); } else { - if (!mir_tstrcmp(status, _T("dnd"))) - xmlAddChild(query, _T("show"), _T("dnd")); + if (!mir_tstrcmp(status, L"dnd")) + xmlAddChild(query, L"show", L"dnd"); else - xmlAddChild(query, _T("show"), _T("default")); + xmlAddChild(query, L"show", L"default"); - xmlAddAttr(xmlAddChild(query, _T("invisible"), 0), _T("value"), _T("false")); + xmlAddAttr(xmlAddChild(query, L"invisible", 0), L"value", L"false"); } m_bGoogleSharedStatusLock = TRUE; m_japi->SendXmlNode(iq); @@ -392,13 +392,13 @@ int OnServerDiscoInfo(WPARAM wParam, LPARAM lParam) // m_ThreadInfo->jabberServerCaps |= JABBER_CAPS_PING; JABBER_DISCO_FIELD *fld = (JABBER_DISCO_FIELD*)wParam; - if (!mir_tstrcmp(fld->category, _T("server")) && !mir_tstrcmp(fld->type, _T("im")) && !mir_tstrcmp(fld->name, _T("Google Talk"))) { + if (!mir_tstrcmp(fld->category, L"server") && !mir_tstrcmp(fld->type, L"im") && !mir_tstrcmp(fld->name, L"Google Talk")) { HXML iq = xmlCreateNode(NODENAME_IQ, NULL, FALSE); xmlAddAttr(iq, ATTRNAME_TYPE, IQTYPE_GET); HXML query = xmlAddChild(iq, NODENAME_QUERY, NULL); xmlAddChild(query, ATTRNAME_XMLNS, JABBER_FEAT_GTALK_SHARED_STATUS); - xmlAddAttrInt(query, _T("version"), 2); + xmlAddAttrInt(query, L"version", 2); gta->m_japi->SendXmlNode(iq); xmlDestroyNode(iq); } diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp index 2a7084a404..5b0ab1159e 100644 --- a/protocols/GTalkExt/src/inbox.cpp +++ b/protocols/GTalkExt/src/inbox.cpp @@ -25,8 +25,8 @@ #include "db.h" #include "options.h" -#define COMMON_GMAIL_HOST1 _T("gmail.com") -#define COMMON_GMAIL_HOST2 _T("googlemail.com") +#define COMMON_GMAIL_HOST1 L"gmail.com" +#define COMMON_GMAIL_HOST2 L"googlemail.com" #define AUTH_REQUEST_URL "https://www.google.com/accounts/ClientAuth" #define AUTH_REQUEST_PARAMS "Email=%s&Passwd=%s&accountType=HOSTED_OR_GOOGLE&skipvpage=true&PersistentCookie=false" @@ -44,7 +44,7 @@ const NETLIBHTTPHEADER HEADER_URL_ENCODED = { "Content-Type", "application/x-www #define LOGIN_PASS_SETTING_NAME "Password" -#define INBOX_URL_FORMAT _T("https://mail.google.com/%s%s/#inbox") +#define INBOX_URL_FORMAT L"https://mail.google.com/%s%s/#inbox" // 3 lines from netlib.h #define GetNetlibHandleType(h) (h?*(int*)h:NLH_INVALID) @@ -207,8 +207,8 @@ void OpenContactInbox(LPCSTR szModuleName) TCHAR buf[1024]; if (mir_tstrcmpi(host, COMMON_GMAIL_HOST1) && mir_tstrcmpi(host, COMMON_GMAIL_HOST2)) - mir_sntprintf(buf, INBOX_URL_FORMAT, _T("a/"), host); // hosted + mir_sntprintf(buf, INBOX_URL_FORMAT, L"a/", host); // hosted else - mir_sntprintf(buf, INBOX_URL_FORMAT, _T(""), _T("mail")); // common + mir_sntprintf(buf, INBOX_URL_FORMAT, L"", L"mail"); // common OpenUrl(szModuleName, tszJid, buf); } diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index b1277de614..6b167af949 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -25,11 +25,11 @@ #include "options.h" #include "inbox.h" -#define PLUGIN_DATA_PROP_NAME _T("{DB5CE833-C3AC-4851-831C-DDEBD9FA0508}") -#define EVT_DELETED_HOOK_PROP_NAME _T("{87CBD2BC-8806-413C-8FD5-1D61ABCA4AF8}") +#define PLUGIN_DATA_PROP_NAME L"{DB5CE833-C3AC-4851-831C-DDEBD9FA0508}" +#define EVT_DELETED_HOOK_PROP_NAME L"{87CBD2BC-8806-413C-8FD5-1D61ABCA4AF8}" -#define EVENT_DELETED_MSG RegisterWindowMessage(_T("{B9B00536-86A0-4BCE-B2FE-4ABD409C22AE}")) -#define MESSAGE_CLOSEPOPUP RegisterWindowMessage(_T("{7A60EA87-3E77-41DF-8A69-59B147F0C9C6}")) +#define EVENT_DELETED_MSG RegisterWindowMessage(L"{B9B00536-86A0-4BCE-B2FE-4ABD409C22AE}") +#define MESSAGE_CLOSEPOPUP RegisterWindowMessage(L"{7A60EA87-3E77-41DF-8A69-59B147F0C9C6}") #define CLIST_MODULE_NAME "CList" #define CONTACT_DISPLAY_NAME_SETTING "MyHandle" @@ -158,10 +158,10 @@ static bool DoAddPopup(POPUPDATAT *data) void FormatPseudocontactDisplayName(LPTSTR buff, LPCTSTR jid, LPCTSTR unreadCount) { - if (mir_tstrcmp(unreadCount, _T("0"))) - wsprintf(buff, _T("%s [%s]"), jid, unreadCount); //!!!!!!!!!!! + if (mir_tstrcmp(unreadCount, L"0")) + wsprintf(buff, L"%s [%s]", jid, unreadCount); //!!!!!!!!!!! else - wsprintf(buff, _T("%s"), jid); //!!!!!!!!!!! + wsprintf(buff, L"%s", jid); //!!!!!!!!!!! } MCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR displayName) @@ -270,9 +270,9 @@ void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unre break; if (p.name) - tszSenders.AppendFormat(_T(" %s <%s>\n"), p.name, p.addr); + tszSenders.AppendFormat(L" %s <%s>\n", p.name, p.addr); else - tszSenders.AppendFormat(_T(" %s\n"), p.addr); + tszSenders.AppendFormat(L" %s\n", p.addr); } if (ReadCheckbox(0, IDC_ADDSNIP, (UINT_PTR)TlsGetValue(itlsSettings))) diff --git a/protocols/GTalkExt/src/notifications.h b/protocols/GTalkExt/src/notifications.h index c9cf4684af..1675f3285b 100644 --- a/protocols/GTalkExt/src/notifications.h +++ b/protocols/GTalkExt/src/notifications.h @@ -21,7 +21,7 @@ #pragma once -#define TEMP_WINDOW_CLASS_NAME _T("AntiShittyFullscreenDetectionWindowClass") +#define TEMP_WINDOW_CLASS_NAME L"AntiShittyFullscreenDetectionWindowClass" #define SENDER_COUNT 10 diff --git a/protocols/GTalkExt/src/options.cpp b/protocols/GTalkExt/src/options.cpp index 604ef0013d..d141179cc8 100644 --- a/protocols/GTalkExt/src/options.cpp +++ b/protocols/GTalkExt/src/options.cpp @@ -23,8 +23,8 @@ #include "db.h" #include "options.h" -#define ACCOUNT_PROP_NAME _T("{BF447EBA-27AE-4DB7-893C-FC42A3F74D75}") -#define DIALOG_INITIALIZED_PROP_NAME _T("{5EE59FE5-679A-4A29-B0A1-03092E7AC20E}") +#define ACCOUNT_PROP_NAME L"{BF447EBA-27AE-4DB7-893C-FC42A3F74D75}" +#define DIALOG_INITIALIZED_PROP_NAME L"{5EE59FE5-679A-4A29-B0A1-03092E7AC20E}" #define POPUPS_OPTIONS_GROUP LPGENT("Popups") #define NETWORK_OPTIONS_GROUP LPGENT("Network") @@ -32,8 +32,8 @@ #define NOTIFY_SETTINGS_FROM_MOD_NAME SHORT_PLUGIN_NAME ".NotifySettingsFromModName" #define TEST_LETTER_SUBJECT LPGENT("Why C sucks") -#define TEST_LETTER_INBOX _T("brickstrace@gmail.com [1]") -#define TEST_LETTER_SENDER _T(" bems\n") +#define TEST_LETTER_INBOX L"brickstrace@gmail.com [1]" +#define TEST_LETTER_SENDER L" bems\n" #define TEST_LETTER_SNIP LPGENT("* Primitive type system\n* No overloading\n* Limited possibility of data abstraction, polymorphism, subtyping and code reuse\n* No metaprogramming except preprocessor macros\n* No exceptions") void CheckControlsEnabled(HWND wnd) diff --git a/protocols/GTalkExt/src/options.h b/protocols/GTalkExt/src/options.h index b26f21b277..f6de20a154 100644 --- a/protocols/GTalkExt/src/options.h +++ b/protocols/GTalkExt/src/options.h @@ -23,7 +23,7 @@ #include "resources.h" -#define JABBER_FEAT_GTALK_PMUC _T("http://www.google.com/xmpp/protocol/pmuc/v1") +#define JABBER_FEAT_GTALK_PMUC L"http://www.google.com/xmpp/protocol/pmuc/v1" #define MAIL_NOTIFICATIONS LPGENT("GMail notifications") #define FULL_NOTIFICATION_FORMAT LPGENT("subject\n %s\nfrom\n%s\n%s\n") diff --git a/protocols/GTalkExt/src/tipper_items.cpp b/protocols/GTalkExt/src/tipper_items.cpp index b4f366d743..3839aeb5d1 100644 --- a/protocols/GTalkExt/src/tipper_items.cpp +++ b/protocols/GTalkExt/src/tipper_items.cpp @@ -39,7 +39,7 @@ static LPSTR TipperItemProps[] = #define TIPPER_ITEMS_MOD_NAME "Tipper_Items" #define TIPPER_ITEM_COUNT_SETTING "DINumValues" -#define UNREAD_THREADS_RAW _T("%raw:") _T(SHORT_PLUGIN_NAME) _T("/UnreadThreads%") +#define UNREAD_THREADS_RAW L"%raw:" _T(SHORT_PLUGIN_NAME) L"/UnreadThreads%" #define UNREAD_THREADS_LABEL LPGENT("Unread threads:") void ShiftTipperSettings(LPSTR buff, int count, LPSTR format) diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index 0bb2a380fc..0ecdd36433 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -28,14 +28,14 @@ // void GGPROTO::getAvatarFilename(MCONTACT hContact, TCHAR *pszDest, int cbLen) { - int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST( _T("%miranda_avatarcache%")), m_szModuleName); + int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST( L"%miranda_avatarcache%"), m_szModuleName); if (_taccess(pszDest, 0)) { int ret = CreateDirectoryTreeT(pszDest); if (ret == 0) - debugLog(_T("getAvatarFilename(): Created new directory for avatar cache: %s."), pszDest); + debugLog(L"getAvatarFilename(): Created new directory for avatar cache: %s.", pszDest); else { - debugLog(_T("getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s"), pszDest, errno, ws_strerror(errno)); + debugLog(L"getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s", pszDest, errno, ws_strerror(errno)); TCHAR error[512]; mir_sntprintf(error, TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, ws_strerror(errno), pszDest); showpopup(m_tszUserName, error, GG_POPUP_ERROR | GG_POPUP_ALLOW_MSGBOX | GG_POPUP_ONCE); @@ -48,12 +48,12 @@ void GGPROTO::getAvatarFilename(MCONTACT hContact, TCHAR *pszDest, int cbLen) DBVARIANT dbv; if (!getString(hContact, GG_KEY_AVATARHASH, &dbv)) { TCHAR* avatarHashT = mir_a2t(dbv.pszVal); - mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s%s"), avatarHashT, avatartype); + mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s%s", avatarHashT, avatartype); mir_free(avatarHashT); db_free(&dbv); } } - else mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%S avatar%s"), m_szModuleName, avatartype); + else mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%S avatar%s", m_szModuleName, avatartype); } bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts) @@ -84,16 +84,16 @@ bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts) //if this url returned xml data (before and after 11.2013 gg convention) TCHAR *xmlAction = mir_a2t(resp->pData); - HXML hXml = xmlParseString(xmlAction, 0, _T("result")); + HXML hXml = xmlParseString(xmlAction, 0, L"result"); if (hXml != NULL) { - HXML node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar"), 0); - const TCHAR *blank = (node != NULL) ? xmlGetAttrValue(node, _T("blank")) : NULL; - if (blank != NULL && mir_tstrcmp(blank, _T("1"))) { - node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar/timestamp"), 0); + HXML node = xmlGetChildByPath(hXml, L"users/user/avatars/avatar", 0); + const TCHAR *blank = (node != NULL) ? xmlGetAttrValue(node, L"blank") : NULL; + if (blank != NULL && mir_tstrcmp(blank, L"1")) { + node = xmlGetChildByPath(hXml, L"users/user/avatars/avatar/timestamp", 0); *avatarts = node != NULL ? mir_t2a(xmlGetText(node)) : NULL; - node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar/bigavatar"), 0); //new gg convention + node = xmlGetChildByPath(hXml, L"users/user/avatars/avatar/bigavatar", 0); //new gg convention if (node == NULL){ - node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar/originBigAvatar"), 0); //old gg convention + node = xmlGetChildByPath(hXml, L"users/user/avatars/avatar/originBigAvatar", 0); //old gg convention } *avatarurl = node != NULL ? mir_t2a(xmlGetText(node)) : NULL; } @@ -267,9 +267,9 @@ void __cdecl GGPROTO::avatarrequestthread(void*) _write(file_fd, resp->pData, resp->dataLength); _close(file_fd); result = 1; - debugLog(_T("avatarrequestthread() new avatar_transfers item. Saved data to file=%s."), ai.filename); + debugLog(L"avatarrequestthread() new avatar_transfers item. Saved data to file=%s.", ai.filename); } else { - debugLog(_T("avatarrequestthread(): _topen file %s error. errno=%d: %s"), ai.filename, errno, ws_strerror(errno)); + debugLog(L"avatarrequestthread(): _topen file %s error. errno=%d: %s", ai.filename, errno, ws_strerror(errno)); TCHAR error[512]; mir_sntprintf(error, TranslateT("Cannot create avatar file. ERROR: %d: %s\n%s"), errno, ws_strerror(errno), ai.filename); showpopup(m_tszUserName, error, GG_POPUP_ERROR); @@ -361,7 +361,7 @@ void __cdecl GGPROTO::setavatarthread(void *param) TCHAR *szFilename = (TCHAR*)param; int file_fd = _topen(szFilename, _O_RDONLY | _O_BINARY, _S_IREAD); if (file_fd == -1) { - debugLog(_T("setavatarthread(): Failed to open avatar file errno=%d: %s"), errno, ws_strerror(errno)); + debugLog(L"setavatarthread(): Failed to open avatar file errno=%d: %s", errno, ws_strerror(errno)); TCHAR error[512]; mir_sntprintf(error, TranslateT("Cannot open avatar file. ERROR: %d: %s\n%s"), errno, ws_strerror(errno), szFilename); showpopup(m_tszUserName, error, GG_POPUP_ERROR); diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index d7ad598eef..2632b89d75 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -381,8 +381,8 @@ retry: p.status_descr = mir_utf8encodeT(getstatusmsg(m_iDesiredStatus)); p.status = status_m2gg(m_iDesiredStatus, p.status_descr != NULL); - debugLog(_T("mainthread() (%x): Connecting with number %d, status %d and description \"%s\"."), this, p.uin, m_iDesiredStatus, - p.status_descr ? getstatusmsg(m_iDesiredStatus) : _T("<none>")); + debugLog(L"mainthread() (%x): Connecting with number %d, status %d and description \"%s\".", this, p.uin, m_iDesiredStatus, + p.status_descr ? getstatusmsg(m_iDesiredStatus) : L"<none>"); gg_LeaveCriticalSection(&modemsg_mutex, "mainthread", 13, 1, "modemsg_mutex", 1); // Check manual hosts @@ -426,7 +426,7 @@ retry: mir_sntprintf(error, TranslateT("Connection cannot be established. errno=%d: %s"), errno, ws_strerror(errno)); perror = error; } - debugLog(_T("mainthread() (%x): %s"), this, perror); + debugLog(L"mainthread() (%x): %s", this, perror); if (getByte(GG_KEY_SHOWCERRORS, GG_KEYDEF_SHOWCERRORS)) showpopup(m_tszUserName, perror, GG_POPUP_ERROR | GG_POPUP_ALLOW_MSGBOX | GG_POPUP_ONCE); @@ -637,7 +637,7 @@ retry: _tcsncpy_s(strFmt2, pcli->pfnGetStatusModeDescription( status_gg2m(atoi(__status)), 0), _TRUNCATE); if (__city) { - mir_sntprintf(strFmt1, _T(", %s %s"), TranslateT("City:"), __city); + mir_sntprintf(strFmt1, L", %s %s", TranslateT("City:"), __city); mir_tstrncat(strFmt2, strFmt1, _countof(strFmt2) - mir_tstrlen(strFmt2)); } if (__birthyear) { @@ -646,7 +646,7 @@ retry: int br = atoi(__birthyear); if (br < (lt->tm_year + 1900) && br > 1900) { - mir_sntprintf(strFmt1, _T(", %s %d"), TranslateT("Age:"), (lt->tm_year + 1900) - br); + mir_sntprintf(strFmt1, L", %s %d", TranslateT("Age:"), (lt->tm_year + 1900) - br); mir_tstrncat(strFmt2, strFmt1, _countof(strFmt2) - mir_tstrlen(strFmt2)); } } @@ -837,7 +837,7 @@ retry: gce.ptszNick = (TCHAR*) pcli->pfnGetContactDisplayName( getcontact(e->event.msg.sender, 1, 0, NULL), 0); gce.time = (!(e->event.msg.msgclass & GG_CLASS_OFFLINE) || e->event.msg.time > (t - timeDeviation)) ? t : e->event.msg.time; gce.dwFlags = GCEF_ADDTOLOG; - debugLog(_T("mainthread() (%x): Conference message to room %s & id %s."), this, chat, id); + debugLog(L"mainthread() (%x): Conference message to room %s & id %s.", this, chat, id); CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce); mir_free(messageT); } @@ -907,7 +907,7 @@ retry: gce.time = e->event.multilogon_msg.time; gce.bIsMe = 1; gce.dwFlags = GCEF_ADDTOLOG; - debugLog(_T("mainthread() (%x): Sent conference message to room %s."), this, chat); + debugLog(L"mainthread() (%x): Sent conference message to room %s.", this, chat); CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce); mir_free(messageT); mir_free(nickT); @@ -974,7 +974,7 @@ retry: if (iIndexes && iIndexes[i]) continue; - mir_sntprintf(szMsg, _T("%s (%s)"), szText, + mir_sntprintf(szMsg, L"%s (%s)", szText, *e->event.multilogon_info.sessions[i].name != '\0' ? _A2T(e->event.multilogon_info.sessions[i].name) : TranslateT("Unknown client")); showpopup(m_tszUserName, szMsg, GG_POPUP_MULTILOGON); @@ -1538,7 +1538,7 @@ MCONTACT GGPROTO::getcontact(uin_t uin, int create, int inlist, TCHAR *szNick) MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0); if (!hContact) { - debugLog(_T("getcontact(): Failed to create Gadu-Gadu contact %s"), szNick); + debugLog(L"getcontact(): Failed to create Gadu-Gadu contact %s", szNick); return NULL; } @@ -1701,7 +1701,7 @@ void GGPROTO::changecontactstatus(uin_t uin, int status, const TCHAR *idescr, in // Check if there's description and if it's not empty if (idescr && *idescr) { - debugLog(_T("changecontactstatus(): Saving for %d status descr \"%s\"."), uin, idescr); + debugLog(L"changecontactstatus(): Saving for %d status descr \"%s\".", uin, idescr); db_set_ts(hContact, "CList", GG_KEY_STATUSDESCR, idescr); } else { // Remove status if there's nothing diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index 6fb87d7bca..f3c500cc79 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -65,7 +65,7 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule if (dbv.cVal == -100) unspecified = 1; else { ptstr = str; - mir_sntprintf(str, dbv.cVal ? _T("GMT%+d:%02d") : _T("GMT"), -dbv.cVal / 2, (dbv.cVal & 1) * 30); + mir_sntprintf(str, dbv.cVal ? L"GMT%+d:%02d" : L"GMT", -dbv.cVal / 2, (dbv.cVal & 1) * 30); } } else { unspecified = (special == SVS_ZEROISUNSPEC && dbv.bVal == 0); @@ -79,7 +79,7 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule unspecified = 1; } else { ptstr = str; - mir_sntprintf(str, _T("%S"), pstr); + mir_sntprintf(str, L"%S", pstr); } } else { @@ -97,12 +97,12 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule unspecified = 1; } else { ptstr = str; - mir_sntprintf(str, _T("%S"), pstr); + mir_sntprintf(str, L"%S", pstr); } if (dbv.dVal == 0) unspecified = 1; } else if (special == SVS_GGVERSION) { ptstr = str; - mir_sntprintf(str, _T("%S"), (char *)gg_version2string(dbv.dVal)); + mir_sntprintf(str, L"%S", (char *)gg_version2string(dbv.dVal)); } else { ptstr = _itot(special == SVS_SIGNED ? dbv.lVal : dbv.dVal, str, 10); } @@ -110,7 +110,7 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule case DBVT_ASCIIZ: unspecified = (special == SVS_ZEROISUNSPEC && dbv.pszVal[0] == '\0'); ptstr = str; - mir_sntprintf(str, _T("%S"), dbv.pszVal); + mir_sntprintf(str, L"%S", dbv.pszVal); break; case DBVT_TCHAR: unspecified = (special == SVS_ZEROISUNSPEC && dbv.ptszVal[0] == '\0'); @@ -125,7 +125,7 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule break; default: ptstr = str; - mir_tstrcpy(str, _T("???")); + mir_tstrcpy(str, L"???"); break; } } @@ -682,7 +682,7 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, // Add genders if (!dat->hContact) { - SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)_T("")); // 0 + SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)L""); // 0 SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)TranslateT("Female")); // 1 SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)TranslateT("Male")); // 2 } diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index feb65aa5d9..62b12b934b 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -65,9 +65,9 @@ TCHAR* ws_strerror(int code) TCHAR buff[128]; int len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, WSAGetLastError(), 0, buff, _countof(buff), NULL); if (len == 0) - mir_sntprintf(err_desc, _T("WinSock %u: Unknown error."), WSAGetLastError()); + mir_sntprintf(err_desc, L"WinSock %u: Unknown error.", WSAGetLastError()); else - mir_sntprintf(err_desc, _T("WinSock %d: %s"), WSAGetLastError(), buff); + mir_sntprintf(err_desc, L"WinSock %d: %s", WSAGetLastError(), buff); return err_desc; } @@ -174,20 +174,20 @@ void GGPROTO::cleanuplastplugin(DWORD version) debugLogA("cleanuplastplugin() 1: version=%d Cleaning junk avatar files from < 0.11.0.2", version); TCHAR avatarsPath[MAX_PATH]; - mir_sntprintf(avatarsPath, _T("%s\\%s"), VARST( _T("%miranda_avatarcache%")), m_tszUserName); + mir_sntprintf(avatarsPath, L"%s\\%s", VARST( L"%miranda_avatarcache%"), m_tszUserName); - debugLog(_T("cleanuplastplugin() 1: miranda_avatarcache = %s"), avatarsPath); + debugLog(L"cleanuplastplugin() 1: miranda_avatarcache = %s", avatarsPath); TCHAR spec[MAX_PATH + 10]; - mir_sntprintf(spec, _T("%s\\*.(null)"), avatarsPath); + mir_sntprintf(spec, L"%s\\*.(null)", avatarsPath); WIN32_FIND_DATA ffd; HANDLE hFind = FindFirstFile(spec, &ffd); if (hFind != INVALID_HANDLE_VALUE) { do { TCHAR filePathT [2*MAX_PATH + 10]; - mir_sntprintf(filePathT, _T("%s\\%s"), avatarsPath, ffd.cFileName); + mir_sntprintf(filePathT, L"%s\\%s", avatarsPath, ffd.cFileName); if (!_taccess(filePathT, 0)){ - debugLog(_T("cleanuplastplugin() 1: remove file = %s"), filePathT); + debugLog(L"cleanuplastplugin() 1: remove file = %s", filePathT); _tremove(filePathT); } } while (FindNextFile(hFind, &ffd) != 0); diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index b089305de3..81eb4f0bf6 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -68,7 +68,7 @@ GGPROTO::GGPROTO(const char *pszProtoName, const TCHAR *tszUserName) : db_set_resident(m_szModuleName, GG_KEY_AVATARREQUESTED); TCHAR szPath[MAX_PATH]; - mir_sntprintf(szPath, _T("%s\\%s\\ImageCache"), (TCHAR*)VARST(_T("%miranda_userdata%")), m_tszUserName); + mir_sntprintf(szPath, L"%s\\%s\\ImageCache", (TCHAR*)VARST(L"%miranda_userdata%"), m_tszUserName); hImagesFolder = FoldersRegisterCustomPathT(LPGEN("Images"), m_szModuleName, szPath, m_tszUserName); DWORD dwVersion; @@ -431,7 +431,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg) yearFrom = 0; else yearFrom = ay - yearFrom; - mir_sntprintf(text, _T("%d %d"), yearFrom, yearTo); + mir_sntprintf(text, L"%d %d", yearFrom, yearTo); T2Utf age_utf8(text); gg_pubdir50_add(req, GG_PUBDIR50_BIRTHYEAR, age_utf8); @@ -499,7 +499,7 @@ static INT_PTR CALLBACK gg_advancedsearchdlgproc(HWND hwndDlg, UINT message, WPA switch (message) { case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); - SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)_T("")); // 0 + SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)L""); // 0 SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)TranslateT("Female")); // 1 SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)TranslateT("Male")); // 2 return TRUE; @@ -597,7 +597,7 @@ void __cdecl GGPROTO::getawaymsgthread(void *arg) gg_sleep(100, FALSE, "getawaymsgthread", 106, 1); if (!db_get_s(hContact, "CList", GG_KEY_STATUSDESCR, &dbv, DBVT_TCHAR)) { ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal); - debugLog(_T("getawaymsgthread(): Reading away msg <%s>."), dbv.ptszVal); + debugLog(L"getawaymsgthread(): Reading away msg <%s>.", dbv.ptszVal); db_free(&dbv); } else { @@ -627,7 +627,7 @@ int GGPROTO::SetAwayMsg(int iStatus, const TCHAR *newMsg) int status = gg_normalizestatus(iStatus); TCHAR **msgPtr; - debugLog(_T("SetAwayMsg(): PS_SETAWAYMSG(%d, \"%s\")."), iStatus, newMsg); + debugLog(L"SetAwayMsg(): PS_SETAWAYMSG(%d, \"%s\".)", iStatus, newMsg); gg_EnterCriticalSection(&modemsg_mutex, "SetAwayMsg", 55, "modemsg_mutex", 1); // Select proper our msg ptr diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index 305e398548..5bf54545b1 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -128,7 +128,7 @@ int GGPROTO::gc_event(WPARAM, LPARAM lParam) // Window terminated (Miranda exit) if (gch->pDest->iType == SESSION_TERMINATE) { - debugLog(_T("gc_event(): Terminating chat %x, id %s from chat window..."), chat, gch->pDest->ptszID); + debugLog(L"gc_event(): Terminating chat %x, id %s from chat window...", chat, gch->pDest->ptszID); // Destroy chat entry free(chat->recipients); list_remove(&chats, chat, 1); @@ -173,7 +173,7 @@ int GGPROTO::gc_event(WPARAM, LPARAM lParam) gce.time = time(NULL); gce.bIsMe = 1; gce.dwFlags = GCEF_ADDTOLOG; - debugLog(_T("gc_event(): Sending conference message to room %s, \"%s\"."), gch->pDest->ptszID, gch->ptszText); + debugLog(L"gc_event(): Sending conference message to room %s, \"%s\".", gch->pDest->ptszID, gch->ptszText); CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce); mir_free(nickT); @@ -191,7 +191,7 @@ int GGPROTO::gc_event(WPARAM, LPARAM lParam) if ((uin = _ttoi(gch->ptszUID)) && (hContact = getcontact(uin, 1, 0, NULL))) CallService(MS_MSG_SENDMESSAGE, hContact, 0); } - debugLog(_T("gc_event(): Unhandled event %d, chat %x, uin %d, text \"%s\"."), gch->pDest->iType, chat, uin, gch->ptszText); + debugLog(L"gc_event(): Unhandled event %d, chat %x, uin %d, text \"%s\".", gch->pDest->iType, chat, uin, gch->ptszText); return 0; } @@ -246,9 +246,9 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count if (found == recipients_count) { if (chat->ignore) - debugLog(_T("gc_getchat(): Ignoring existing id %s, size %d."), chat->id, chat->recipients_count); + debugLog(L"gc_getchat(): Ignoring existing id %s, size %d.", chat->id, chat->recipients_count); else - debugLog(_T("gc_getchat(): Returning existing id %s, size %d."), chat->id, chat->recipients_count); + debugLog(L"gc_getchat(): Returning existing id %s, size %d.", chat->id, chat->recipients_count); return !(chat->ignore) ? chat->id : NULL; } } @@ -295,7 +295,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count for(; i < recipients_count; i++) chat->recipients[i] = recipients[i]; if (sender) chat->recipients[i] = sender; - debugLog(_T("gc_getchat(): Ignoring new chat %s, count %d."), chat->id, chat->recipients_count); + debugLog(L"gc_getchat(): Ignoring new chat %s, count %d.", chat->id, chat->recipients_count); list_add(&chats, chat, 0); return NULL; } @@ -330,7 +330,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count // Create new room if (CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM) &gcwindow)) { - debugLog(_T("gc_getchat(): Cannot create new chat window %s."), chat->id); + debugLog(L"gc_getchat(): Cannot create new chat window %s.", chat->id); free(name); free(chat); return NULL; @@ -364,7 +364,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count gce.bIsMe = 1; CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce); mir_free(nickT); - debugLog(_T("gc_getchat(): Myself %s: %s (%s) to the list..."), gce.ptszUID, gce.ptszNick, gce.ptszStatus); + debugLog(L"gc_getchat(): Myself %s: %s (%s) to the list...", gce.ptszUID, gce.ptszNick, gce.ptszStatus); } else debugLogA("gc_getchat(): Myself adding failed with uin %d !!!", uin); @@ -386,14 +386,14 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count gce.ptszNick = TranslateT("'Unknown'"); gce.bIsMe = 0; gce.dwFlags = 0; - debugLog(_T("gc_getchat(): Added %s: %s (%s) to the list..."), gce.ptszUID, gce.ptszNick, gce.ptszStatus); + debugLog(L"gc_getchat(): Added %s: %s (%s) to the list...", gce.ptszUID, gce.ptszNick, gce.ptszStatus); CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce); } gcd.iType = GC_EVENT_CONTROL; CallServiceSync(MS_GC_EVENT, SESSION_INITDONE, (LPARAM)&gce); CallServiceSync(MS_GC_EVENT, SESSION_ONLINE, (LPARAM)&gce); - debugLog(_T("gc_getchat(): Returning new chat window %s, count %d."), chat->id, chat->recipients_count); + debugLog(L"gc_getchat(): Returning new chat window %s, count %d.", chat->id, chat->recipients_count); list_add(&chats, chat, 0); return chat->id; } @@ -641,7 +641,7 @@ int GGPROTO::gc_changenick(MCONTACT hContact, TCHAR *ptszNick) gce.ptszUID = id; gce.ptszText = ptszNick; - debugLog(_T("gc_changenick(): Found room %s with uin %d, sending nick change %s."), chat->id, uin, id); + debugLog(L"gc_changenick(): Found room %s with uin %d, sending nick change %s.", chat->id, uin, id); CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce); break; diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 87ccaa2a54..bd6313b5b0 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -219,7 +219,7 @@ TCHAR *gg_img_getfilter(TCHAR *szFilter, int nSize) // Match relative to ImgDecoder presence szFilterName = TranslateT("Image files (*.bmp,*.gif,*.jpeg,*.jpg,*.png)"); - szFilterMask = _T("*.bmp;*.gif;*.jpeg;*.jpg;*.png"); + szFilterMask = L"*.bmp;*.gif;*.jpeg;*.jpg;*.png"; // Make up filter _tcsncpy(pFilter, szFilterName, nSize); @@ -259,16 +259,16 @@ int gg_img_saveimage(HWND hwnd, GGIMAGEENTRY *dat) ofn.Flags = OFN_PATHMUSTEXIST | OFN_NOCHANGEDIR | OFN_OVERWRITEPROMPT; if (GetSaveFileName(&ofn)) { - FILE *fp = _tfopen(szFileName, _T("w+b")); + FILE *fp = _tfopen(szFileName, L"w+b"); if (fp) { fwrite(dat->lpData, dat->nSize, 1, fp); fclose(fp); - gg->debugLog(_T("gg_img_saveimage(): Image saved to %s."), szFileName); + gg->debugLog(L"gg_img_saveimage(): Image saved to %s.", szFileName); } else { - gg->debugLog(_T("gg_img_saveimage(): Cannot save image to %s."), szFileName); + gg->debugLog(L"gg_img_saveimage(): Cannot save image to %s.", szFileName); MessageBox(hwnd, TranslateT("Image cannot be written to disk."), gg->m_tszUserName, MB_OK | MB_ICONERROR); } } @@ -495,7 +495,7 @@ static INT_PTR CALLBACK gg_img_dlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (dat->bReceiving) { TCHAR szTitle[128]; - mir_sntprintf(szTitle, _T("%s (%d / %d)"), img->lpszFileName, dat->nImg, dat->nImgTotal); + mir_sntprintf(szTitle, L"%s (%d / %d)", img->lpszFileName, dat->nImg, dat->nImgTotal); SetDlgItemText(hwndDlg, IDC_IMG_NAME, szTitle); } else @@ -747,7 +747,7 @@ int gg_img_isexists(TCHAR *szPath, GGIMAGEENTRY *dat) if (st.st_size == dat->nSize) { - FILE *fp = _tfopen(szPath, _T("rb")); + FILE *fp = _tfopen(szPath, L"rb"); if (!fp) return 0; char *lpData = (char*)mir_alloc(dat->nSize); if (fread(lpData, 1, dat->nSize, fp) == dat->nSize) @@ -779,12 +779,12 @@ TCHAR *gg_img_hasextension(TCHAR *filename) { size_t len = mir_tstrlen(imgtype); imgtype++; - if (len == 4 && (mir_tstrcmpi(imgtype, _T("bmp")) == 0 || - mir_tstrcmpi(imgtype, _T("gif")) == 0 || - mir_tstrcmpi(imgtype, _T("jpg")) == 0 || - mir_tstrcmpi(imgtype, _T("png")) == 0)) + if (len == 4 && (mir_tstrcmpi(imgtype, L"bmp") == 0 || + mir_tstrcmpi(imgtype, L"gif") == 0 || + mir_tstrcmpi(imgtype, L"jpg") == 0 || + mir_tstrcmpi(imgtype, L"png") == 0)) return --imgtype; - if (len == 5 && mir_tstrcmpi(imgtype, _T("jpeg")) == 0) + if (len == 5 && mir_tstrcmpi(imgtype, L"jpeg") == 0) return --imgtype; } } @@ -801,9 +801,9 @@ int GGPROTO::img_displayasmsg(MCONTACT hContact, void *img) size_t tPathLen; int i, res; - if (hImagesFolder == NULL || FoldersGetCustomPathT(hImagesFolder, path, MAX_PATH, _T(""))) { - TCHAR *tmpPath = Utils_ReplaceVarsT( _T("%miranda_userdata%")); - tPathLen = mir_sntprintf(szPath, _T("%s\\%s\\ImageCache"), tmpPath, m_tszUserName); + if (hImagesFolder == NULL || FoldersGetCustomPathT(hImagesFolder, path, MAX_PATH, L"")) { + TCHAR *tmpPath = Utils_ReplaceVarsT( L"%miranda_userdata%"); + tPathLen = mir_sntprintf(szPath, L"%s\\%s\\ImageCache", tmpPath, m_tszUserName); mir_free(tmpPath); } else { @@ -814,33 +814,33 @@ int GGPROTO::img_displayasmsg(MCONTACT hContact, void *img) if ( _taccess(szPath, 0)){ int ret = CreateDirectoryTreeT(szPath); if (ret == 0){ - debugLog(_T("img_displayasmsg(): Created new directory for image cache: %s."), szPath); + debugLog(L"img_displayasmsg(): Created new directory for image cache: %s.", szPath); } else { - debugLog(_T("img_displayasmsg(): Can not create directory for image cache: %s. errno=%d: %s"), szPath, errno, strerror(errno)); + debugLog(L"img_displayasmsg(): Can not create directory for image cache: %s. errno=%d: %s", szPath, errno, strerror(errno)); TCHAR error[512]; mir_sntprintf(error, TranslateT("Cannot create image cache directory. ERROR: %d: %s\n%s"), errno, _tcserror(errno), szPath); showpopup(m_tszUserName, error, GG_POPUP_ERROR | GG_POPUP_ALLOW_MSGBOX | GG_POPUP_ONCE); } } - mir_sntprintf(szPath + tPathLen, MAX_PATH - tPathLen, _T("\\%s"), dat->lpszFileName); + mir_sntprintf(szPath + tPathLen, MAX_PATH - tPathLen, L"\\%s", dat->lpszFileName); if ((pImgext = gg_img_hasextension(szPath)) == NULL) pImgext = szPath + mir_tstrlen(szPath); _tcsncpy_s(imgext, pImgext, _TRUNCATE); for (i = 1; ; ++i) { if ((res = gg_img_isexists(szPath, dat)) != -1) break; - mir_sntprintf(szPath, _T("%.*s (%u)%s"), pImgext - szPath, szPath, i, imgext); + mir_sntprintf(szPath, L"%.*s (%u)%s", pImgext - szPath, szPath, i, imgext); } if (res == 0) { // Image file not found, thus create it - FILE *fp = _tfopen(szPath, _T("w+b")); + FILE *fp = _tfopen(szPath, L"w+b"); if (fp) { res = fwrite(dat->lpData, dat->nSize, 1, fp) > 0; fclose(fp); } else { - debugLog(_T("img_displayasmsg(): Cannot open file %s for write image. errno=%d: %s"), szPath, errno, strerror(errno)); + debugLog(L"img_displayasmsg(): Cannot open file %s for write image. errno=%d: %s", szPath, errno, strerror(errno)); TCHAR error[512]; mir_sntprintf(error, TranslateT("Cannot save received image to file. ERROR: %d: %s\n%s"), errno, _tcserror(errno), szPath); showpopup(m_tszUserName, error, GG_POPUP_ERROR); @@ -850,16 +850,16 @@ int GGPROTO::img_displayasmsg(MCONTACT hContact, void *img) if (res != 0) { TCHAR image_msg[MAX_PATH + 11]; - mir_sntprintf(image_msg, _T("[img]%s[/img]"), szPath); + mir_sntprintf(image_msg, L"[img]%s[/img]", szPath); T2Utf szMessage(image_msg); PROTORECVEVENT pre = {0}; pre.timestamp = time(NULL); pre.szMessage = szMessage; ProtoChainRecvMsg(hContact, &pre); - debugLog(_T("img_displayasmsg(): Image saved to %s."), szPath); + debugLog(L"img_displayasmsg(): Image saved to %s.", szPath); } - else debugLog(_T("img_displayasmsg(): Cannot save image to %s."), szPath); + else debugLog(L"img_displayasmsg(): Cannot save image to %s.", szPath); return 0; } @@ -931,15 +931,15 @@ const TCHAR *gg_img_guessfileextension(const char *lpData) if (lpData != NULL) { if (memcmp(lpData, "BM", 2) == 0) - return _T(".bmp"); + return L".bmp"; if (memcmp(lpData, "GIF8", 4) == 0) - return _T(".gif"); + return L".gif"; if (memcmp(lpData, "\xFF\xD8", 2) == 0) - return _T(".jpg"); + return L".jpg"; if (memcmp(lpData, "\x89PNG", 4) == 0) - return _T(".png"); + return L".png"; } - return _T(""); + return L""; } //////////////////////////////////////////////////////////////////////////// @@ -958,10 +958,10 @@ void* GGPROTO::img_loadpicture(gg_event* e, TCHAR *szFileName) // Copy the file name if (szFileName) { - FILE *fp = _tfopen(szFileName, _T("rb")); + FILE *fp = _tfopen(szFileName, L"rb"); if (!fp) { free(dat); - debugLog(_T("img_loadpicture(): fopen(\"%s\", \"rb\") failed. errno=%d: %s"), szFileName, errno, strerror(errno)); + debugLog(L"img_loadpicture(): fopen(\"%s\", \"rb\" failed. errno=%d: %s)", szFileName, errno, strerror(errno)); TCHAR error[512]; mir_sntprintf(error, TranslateT("Cannot open image file. ERROR: %d: %s\n%s"), errno, _tcserror(errno), szFileName); showpopup(m_tszUserName, error, GG_POPUP_ERROR); @@ -973,7 +973,7 @@ void* GGPROTO::img_loadpicture(gg_event* e, TCHAR *szFileName) { fclose(fp); free(dat); - debugLog(_T("img_loadpicture(): Zero file size \"%s\" failed."), szFileName); + debugLog(L"img_loadpicture(): Zero file size \"%s\" failed.", szFileName); return NULL; } // Maximum acceptable image size @@ -981,7 +981,7 @@ void* GGPROTO::img_loadpicture(gg_event* e, TCHAR *szFileName) { fclose(fp); free(dat); - debugLog(_T("img_loadpicture(): Image size of \"%s\" exceeds 255 KB."), szFileName); + debugLog(L"img_loadpicture(): Image size of \"%s\" exceeds 255 KB.", szFileName); MessageBox(NULL, TranslateT("Image exceeds maximum allowed size of 255 KB."), m_tszUserName, MB_OK | MB_ICONEXCLAMATION); return NULL; } @@ -992,7 +992,7 @@ void* GGPROTO::img_loadpicture(gg_event* e, TCHAR *szFileName) free(dat->lpData); fclose(fp); free(dat); - debugLog(_T("img_loadpicture(): Reading file \"%s\" failed."), szFileName); + debugLog(L"img_loadpicture(): Reading file \"%s\" failed.", szFileName); return NULL; } fclose(fp); diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index 190270ceac..9b5a0cde73 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -280,7 +280,7 @@ INT_PTR GGPROTO::import_server(WPARAM, LPARAM) gg_LeaveCriticalSection(&sess_mutex, "import_server", 65, 1, "sess_mutex", 1); mir_sntprintf(error, TranslateT("List cannot be imported because of error:\n\t%s (Error: %d)"), ws_strerror(errno), errno); MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP); - debugLog(_T("import_server(): Cannot import list. errno:%d: %s"), errno, ws_strerror(errno)); + debugLog(L"import_server(): Cannot import list. errno:%d: %s", errno, ws_strerror(errno)); } gg_LeaveCriticalSection(&sess_mutex, "import_server", 65, 2, "sess_mutex", 1); @@ -318,7 +318,7 @@ INT_PTR GGPROTO::remove_server(WPARAM, LPARAM) gg_LeaveCriticalSection(&sess_mutex, "remove_server", 66, 1, "sess_mutex", 1); mir_sntprintf(error, TranslateT("List cannot be removed because of error: %s (Error: %d)"), ws_strerror(errno), errno); MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP); - debugLog(_T("remove_server(): Cannot remove list. errno=%d: %s"), errno, ws_strerror(errno)); + debugLog(L"remove_server(): Cannot remove list. errno=%d: %s", errno, ws_strerror(errno)); } gg_LeaveCriticalSection(&sess_mutex, "remove_server", 66, 2, "sess_mutex", 1); @@ -337,23 +337,23 @@ INT_PTR GGPROTO::import_text(WPARAM, LPARAM) OPENFILENAME ofn = {0}; ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400; _tcsncpy(filter, TranslateT("Text files"), _countof(filter)); - mir_tstrncat(filter, _T(" (*.txt)"), _countof(filter) - mir_tstrlen(filter)); + mir_tstrncat(filter, L" (*.txt)", _countof(filter) - mir_tstrlen(filter)); pfilter = filter + mir_tstrlen(filter) + 1; if (pfilter >= filter + _countof(filter)) return 0; - _tcsncpy(pfilter, _T("*.TXT"), _countof(filter) - (pfilter - filter)); + _tcsncpy(pfilter, L"*.TXT", _countof(filter) - (pfilter - filter)); pfilter = pfilter + mir_tstrlen(pfilter) + 1; if (pfilter >= filter + _countof(filter)) return 0; _tcsncpy(pfilter, TranslateT("All Files"), _countof(filter) - (pfilter - filter)); - mir_tstrncat(pfilter, _T(" (*)"), _countof(filter) - (pfilter - filter) - mir_tstrlen(pfilter)); + mir_tstrncat(pfilter, L" (*)", _countof(filter) - (pfilter - filter) - mir_tstrlen(pfilter)); pfilter = pfilter + mir_tstrlen(pfilter) + 1; if (pfilter >= filter + _countof(filter)) return 0; - _tcsncpy(pfilter, _T("*"), _countof(filter) - (pfilter - filter)); + _tcsncpy(pfilter, L"*", _countof(filter) - (pfilter - filter)); pfilter = pfilter + mir_tstrlen(pfilter) + 1; if (pfilter >= filter + _countof(filter)) return 0; @@ -366,14 +366,14 @@ INT_PTR GGPROTO::import_text(WPARAM, LPARAM) ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; ofn.nMaxFile = _countof(str); ofn.nMaxFileTitle = MAX_PATH; - ofn.lpstrDefExt = _T("txt"); + ofn.lpstrDefExt = L"txt"; #ifdef DEBUGMODE debugLogA("import_text()"); #endif if (!GetOpenFileName(&ofn)) return 0; - FILE *f = _tfopen(str, _T("r")); + FILE *f = _tfopen(str, L"r"); _tstat(str, &st); if (f && st.st_size) @@ -392,7 +392,7 @@ INT_PTR GGPROTO::import_text(WPARAM, LPARAM) TCHAR error[256]; mir_sntprintf(error, TranslateT("List cannot be imported from file \"%s\" because of error:\n\t%s (Error: %d)"), str, _tcserror(errno), errno); MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP); - debugLog(_T("import_text(): Cannot import list from file \"%s\". errno=%d: %s"), str, errno, _tcserror(errno)); + debugLog(L"import_text(): Cannot import list from file \"%s\". errno=%d: %s", str, errno, _tcserror(errno)); if (f) fclose(f); return 0; @@ -406,24 +406,24 @@ INT_PTR GGPROTO::export_text(WPARAM, LPARAM) TCHAR filter[512], *pfilter; _tcsncpy(str, TranslateT("contacts"), _countof(str)); - mir_tstrncat(str, _T(".txt"), _countof(str) - mir_tstrlen(str)); + mir_tstrncat(str, L".txt", _countof(str) - mir_tstrlen(str)); ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400; _tcsncpy(filter, TranslateT("Text files"), _countof(filter)); - mir_tstrncat(filter, _T(" (*.txt)"), _countof(filter) - mir_tstrlen(filter)); + mir_tstrncat(filter, L" (*.txt)", _countof(filter) - mir_tstrlen(filter)); pfilter = filter + mir_tstrlen(filter) + 1; if (pfilter >= filter + _countof(filter)) return 0; - _tcsncpy(pfilter, _T("*.TXT"), _countof(filter) - (pfilter - filter)); + _tcsncpy(pfilter, L"*.TXT", _countof(filter) - (pfilter - filter)); pfilter = pfilter + mir_tstrlen(pfilter) + 1; if (pfilter >= filter + _countof(filter)) return 0; _tcsncpy(pfilter, TranslateT("All Files"), _countof(filter) - (pfilter - filter)); - mir_tstrncat(pfilter, _T(" (*)"), _countof(filter) - (pfilter - filter) - mir_tstrlen(pfilter)); + mir_tstrncat(pfilter, L" (*)", _countof(filter) - (pfilter - filter) - mir_tstrlen(pfilter)); pfilter = pfilter + mir_tstrlen(pfilter) + 1; if (pfilter >= filter + _countof(filter)) return 0; - _tcsncpy(pfilter, _T("*"), _countof(filter) - (pfilter - filter)); + _tcsncpy(pfilter, L"*", _countof(filter) - (pfilter - filter)); pfilter = pfilter + mir_tstrlen(pfilter) + 1; if (pfilter >= filter + _countof(filter)) return 0; @@ -433,14 +433,14 @@ INT_PTR GGPROTO::export_text(WPARAM, LPARAM) ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY; ofn.nMaxFile = _countof(str); ofn.nMaxFileTitle = MAX_PATH; - ofn.lpstrDefExt = _T("txt"); + ofn.lpstrDefExt = L"txt"; #ifdef DEBUGMODE - debugLog(_T("export_text(%s)."), str); + debugLog(L"export_text(%s).", str); #endif if (!GetSaveFileName(&ofn)) return 0; - FILE *f = _tfopen(str, _T("w")); + FILE *f = _tfopen(str, L"w"); if (f) { char *contacts = gg_makecontacts(this, 0); fwrite(contacts, sizeof(char), mir_strlen(contacts), f); @@ -454,7 +454,7 @@ INT_PTR GGPROTO::export_text(WPARAM, LPARAM) TCHAR error[128]; mir_sntprintf(error, TranslateT("List cannot be exported to file \"%s\" because of error:\n\t%s (Error: %d)"), str, _tcserror(errno), errno); MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP); - debugLog(_T("export_text(): Cannot export list to file \"%s\". errno=%d: %s"), str, errno, _tcserror(errno)); + debugLog(L"export_text(): Cannot export list to file \"%s\". errno=%d: %s", str, errno, _tcserror(errno)); } return 0; @@ -498,7 +498,7 @@ INT_PTR GGPROTO::export_server(WPARAM, LPARAM) gg_LeaveCriticalSection(&sess_mutex, "export_server", 67, 1, "sess_mutex", 1); mir_sntprintf(error, TranslateT("List cannot be exported because of error:\n\t%s (Error: %d)"), ws_strerror(errno), errno); MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP); - debugLog(_T("export_server(): Cannot export list. errno=%d: %s"), errno, ws_strerror(errno)); + debugLog(L"export_server(): Cannot export list. errno=%d: %s", errno, ws_strerror(errno)); } gg_LeaveCriticalSection(&sess_mutex, "export_server", 67, 2, "sess_mutex", 1); diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp index be19ab681c..2bcff16f9e 100644 --- a/protocols/Gadu-Gadu/src/oauth.cpp +++ b/protocols/Gadu-Gadu/src/oauth.cpp @@ -316,12 +316,12 @@ int GGPROTO::oauth_receivetoken() nlc = resp->nlc; if (resp->resultCode == 200 && resp->dataLength > 0 && resp->pData) { TCHAR *xmlAction = mir_a2t(resp->pData); - HXML hXml = xmlParseString(xmlAction, 0, _T("result")); + HXML hXml = xmlParseString(xmlAction, 0, L"result"); if (hXml != NULL) { - HXML node = xmlGetChildByPath(hXml, _T("oauth_token"), 0); + HXML node = xmlGetChildByPath(hXml, L"oauth_token", 0); token = node != NULL ? mir_t2a(xmlGetText(node)) : NULL; - node = xmlGetChildByPath(hXml, _T("oauth_token_secret"), 0); + node = xmlGetChildByPath(hXml, L"oauth_token_secret", 0); token_secret = node != NULL ? mir_t2a(xmlGetText(node)) : NULL; xmlDestroyNode(hXml); @@ -385,12 +385,12 @@ int GGPROTO::oauth_receivetoken() if (resp) { if (resp->resultCode == 200 && resp->dataLength > 0 && resp->pData) { TCHAR *xmlAction = mir_a2t(resp->pData); - HXML hXml = xmlParseString(xmlAction, 0, _T("result")); + HXML hXml = xmlParseString(xmlAction, 0, L"result"); if (hXml != NULL) { - HXML node = xmlGetChildByPath(hXml, _T("oauth_token"), 0); + HXML node = xmlGetChildByPath(hXml, L"oauth_token", 0); token = mir_t2a(xmlGetText(node)); - node = xmlGetChildByPath(hXml, _T("oauth_token_secret"), 0); + node = xmlGetChildByPath(hXml, L"oauth_token_secret", 0); token_secret = mir_t2a(xmlGetText(node)); xmlDestroyNode(hXml); diff --git a/protocols/Gadu-Gadu/src/ownerinfo.cpp b/protocols/Gadu-Gadu/src/ownerinfo.cpp index b51fd7caba..125c0da27d 100644 --- a/protocols/Gadu-Gadu/src/ownerinfo.cpp +++ b/protocols/Gadu-Gadu/src/ownerinfo.cpp @@ -59,7 +59,7 @@ void __cdecl GGPROTO::remindpasswordthread(void *param) TCHAR error[128]; mir_sntprintf(error, TranslateT("Password could not be reminded because of error:\n\t%s (Error: %d)"), ws_strerror(errno), errno); MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP); - debugLog(_T("remindpasswordthread(): Password could not be reminded. errno=%d: %s"), errno, ws_strerror(errno)); + debugLog(L"remindpasswordthread(): Password could not be reminded. errno=%d: %s", errno, ws_strerror(errno)); } else { diff --git a/protocols/Gadu-Gadu/src/popups.cpp b/protocols/Gadu-Gadu/src/popups.cpp index 451b3aac5d..e8ca28f164 100644 --- a/protocols/Gadu-Gadu/src/popups.cpp +++ b/protocols/Gadu-Gadu/src/popups.cpp @@ -87,7 +87,7 @@ void GGPROTO::initpopups() puc.hIcon = CopyIcon(LoadIconEx("main", FALSE)); ReleaseIconEx("main", FALSE); puc.iSeconds = 4; - mir_sntprintf(szDescr, _T("%s/%s"), m_tszUserName, TranslateT("Notify")); + mir_sntprintf(szDescr, L"%s/%s", m_tszUserName, TranslateT("Notify")); mir_snprintf(szName, "%s_%s", m_szModuleName, "Notify"); hPopupNotify = Popup_RegisterClass(&puc); @@ -95,7 +95,7 @@ void GGPROTO::initpopups() puc.colorText = RGB(255, 245, 225); // Yellow puc.iSeconds = 60; puc.hIcon = (HICON)LoadImage(NULL, IDI_WARNING, IMAGE_ICON, 0, 0, LR_SHARED); - mir_sntprintf(szDescr, _T("%s/%s"), m_tszUserName, TranslateT("Error")); + mir_sntprintf(szDescr, L"%s/%s", m_tszUserName, TranslateT("Error")); mir_snprintf(szName, "%s_%s", m_szModuleName, "Error"); hPopupError = Popup_RegisterClass(&puc); } diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index 2dae64d0ff..d5c5c99217 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -235,12 +235,12 @@ INT_PTR GGPROTO::getavatarinfo(WPARAM wParam, LPARAM lParam) } requestAvatarTransfer(pai->hContact, AvatarURL); - debugLog(_T("getavatarinfo(): Incoming request for avatar information. uin=%d. Avatar hash unchanged but file %s does not exist. errno=%d: %s. requestAvatarTransfer() fired. return GAIR_WAITFOR"), uin, pai->filename, errno, ws_strerror(errno)); + debugLog(L"getavatarinfo(): Incoming request for avatar information. uin=%d. Avatar hash unchanged but file %s does not exist. errno=%d: %s. requestAvatarTransfer() fired. return GAIR_WAITFOR", uin, pai->filename, errno, ws_strerror(errno)); return GAIR_WAITFOR; } if ((wParam & GAIF_FORCE) != 0) { if (_tremove(pai->filename) != 0){ - debugLog(_T("getavatarinfo(): refresh. _tremove 1 file %s error. errno=%d: %s"), pai->filename, errno, _tcserror(errno)); + debugLog(L"getavatarinfo(): refresh. _tremove 1 file %s error. errno=%d: %s", pai->filename, errno, _tcserror(errno)); TCHAR error[512]; mir_sntprintf(error, TranslateT("Cannot remove old avatar file before refresh. ERROR: %d: %s\n%s"), errno, _tcserror(errno), pai->filename); showpopup(m_tszUserName, error, GG_POPUP_ERROR); @@ -255,7 +255,7 @@ INT_PTR GGPROTO::getavatarinfo(WPARAM wParam, LPARAM lParam) if (AvatarHash == NULL && AvatarSavedHash != NULL) { getAvatarFilename(pai->hContact, pai->filename, _countof(pai->filename)); if (_tremove(pai->filename) != 0){ - debugLog(_T("getavatarinfo(): delete. _tremove file %s error. errno=%d: %s"), pai->filename, errno, _tcserror(errno)); + debugLog(L"getavatarinfo(): delete. _tremove file %s error. errno=%d: %s", pai->filename, errno, _tcserror(errno)); TCHAR error[512]; mir_sntprintf(error, TranslateT("Cannot remove old avatar file. ERROR: %d: %s\n%s"), errno, _tcserror(errno), pai->filename); showpopup(m_tszUserName, error, GG_POPUP_ERROR); @@ -302,7 +302,7 @@ INT_PTR GGPROTO::getmyavatar(WPARAM wParam, LPARAM lParam) debugLogA("getmyavatar(): Incoming request for self avatar information. returned ok."); return 0; } else { - debugLog(_T("getmyavatar(): Incoming request for self avatar information. saved avatar file %s does not exist. return -1 (error)"), szFilename); + debugLog(L"getmyavatar(): Incoming request for self avatar information. saved avatar file %s does not exist. return -1 (error)", szFilename); return -1; } diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index ba881c9d3a..bd68343587 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -330,7 +330,7 @@ static INT_PTR CALLBACK gg_sessions_viewdlg(HWND hwndDlg, UINT message, WPARAM w ListView_GetItemText(hList, lvhti.iItem, 0, szClientName, _countof(szClientName)); ListView_GetItemText(hList, lvhti.iItem, 1, szIP, _countof(szIP)); ListView_GetItemText(hList, lvhti.iItem, 2, szLoginTime, _countof(szLoginTime)); - mir_sntprintf(szText, _T("%s\t%s\t%s"), szClientName, szIP, szLoginTime); + mir_sntprintf(szText, L"%s\t%s\t%s", szClientName, szIP, szLoginTime); if ((hData = GlobalAlloc(GMEM_MOVEABLE, mir_tstrlen(szText) + 1)) != NULL) { mir_tstrcpy((TCHAR*)GlobalLock(hData), szText); @@ -346,7 +346,7 @@ static INT_PTR CALLBACK gg_sessions_viewdlg(HWND hwndDlg, UINT message, WPARAM w TCHAR szUrl[256], szIP[64]; szIP[0] = 0; ListView_GetItemText(hList, lvhti.iItem, 1, szIP, _countof(szIP)); - mir_sntprintf(szUrl, _T("http://whois.domaintools.com/%s"), szIP); + mir_sntprintf(szUrl, L"http://whois.domaintools.com/%s", szIP); Utils_OpenUrlT(szUrl); break; } diff --git a/protocols/Gadu-Gadu/src/userutils.cpp b/protocols/Gadu-Gadu/src/userutils.cpp index 03bb478ac5..4f40b99e37 100644 --- a/protocols/Gadu-Gadu/src/userutils.cpp +++ b/protocols/Gadu-Gadu/src/userutils.cpp @@ -44,7 +44,7 @@ void *gg_doregister(GGPROTO *gg, char *newPass, char *newEmail) (h && !s) ? http_error_string(h->error) : (s ? TranslateT("Registration rejected") : ws_strerror(errno))); MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP); - gg->debugLog(_T("gg_doregister(): Cannot register. errno=%d: %s"), errno, ws_strerror(errno)); + gg->debugLog(L"gg_doregister(): Cannot register. errno=%d: %s", errno, ws_strerror(errno)); } else { gg->setDword(GG_KEY_UIN, s->uin); @@ -90,7 +90,7 @@ void *gg_dounregister(GGPROTO *gg, uin_t uin, char *password) (h && !s) ? http_error_string(h->error) : (s ? TranslateT("Bad number or password") : ws_strerror(errno))); MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP); - gg->debugLog(_T("gg_dounregister(): Cannot remove account. errno=%d: %s"), errno, ws_strerror(errno)); + gg->debugLog(L"gg_dounregister(): Cannot remove account. errno=%d: %s", errno, ws_strerror(errno)); } else { @@ -142,7 +142,7 @@ void *gg_dochpass(GGPROTO *gg, uin_t uin, char *password, char *newPass) (h && !s) ? http_error_string(h->error) : (s ? TranslateT("Invalid data entered") : ws_strerror(errno))); MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP); - gg->debugLog(_T("gg_dochpass(): Cannot change password. errno=%d: %s"), errno, ws_strerror(errno)); + gg->debugLog(L"gg_dochpass(): Cannot change password. errno=%d: %s", errno, ws_strerror(errno)); } else { @@ -183,7 +183,7 @@ void *gg_dochemail(GGPROTO *gg, uin_t uin, char *password, char *email, char *ne mir_sntprintf(error, TranslateT("Your e-mail cannot be changed because of error:\n\t%s"), (h && !s) ? http_error_string(h->error) : (s ? TranslateT("Bad old e-mail or password") : ws_strerror(errno))); MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP); - gg->debugLog(_T("gg_dochemail(): Cannot change e-mail. errno=%d: %s"), errno, ws_strerror(errno)); + gg->debugLog(L"gg_dochemail(): Cannot change e-mail. errno=%d: %s", errno, ws_strerror(errno)); } else { diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index 22be4d9471..6a15e93456 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -59,7 +59,7 @@ BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask, AddDCCSession(hContact, dcc); dcc->Connect(); if (getByte("MirVerAutoRequest", 1)) - PostIrcMessage(_T("/PRIVMSG %s \001VERSION\001"), name.c_str()); + PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", name.c_str()); } else { CLISTEVENT cle = {}; @@ -110,7 +110,7 @@ MCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline) setTString(hContact, "Default", user->name); setWord(hContact, "Status", SetOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE); if (!InList && getByte("MirVerAutoRequestTemp", 0)) - PostIrcMessage(_T("/PRIVMSG %s \001VERSION\001"), user->name); + PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", user->name); return hContact; } return false; diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index fb7e734547..f72796fde8 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -52,10 +52,10 @@ VOID CALLBACK TimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) return; if (ppro->m_forceVisible) - ppro->PostIrcMessage(_T("/MODE %s -i"), ppro->m_info.sNick.c_str()); + ppro->PostIrcMessage(L"/MODE %s -i", ppro->m_info.sNick.c_str()); if (mir_strlen(ppro->m_myHost) == 0 && ppro->IsConnected()) - ppro->DoUserhostWithReason(2, (_T("S") + ppro->m_info.sNick).c_str(), true, _T("%s"), ppro->m_info.sNick.c_str()); + ppro->DoUserhostWithReason(2, (L"S" + ppro->m_info.sNick).c_str(), true, L"%s", ppro->m_info.sNick.c_str()); } VOID CALLBACK KeepAliveTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) @@ -71,9 +71,9 @@ VOID CALLBACK KeepAliveTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) TCHAR temp2[270]; if (!ppro->m_info.sServerName.IsEmpty()) - mir_sntprintf(temp2, _T("PING %s"), ppro->m_info.sServerName.c_str()); + mir_sntprintf(temp2, L"PING %s", ppro->m_info.sServerName.c_str()); else - mir_sntprintf(temp2, _T("PING %u"), time(0)); + mir_sntprintf(temp2, L"PING %u", time(0)); if (ppro->IsConnected()) ppro->SendIrcMessage(temp2, false); @@ -89,13 +89,13 @@ VOID CALLBACK OnlineNotifTimerProc3(HWND, UINT, UINT_PTR idEvent, DWORD) ppro->m_iStatus == ID_STATUS_OFFLINE || ppro->m_iStatus == ID_STATUS_CONNECTING || (!ppro->m_autoOnlineNotification && !ppro->bTempForceCheck) || ppro->bTempDisableCheck) { ppro->KillChatTimer(ppro->OnlineNotifTimer3); - ppro->m_channelsToWho = _T(""); + ppro->m_channelsToWho = L""; return; } CMString name = GetWord(ppro->m_channelsToWho.c_str(), 0); if (name.IsEmpty()) { - ppro->m_channelsToWho = _T(""); + ppro->m_channelsToWho = L""; int count = (int)CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)ppro->m_szModuleName); for (int i = 0; i < count; i++) { GC_INFO gci = { 0 }; @@ -104,7 +104,7 @@ VOID CALLBACK OnlineNotifTimerProc3(HWND, UINT, UINT_PTR idEvent, DWORD) gci.pszModule = ppro->m_szModuleName; if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.iType == GCW_CHATROOM) if (gci.iCount <= ppro->m_onlineNotificationLimit) - ppro->m_channelsToWho += CMString(gci.pszName) + _T(" "); + ppro->m_channelsToWho += CMString(gci.pszName) + L" "; } } @@ -114,7 +114,7 @@ VOID CALLBACK OnlineNotifTimerProc3(HWND, UINT, UINT_PTR idEvent, DWORD) } name = GetWord(ppro->m_channelsToWho.c_str(), 0); - ppro->DoUserhostWithReason(2, _T("S") + name, true, _T("%s"), name.c_str()); + ppro->DoUserhostWithReason(2, L"S" + name, true, L"%s", name.c_str()); CMString temp = GetWordAddress(ppro->m_channelsToWho.c_str(), 1); ppro->m_channelsToWho = temp; if (ppro->m_iTempCheckTime) @@ -132,7 +132,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) if (ppro->m_iStatus == ID_STATUS_OFFLINE || ppro->m_iStatus == ID_STATUS_CONNECTING || (!ppro->m_autoOnlineNotification && !ppro->bTempForceCheck) || ppro->bTempDisableCheck) { ppro->KillChatTimer(ppro->OnlineNotifTimer); - ppro->m_namesToWho = _T(""); + ppro->m_namesToWho = L""; return; } @@ -156,7 +156,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) if (!bAdvanced) { db_free(&dbv); if (!ppro->getTString(hContact, "Nick", &dbv)) { - ppro->m_namesToUserhost += CMString(dbv.ptszVal) + _T(" "); + ppro->m_namesToUserhost += CMString(dbv.ptszVal) + L" "; db_free(&dbv); } } @@ -172,9 +172,9 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) DBWildcard = dbv2.ptszVal; if (DBNick && (!DBWildcard || !WCCmp(CharLower(DBWildcard), CharLower(DBNick)))) - ppro->m_namesToWho += CMString(DBNick) + _T(" "); + ppro->m_namesToWho += CMString(DBNick) + L" "; else if (DBWildcard) - ppro->m_namesToWho += CMString(DBWildcard) + _T(" "); + ppro->m_namesToWho += CMString(DBWildcard) + L" "; if (DBNick) db_free(&dbv); if (DBWildcard) db_free(&dbv2); @@ -191,7 +191,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) name2 = GetWord(ppro->m_namesToUserhost.c_str(), 0); CMString temp; if (!name.IsEmpty()) { - ppro->DoUserhostWithReason(2, _T("S") + name, true, _T("%s"), name.c_str()); + ppro->DoUserhostWithReason(2, L"S" + name, true, L"%s", name.c_str()); temp = GetWordAddress(ppro->m_namesToWho.c_str(), 1); ppro->m_namesToWho = temp; } @@ -199,12 +199,12 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) if (!name2.IsEmpty()) { CMString params; for (int i = 0; i < 3; i++) { - params = _T(""); + params = L""; for (int j = 0; j < 5; j++) - params += GetWord(ppro->m_namesToUserhost, i * 5 + j) + _T(" "); + params += GetWord(ppro->m_namesToUserhost, i * 5 + j) + L" "; if (params[0] != ' ') - ppro->DoUserhostWithReason(1, CMString(_T("S")) + params, true, params); + ppro->DoUserhostWithReason(1, CMString(L"S") + params, true, params); } temp = GetWordAddress(ppro->m_namesToUserhost.c_str(), 15); ppro->m_namesToUserhost = temp; @@ -261,7 +261,7 @@ void __cdecl CIrcProto::ResolveIPThread(LPVOID di) bool CIrcProto::OnIrc_PING(const CIrcMessage* pmsg) { TCHAR szResponse[100]; - mir_sntprintf(szResponse, _T("PONG %s"), pmsg->parameters[0].c_str()); + mir_sntprintf(szResponse, L"PONG %s", pmsg->parameters[0].c_str()); SendIrcMessage(szResponse); return false; } @@ -357,8 +357,8 @@ bool CIrcProto::OnIrc_SETAWAY(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_JOIN(const CIrcMessage* pmsg) { if (pmsg->parameters.getCount() > 0 && pmsg->m_bIncoming && pmsg->prefix.sNick != m_info.sNick) { - CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost; - DoEvent(GC_EVENT_JOIN, pmsg->parameters[0].c_str(), pmsg->prefix.sNick.c_str(), NULL, _T("Normal"), host.c_str(), NULL, true, false); + CMString host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost; + DoEvent(GC_EVENT_JOIN, pmsg->parameters[0].c_str(), pmsg->prefix.sNick.c_str(), NULL, L"Normal", host.c_str(), NULL, true, false); DoEvent(GC_EVENT_SETCONTACTSTATUS, pmsg->parameters[0].c_str(), pmsg->prefix.sNick.c_str(), NULL, NULL, NULL, ID_STATUS_ONLINE, FALSE, FALSE); } else ShowMessage(pmsg); @@ -369,7 +369,7 @@ bool CIrcProto::OnIrc_JOIN(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_QUIT(const CIrcMessage* pmsg) { if (pmsg->m_bIncoming) { - CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost; + CMString host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost; DoEvent(GC_EVENT_QUIT, NULL, pmsg->prefix.sNick.c_str(), pmsg->parameters.getCount() > 0 ? pmsg->parameters[0].c_str() : NULL, NULL, host.c_str(), NULL, true, false); struct CONTACT user = { (LPTSTR)pmsg->prefix.sNick.c_str(), (LPTSTR)pmsg->prefix.sUser.c_str(), (LPTSTR)pmsg->prefix.sHost.c_str(), false, false, false }; CList_SetOffline(&user); @@ -387,7 +387,7 @@ bool CIrcProto::OnIrc_QUIT(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_PART(const CIrcMessage* pmsg) { if (pmsg->parameters.getCount() > 0 && pmsg->m_bIncoming) { - CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost; + CMString host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost; DoEvent(GC_EVENT_PART, pmsg->parameters[0].c_str(), pmsg->prefix.sNick.c_str(), pmsg->parameters.getCount() > 1 ? pmsg->parameters[1].c_str() : NULL, NULL, host.c_str(), NULL, true, false); if (pmsg->prefix.sNick == m_info.sNick) { CMString S = MakeWndID(pmsg->parameters[0].c_str()); @@ -417,9 +417,9 @@ bool CIrcProto::OnIrc_KICK(const CIrcMessage* pmsg) if (m_rejoinIfKicked) { CHANNELINFO *wi = (CHANNELINFO *)DoEvent(GC_EVENT_GETITEMDATA, pmsg->parameters[0].c_str(), NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, 0); if (wi && wi->pszPassword) - PostIrcMessage(_T("/JOIN %s %s"), pmsg->parameters[0].c_str(), wi->pszPassword); + PostIrcMessage(L"/JOIN %s %s", pmsg->parameters[0].c_str(), wi->pszPassword); else - PostIrcMessage(_T("/JOIN %s"), pmsg->parameters[0].c_str()); + PostIrcMessage(L"/JOIN %s", pmsg->parameters[0].c_str()); } } @@ -429,8 +429,8 @@ bool CIrcProto::OnIrc_KICK(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_MODEQUERY(const CIrcMessage* pmsg) { if (pmsg->parameters.getCount() > 2 && pmsg->m_bIncoming && IsChannel(pmsg->parameters[1])) { - CMString sPassword = _T(""); - CMString sLimit = _T(""); + CMString sPassword = L""; + CMString sLimit = L""; bool bAdd = false; int iParametercount = 3; @@ -464,8 +464,8 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) { bool flag = false; bool bContainsValidModes = false; - CMString sModes = _T(""); - CMString sParams = _T(""); + CMString sModes = L""; + CMString sParams = L""; if (pmsg->parameters.getCount() > 1 && pmsg->m_bIncoming) { if (IsChannel(pmsg->parameters[0])) { @@ -476,22 +476,22 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) while (*p1 != '\0') { if (*p1 == '+') { bAdd = true; - sModes += _T("+"); + sModes += L"+"; } if (*p1 == '-') { bAdd = false; - sModes += _T("-"); + sModes += L"-"; } if (*p1 == 'l' && bAdd && iParametercount < (int)pmsg->parameters.getCount()) { bContainsValidModes = true; - sModes += _T("l"); - sParams += _T(" ") + pmsg->parameters[iParametercount]; + sModes += L"l"; + sParams += L" " + pmsg->parameters[iParametercount]; iParametercount++; } if (*p1 == 'b' || *p1 == 'k' && iParametercount < (int)pmsg->parameters.getCount()) { bContainsValidModes = true; sModes += *p1; - sParams += _T(" ") + pmsg->parameters[iParametercount]; + sParams += L" " + pmsg->parameters[iParametercount]; iParametercount++; } if (strchr(sUserModes.c_str(), (char)*p1)) { @@ -537,13 +537,13 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) CMString sMessage = temp; for (int i = 2; i < (int)pmsg->parameters.getCount(); i++) - sMessage += _T(" ") + pmsg->parameters[i]; + sMessage += L" " + pmsg->parameters[i]; DoEvent(GC_EVENT_INFORMATION, pmsg->parameters[0].c_str(), pmsg->prefix.sNick.c_str(), sMessage.c_str(), NULL, NULL, NULL, true, false); } else if (bContainsValidModes) { for (int i = iParametercount; i < (int)pmsg->parameters.getCount(); i++) - sParams += _T(" ") + pmsg->parameters[i]; + sParams += L" " + pmsg->parameters[i]; TCHAR temp[4000]; mir_sntprintf(temp, TranslateT("%s sets mode %s%s"), pmsg->prefix.sNick.c_str(), sModes.c_str(), sParams.c_str()); @@ -551,7 +551,7 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) } if (flag) - PostIrcMessage(_T("/MODE %s"), pmsg->parameters[0].c_str()); + PostIrcMessage(L"/MODE %s", pmsg->parameters[0].c_str()); } else { TCHAR temp[256]; @@ -559,7 +559,7 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) CMString sMessage = temp; for (int i = 2; i < (int)pmsg->parameters.getCount(); i++) - sMessage += _T(" ") + pmsg->parameters[i]; + sMessage += L" " + pmsg->parameters[i]; DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, pmsg->prefix.sNick.c_str(), sMessage.c_str(), NULL, NULL, NULL, true, false); } @@ -579,7 +579,7 @@ bool CIrcProto::OnIrc_NICK(const CIrcMessage* pmsg) setTString("Nick", m_info.sNick.c_str()); } - CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost; + CMString host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost; DoEvent(GC_EVENT_NICK, NULL, pmsg->prefix.sNick.c_str(), pmsg->parameters[0].c_str(), NULL, host.c_str(), NULL, true, bIsMe); DoEvent(GC_EVENT_CHUID, NULL, pmsg->prefix.sNick.c_str(), pmsg->parameters[0].c_str(), NULL, NULL, NULL, true, false); @@ -629,9 +629,9 @@ bool CIrcProto::OnIrc_NOTICE(const CIrcMessage* pmsg) if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.iType == GCW_CHATROOM) S2 = GetWord(gci.pszID, 0); else - S2 = _T(""); + S2 = L""; } - else S2 = _T(""); + else S2 = L""; } DoEvent(GC_EVENT_NOTICE, S2.IsEmpty() ? 0 : S2.c_str(), S.c_str(), pmsg->parameters[1].c_str(), NULL, S3.c_str(), NULL, true, false); } @@ -644,7 +644,7 @@ bool CIrcProto::OnIrc_NOTICE(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_YOURHOST(const CIrcMessage* pmsg) { if (pmsg->m_bIncoming) { - static const TCHAR* lpszFmt = _T("Your host is %99[^ \x5b,], running version %99s"); + static const TCHAR* lpszFmt = L"Your host is %99[^ \x5b,], running version %99s"; TCHAR szHostName[100], szVersion[100]; if (_stscanf(pmsg->parameters[1].c_str(), lpszFmt, &szHostName, &szVersion) > 0) m_info.sServerName = szHostName; @@ -662,7 +662,7 @@ bool CIrcProto::OnIrc_INVITE(const CIrcMessage* pmsg) return true; if (pmsg->m_bIncoming && m_joinOnInvite && pmsg->parameters.getCount() > 1 && mir_tstrcmpi(pmsg->parameters[0].c_str(), m_info.sNick.c_str()) == 0) - PostIrcMessage(_T("/JOIN %s"), pmsg->parameters[1].c_str()); + PostIrcMessage(L"/JOIN %s", pmsg->parameters[1].c_str()); ShowMessage(pmsg); return true; @@ -670,9 +670,9 @@ bool CIrcProto::OnIrc_INVITE(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_PINGPONG(const CIrcMessage* pmsg) { - if (pmsg->m_bIncoming && pmsg->sCommand == _T("PING")) { + if (pmsg->m_bIncoming && pmsg->sCommand == L"PING") { TCHAR szResponse[100]; - mir_sntprintf(szResponse, _T("PONG %s"), pmsg->parameters[0].c_str()); + mir_sntprintf(szResponse, L"PONG %s", pmsg->parameters[0].c_str()); SendIrcMessage(szResponse); } @@ -718,7 +718,7 @@ bool CIrcProto::OnIrc_PRIVMSG(const CIrcMessage* pmsg) if (bIsChannel) { if (!(pmsg->m_bIncoming && m_ignore && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'm'))) { if (!pmsg->m_bIncoming) - mess.Replace(_T("%%"), _T("%")); + mess.Replace(L"%%", L"%"); DoEvent(GC_EVENT_MESSAGE, pmsg->parameters[0].c_str(), pmsg->m_bIncoming ? pmsg->prefix.sNick.c_str() : m_info.sNick.c_str(), mess.c_str(), NULL, NULL, NULL, true, pmsg->m_bIncoming ? false : true); } return true; @@ -741,7 +741,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) mess.Delete(mess.GetLength() - 1, 1); // exploit??? - if (mess.Find(1) != -1 || mess.Find(_T("%newl")) != -1) { + if (mess.Find(1) != -1 || mess.Find(L"%newl") != -1) { TCHAR temp[4096]; mir_sntprintf(temp, TranslateT("CTCP ERROR: Malformed CTCP command received from %s!%s@%s. Possible attempt to take control of your IRC client registered"), pmsg->prefix.sNick.c_str(), pmsg->prefix.sUser.c_str(), pmsg->prefix.sHost.c_str()); DoEvent(GC_EVENT_INFORMATION, 0, m_info.sNick.c_str(), temp, NULL, NULL, NULL, true, false); @@ -756,15 +756,15 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) // should it be ignored? if (m_ignore) { if (IsChannel(pmsg->parameters[0])) { - if (command == _T("action") && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'm')) + if (command == L"action" && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'm')) return true; } else { - if (command == _T("action")) { + if (command == L"action") { if (IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'q')) return true; } - else if (command == _T("dcc")) { + else if (command == L"dcc") { if (IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'd')) return true; } @@ -773,32 +773,32 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) } } - if (pmsg->sCommand == _T("PRIVMSG")) { + if (pmsg->sCommand == L"PRIVMSG") { // incoming ACTION - if (command == _T("action")) { + if (command == L"action") { mess.Delete(0, 6); if (IsChannel(pmsg->parameters[0])) { if (mess.GetLength() > 1) { mess.Delete(0, 1); if (!pmsg->m_bIncoming) - mess.Replace(_T("%%"), _T("%")); + mess.Replace(L"%%", L"%"); DoEvent(GC_EVENT_ACTION, pmsg->parameters[0].c_str(), pmsg->m_bIncoming ? pmsg->prefix.sNick.c_str() : m_info.sNick.c_str(), mess.c_str(), NULL, NULL, NULL, true, pmsg->m_bIncoming ? false : true); } } else if (pmsg->m_bIncoming) { mess.Insert(0, pmsg->prefix.sNick.c_str()); - mess.Insert(0, _T("* ")); - mess.Insert(mess.GetLength(), _T(" *")); + mess.Insert(0, L"* "); + mess.Insert(mess.GetLength(), L" *"); CIrcMessage msg = *pmsg; msg.parameters[1] = mess; OnIrc_PRIVMSG(&msg); } } // incoming FINGER - else if (pmsg->m_bIncoming && command == _T("finger")) { - PostIrcMessage(_T("/NOTICE %s \001FINGER %s (%s)\001"), pmsg->prefix.sNick.c_str(), m_name, m_userID); + else if (pmsg->m_bIncoming && command == L"finger") { + PostIrcMessage(L"/NOTICE %s \001FINGER %s (%s)\001", pmsg->prefix.sNick.c_str(), m_name, m_userID); TCHAR temp[300]; mir_sntprintf(temp, TranslateT("CTCP FINGER requested by %s"), pmsg->prefix.sNick.c_str()); @@ -806,8 +806,8 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) } // incoming VERSION - else if (pmsg->m_bIncoming && command == _T("version")) { - PostIrcMessage(_T("/NOTICE %s \001VERSION Miranda NG %%mirver (IRC v.%%version)") _T(", ") _T(__COPYRIGHT) _T("\001"), pmsg->prefix.sNick.c_str()); + else if (pmsg->m_bIncoming && command == L"version") { + PostIrcMessage(L"/NOTICE %s \001VERSION Miranda NG %%mirver (IRC v.%%version)" L", " _T(__COPYRIGHT) L"\001", pmsg->prefix.sNick.c_str()); TCHAR temp[300]; mir_sntprintf(temp, TranslateT("CTCP VERSION requested by %s"), pmsg->prefix.sNick.c_str()); @@ -815,8 +815,8 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) } // incoming SOURCE - else if (pmsg->m_bIncoming && command == _T("source")) { - PostIrcMessage(_T("/NOTICE %s \001SOURCE Get Miranda IRC here: http://miranda-ng.org/ \001"), pmsg->prefix.sNick.c_str()); + else if (pmsg->m_bIncoming && command == L"source") { + PostIrcMessage(L"/NOTICE %s \001SOURCE Get Miranda IRC here: http://miranda-ng.org/ \001", pmsg->prefix.sNick.c_str()); TCHAR temp[300]; mir_sntprintf(temp, TranslateT("CTCP SOURCE requested by %s"), pmsg->prefix.sNick.c_str()); @@ -824,8 +824,8 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) } // incoming USERINFO - else if (pmsg->m_bIncoming && command == _T("userinfo")) { - PostIrcMessage(_T("/NOTICE %s \001USERINFO %s\001"), pmsg->prefix.sNick.c_str(), m_userInfo); + else if (pmsg->m_bIncoming && command == L"userinfo") { + PostIrcMessage(L"/NOTICE %s \001USERINFO %s\001", pmsg->prefix.sNick.c_str(), m_userInfo); TCHAR temp[300]; mir_sntprintf(temp, TranslateT("CTCP USERINFO requested by %s"), pmsg->prefix.sNick.c_str()); @@ -833,8 +833,8 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) } // incoming PING - else if (pmsg->m_bIncoming && command == _T("ping")) { - PostIrcMessage(_T("/NOTICE %s \001%s\001"), pmsg->prefix.sNick.c_str(), mess.c_str()); + else if (pmsg->m_bIncoming && command == L"ping") { + PostIrcMessage(L"/NOTICE %s \001%s\001", pmsg->prefix.sNick.c_str(), mess.c_str()); TCHAR temp[300]; mir_sntprintf(temp, TranslateT("CTCP PING requested by %s"), pmsg->prefix.sNick.c_str()); @@ -842,31 +842,31 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) } // incoming TIME - else if (pmsg->m_bIncoming && command == _T("time")) { + else if (pmsg->m_bIncoming && command == L"time") { TCHAR temp[300]; time_t tim = time(NULL); mir_tstrncpy(temp, _tctime(&tim), 25); - PostIrcMessage(_T("/NOTICE %s \001TIME %s\001"), pmsg->prefix.sNick.c_str(), temp); + PostIrcMessage(L"/NOTICE %s \001TIME %s\001", pmsg->prefix.sNick.c_str(), temp); mir_sntprintf(temp, TranslateT("CTCP TIME requested by %s"), pmsg->prefix.sNick.c_str()); DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, temp, NULL, NULL, NULL, true, false); } // incoming DCC request... lots of stuff happening here... - else if (pmsg->m_bIncoming && command == _T("dcc")) { + else if (pmsg->m_bIncoming && command == L"dcc") { CMString type = GetWord(mess.c_str(), 1); type.MakeLower(); // components of a dcc message - CMString sFile = _T(""); + CMString sFile = L""; DWORD dwAdr = 0; int iPort = 0; unsigned __int64 dwSize = 0; - CMString sToken = _T(""); - bool bIsChat = (type == _T("chat")); + CMString sToken = L""; + bool bIsChat = (type == L"chat"); // 1. separate the dcc command into the correct pieces - if (bIsChat || type == _T("send")) { + if (bIsChat || type == L"send") { // if the filename is surrounded by quotes, do this if (GetWord(mess.c_str(), 2)[0] == '\"') { int end = 0; @@ -896,7 +896,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) while (!bFlag && !GetWord(mess.c_str(), index).IsEmpty()) { CMString sTemp; - if (type == _T("chat")) + if (type == L"chat") sTemp = GetWord(mess.c_str(), index - 1) + GetWord(mess.c_str(), index); else sTemp = GetWord(mess.c_str(), index - 2) + GetWord(mess.c_str(), index - 1) + GetWord(mess.c_str(), index); @@ -918,7 +918,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) TCHAR* p1 = _tcsdup(GetWordAddress(mess.c_str(), 2)); TCHAR* p2 = (TCHAR*)GetWordAddress(p1, index - 5); - if (type == _T("send")) { + if (type == L"send") { if (p2 > p1) { p2--; while (p2 != p1 && *p2 == ' ') { @@ -928,7 +928,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) sFile = p1; } } - else sFile = _T("chat"); + else sFile = L"chat"; free(p1); @@ -939,7 +939,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) } } } - else if (type == _T("accept") || type == _T("resume")) { + else if (type == L"accept" || type == L"resume") { // if the filename is surrounded by quotes, do this if (GetWord(mess.c_str(), 2)[0] == '\"') { int end = 0; @@ -1005,7 +1005,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) // end separating dcc commands // 2. Check for malformed dcc commands or other errors - if (bIsChat || type == _T("send")) { + if (bIsChat || type == L"send") { TCHAR szTemp[256]; szTemp[0] = '\0'; @@ -1018,10 +1018,10 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) if (bIsChat && !m_DCCChatEnabled) mir_sntprintf(szTemp, TranslateT("DCC: Chat request from %s denied"), pmsg->prefix.sNick.c_str()); - else if (type == _T("send") && !m_DCCFileEnabled) + else if (type == L"send" && !m_DCCFileEnabled) mir_sntprintf(szTemp, TranslateT("DCC: File transfer request from %s denied"), pmsg->prefix.sNick.c_str()); - else if (type == _T("send") && !iPort && ulAdr == 0) + else if (type == L"send" && !iPort && ulAdr == 0) mir_sntprintf(szTemp, TranslateT("DCC: Reverse file transfer request from %s denied [No local IP]"), pmsg->prefix.sNick.c_str()); if (sFile.IsEmpty() || dwAdr == 0 || dwSize == 0 || iPort == 0 && sToken.IsEmpty()) @@ -1039,11 +1039,11 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) sFileCorrected = sFile.Mid(i + 1); sFile = sFileCorrected; } - else if (type == _T("accept") || type == _T("resume")) { + else if (type == L"accept" || type == L"resume") { TCHAR szTemp[256]; szTemp[0] = '\0'; - if (type == _T("resume") && !m_DCCFileEnabled) + if (type == L"resume" && !m_DCCFileEnabled) mir_sntprintf(szTemp, TranslateT("DCC: File transfer resume request from %s denied"), pmsg->prefix.sNick.c_str()); if (sToken.IsEmpty() && iPort == 0 || sFile.IsEmpty()) @@ -1074,7 +1074,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) m_DCCChatIgnore == 2 && hContact && db_get_b(hContact, "CList", "NotOnList", 0) == 0 && db_get_b(hContact, "CList", "Hidden", 0) == 0) { - CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost; + CMString host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost; CList_AddDCCChat(pmsg->prefix.sNick, host, dwAdr, iPort); // add a CHAT event to the clist } else { @@ -1085,7 +1085,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) } // remote requested that the file should be resumed - if (type == _T("resume")) { + if (type == L"resume") { CDccSession* dcc; if (sToken.IsEmpty()) dcc = FindDCCSendByPort(iPort); @@ -1095,12 +1095,12 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) if (dcc) { InterlockedExchange(&dcc->dwWhatNeedsDoing, (long)FILERESUME_RESUME); dcc->dwResumePos = dwSize; // dwSize is the resume position - PostIrcMessage(_T("/PRIVMSG %s \001DCC ACCEPT %s\001"), pmsg->prefix.sNick.c_str(), GetWordAddress(mess.c_str(), 2)); + PostIrcMessage(L"/PRIVMSG %s \001DCC ACCEPT %s\001", pmsg->prefix.sNick.c_str(), GetWordAddress(mess.c_str(), 2)); } } // remote accepted your request for a file resume - if (type == _T("accept")) { + if (type == L"accept") { CDccSession* dcc; if (sToken.IsEmpty()) dcc = FindDCCRecvByPortAndName(iPort, pmsg->prefix.sNick.c_str()); @@ -1114,7 +1114,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) } } - if (type == _T("send")) { + if (type == L"send") { CMString sTokenBackup = sToken; bool bTurbo = false; // TDCC indicator @@ -1182,12 +1182,12 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) } // handle incoming ctcp in notices. This technique is used for replying to CTCP queries - else if (pmsg->sCommand == _T("NOTICE")) { + else if (pmsg->sCommand == L"NOTICE") { TCHAR szTemp[300]; szTemp[0] = '\0'; //if we got incoming CTCP Version for contact in CList - then write its as MirVer for that contact! - if (pmsg->m_bIncoming && command == _T("version")) { + if (pmsg->m_bIncoming && command == L"version") { struct CONTACT user = { (TCHAR*)pmsg->prefix.sNick.c_str(), (TCHAR*)pmsg->prefix.sUser.c_str(), (TCHAR*)pmsg->prefix.sHost.c_str(), false, false, false }; MCONTACT hContact = CList_FindContact(&user); if (hContact) @@ -1198,12 +1198,12 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) if (m_whoisDlg && IsWindowVisible(m_whoisDlg->GetHwnd())) { m_whoisDlg->m_InfoNick.GetText(szTemp, _countof(szTemp)); if (mir_tstrcmpi(szTemp, pmsg->prefix.sNick.c_str()) == 0) { - if (pmsg->m_bIncoming && (command == _T("version") || command == _T("userinfo") || command == _T("time"))) { + if (pmsg->m_bIncoming && (command == L"version" || command == L"userinfo" || command == L"time")) { SetActiveWindow(m_whoisDlg->GetHwnd()); m_whoisDlg->m_Reply.SetText(DoColorCodes(GetWordAddress(mess.c_str(), 1), TRUE, FALSE)); return true; } - if (pmsg->m_bIncoming && command == _T("ping")) { + if (pmsg->m_bIncoming && command == L"ping") { SetActiveWindow(m_whoisDlg->GetHwnd()); int s = (int)time(0) - (int)_ttol(GetWordAddress(mess.c_str(), 1)); TCHAR szTmp[30]; @@ -1219,7 +1219,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) } //... else show the reply in the current window - if (pmsg->m_bIncoming && command == _T("ping")) { + if (pmsg->m_bIncoming && command == L"ping") { int s = (int)time(0) - (int)_ttol(GetWordAddress(mess.c_str(), 1)); mir_sntprintf(szTemp, TranslateT("CTCP PING reply from %s: %u sec(s)"), pmsg->prefix.sNick.c_str(), s); DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, szTemp, NULL, NULL, NULL, true, false); @@ -1236,7 +1236,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_NAMES(const CIrcMessage* pmsg) { if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 3) - sNamesList += pmsg->parameters[3] + _T(" "); + sNamesList += pmsg->parameters[3] + L" "; ShowMessage(pmsg); return true; } @@ -1244,7 +1244,7 @@ bool CIrcProto::OnIrc_NAMES(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) { if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 1) { - CMString name = _T("a"); + CMString name = L"a"; int i = 0; BOOL bFlag = false; @@ -1283,20 +1283,20 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) GCDEST gcd = { m_szModuleName, sID.c_str(), GC_EVENT_ADDGROUP }; GCEVENT gce = { sizeof(gce), &gcd }; - PostIrcMessage(_T("/MODE %s"), sChanName); + PostIrcMessage(L"/MODE %s", sChanName); // register the statuses - gce.ptszStatus = _T("Owner"); + gce.ptszStatus = L"Owner"; CallChatEvent(0, (LPARAM)&gce); - gce.ptszStatus = _T("Admin"); + gce.ptszStatus = L"Admin"; CallChatEvent(0, (LPARAM)&gce); - gce.ptszStatus = _T("Op"); + gce.ptszStatus = L"Op"; CallChatEvent(0, (LPARAM)&gce); - gce.ptszStatus = _T("Halfop"); + gce.ptszStatus = L"Halfop"; CallChatEvent(0, (LPARAM)&gce); - gce.ptszStatus = _T("Voice"); + gce.ptszStatus = L"Voice"; CallChatEvent(0, (LPARAM)&gce); - gce.ptszStatus = _T("Normal"); + gce.ptszStatus = L"Normal"; CallChatEvent(0, (LPARAM)&gce); { int k = 0; @@ -1309,7 +1309,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) sStat = PrefixToStatus(sTemp[0]); // fix for networks like freshirc where they allow more than one prefix - while (PrefixToStatus(sTemp[0]) != _T("Normal")) + while (PrefixToStatus(sTemp[0]) != L"Normal") sTemp.Delete(0, 1); gcd.iType = GC_EVENT_JOIN; @@ -1336,11 +1336,11 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) CallChatEvent(0, (LPARAM)&gce); DoEvent(GC_EVENT_SETCONTACTSTATUS, sChanName, sTemp.c_str(), NULL, NULL, NULL, ID_STATUS_ONLINE, FALSE, FALSE); // fix for networks like freshirc where they allow more than one prefix - if (PrefixToStatus(sTemp2[0]) != _T("Normal")) { + if (PrefixToStatus(sTemp2[0]) != L"Normal") { sTemp2.Delete(0, 1); sStat = PrefixToStatus(sTemp2[0]); - while (sStat != _T("Normal")) { - DoEvent(GC_EVENT_ADDSTATUS, sID.c_str(), sTemp.c_str(), _T("system"), sStat.c_str(), NULL, NULL, false, false, 0); + while (sStat != L"Normal") { + DoEvent(GC_EVENT_ADDSTATUS, sID.c_str(), sTemp.c_str(), L"system", sStat.c_str(), NULL, NULL, false, false, 0); sTemp2.Delete(0, 1); sStat = PrefixToStatus(sTemp2[0]); } @@ -1367,9 +1367,9 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) if (!sTopic.IsEmpty() && !mir_tstrcmpi(GetWord(sTopic.c_str(), 0).c_str(), sChanName)) { DoEvent(GC_EVENT_TOPIC, sChanName, sTopicName.IsEmpty() ? NULL : sTopicName.c_str(), GetWordAddress(sTopic.c_str(), 1), NULL, sTopicTime.IsEmpty() ? NULL : sTopicTime.c_str(), NULL, true, false); AddWindowItemData(sChanName, 0, 0, 0, GetWordAddress(sTopic.c_str(), 1)); - sTopic = _T(""); - sTopicName = _T(""); - sTopicTime = _T(""); + sTopic = L""; + sTopicName = L""; + sTopicTime = L""; } } gcd.ptszID = (TCHAR*)sID.c_str(); @@ -1387,8 +1387,8 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) gce.pDest = &gcd; if (!getTString("JTemp", &dbv)) { - CMString command = _T("a"); - CMString save = _T(""); + CMString command = L"a"; + CMString save = L""; int k = 0; while (!command.IsEmpty()) { @@ -1399,7 +1399,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) if (!mir_tstrcmpi(sChanName, S)) break; - save += command + _T(" "); + save += command + L" "; } } @@ -1434,7 +1434,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) } } - sNamesList = _T(""); + sNamesList = L""; ShowMessage(pmsg); return true; } @@ -1443,9 +1443,9 @@ bool CIrcProto::OnIrc_INITIALTOPIC(const CIrcMessage* pmsg) { if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 2) { AddWindowItemData(pmsg->parameters[1].c_str(), 0, 0, 0, pmsg->parameters[2].c_str()); - sTopic = pmsg->parameters[1] + _T(" ") + pmsg->parameters[2]; - sTopicName = _T(""); - sTopicTime = _T(""); + sTopic = pmsg->parameters[1] + L" " + pmsg->parameters[2]; + sTopicName = L""; + sTopicTime = L""; } ShowMessage(pmsg); return true; @@ -1458,7 +1458,7 @@ bool CIrcProto::OnIrc_INITIALTOPICNAME(const CIrcMessage* pmsg) time_t ttTopicTime; sTopicName = pmsg->parameters[2]; ttTopicTime = _tcstol(pmsg->parameters[3].c_str(), &tStopStr, 10); - _tcsftime(tTimeBuf, 128, _T("%#c"), localtime(&ttTopicTime)); + _tcsftime(tTimeBuf, 128, L"%#c", localtime(&ttTopicTime)); sTopicTime = tTimeBuf; } ShowMessage(pmsg); @@ -1515,11 +1515,11 @@ bool CIrcProto::OnIrc_LIST(const CIrcMessage* pmsg) ListView_SetItem(hListView, &lvItem); TCHAR* temp = mir_tstrdup(pmsg->parameters[pmsg->parameters.getCount() - 1]); - TCHAR* find = _tcsstr(temp, _T("[+")); - TCHAR* find2 = _tcsstr(temp, _T("]")); + TCHAR* find = _tcsstr(temp, L"[+"); + TCHAR* find2 = _tcsstr(temp, L"]"); TCHAR* save = temp; if (find == temp && find2 != NULL && find + 8 >= find2) { - temp = _tcsstr(temp, _T("]")); + temp = _tcsstr(temp, L"]"); if (mir_tstrlen(temp) > 1) { temp++; temp[0] = '\0'; @@ -1570,7 +1570,7 @@ bool CIrcProto::OnIrc_LISTEND(const CIrcMessage* pmsg) if (m_noOfChannels > 0) percent = (int)(m_channelNumber * 100) / m_noOfChannels; if (percent < 70) { - mir_tstrcat(text, _T(" ")); + mir_tstrcat(text, L" "); mir_tstrcat(text, TranslateT("(probably truncated by server)")); } SetDlgItemText(m_listDlg->GetHwnd(), IDC_TEXT, text); @@ -1583,20 +1583,20 @@ bool CIrcProto::OnIrc_BANLIST(const CIrcMessage* pmsg) { if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 2) { if (m_managerDlg->GetHwnd() && ( - m_managerDlg->m_radio1.GetState() && pmsg->sCommand == _T("367") || - m_managerDlg->m_radio2.GetState() && pmsg->sCommand == _T("346") || - m_managerDlg->m_radio3.GetState() && pmsg->sCommand == _T("348")) && + m_managerDlg->m_radio1.GetState() && pmsg->sCommand == L"367" || + m_managerDlg->m_radio2.GetState() && pmsg->sCommand == L"346" || + m_managerDlg->m_radio3.GetState() && pmsg->sCommand == L"348") && !m_managerDlg->m_radio1.Enabled() && !m_managerDlg->m_radio2.Enabled() && !m_managerDlg->m_radio3.Enabled()) { CMString S = pmsg->parameters[2]; if (pmsg->parameters.getCount() > 3) { - S += _T(" - "); + S += L" - "; S += pmsg->parameters[3]; if (pmsg->parameters.getCount() > 4) { - S += _T(" - ( "); + S += L" - ( "; time_t time = _ttoi(pmsg->parameters[4].c_str()); S += _tctime(&time); - S.Replace(_T("\n"), _T(" ")); - S += _T(")"); + S.Replace(L"\n", L" "); + S += L")"; } } @@ -1612,9 +1612,9 @@ bool CIrcProto::OnIrc_BANLISTEND(const CIrcMessage* pmsg) { if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 1) { if (m_managerDlg->GetHwnd() && - (m_managerDlg->m_radio1.GetState() && pmsg->sCommand == _T("368") - || m_managerDlg->m_radio2.GetState() && pmsg->sCommand == _T("347") - || m_managerDlg->m_radio3.GetState() && pmsg->sCommand == _T("349")) && + (m_managerDlg->m_radio1.GetState() && pmsg->sCommand == L"368" + || m_managerDlg->m_radio2.GetState() && pmsg->sCommand == L"347" + || m_managerDlg->m_radio3.GetState() && pmsg->sCommand == L"349") && !m_managerDlg->m_radio1.Enabled() && !m_managerDlg->m_radio2.Enabled() && !m_managerDlg->m_radio3.Enabled()) { if (strchr(sChannelModes.c_str(), 'b')) m_managerDlg->m_radio1.Enable(); @@ -1678,7 +1678,7 @@ bool CIrcProto::OnIrc_WHOIS_OTHER(const CIrcMessage* pmsg) if (pmsg->m_bIncoming && m_whoisDlg && pmsg->parameters.getCount() > 2 && m_manualWhoisCount > 0) { TCHAR temp[1024], temp2[1024]; m_whoisDlg->m_InfoOther.GetText(temp, 1000); - mir_tstrcat(temp, _T("%s\r\n")); + mir_tstrcat(temp, L"%s\r\n"); mir_sntprintf(temp2, temp, pmsg->parameters[2].c_str()); m_whoisDlg->m_InfoOther.SetText(temp2); } @@ -1728,7 +1728,7 @@ bool CIrcProto::OnIrc_WHOIS_IDLE(const CIrcMessage* pmsg) TCHAR temp3[256]; TCHAR tTimeBuf[128], *tStopStr; time_t ttTime = _tcstol(pmsg->parameters[3].c_str(), &tStopStr, 10); - _tcsftime(tTimeBuf, 128, _T("%c"), localtime(&ttTime)); + _tcsftime(tTimeBuf, 128, L"%c", localtime(&ttTime)); mir_sntprintf(temp3, TranslateT("online since %s, idle %s"), tTimeBuf, temp); m_whoisDlg->m_AwayTime.SetText(temp3); } @@ -1747,9 +1747,9 @@ bool CIrcProto::OnIrc_WHOIS_SERVER(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_WHOIS_AUTH(const CIrcMessage* pmsg) { if (pmsg->m_bIncoming && m_whoisDlg && pmsg->parameters.getCount() > 2 && m_manualWhoisCount > 0) { - if (pmsg->sCommand == _T("330")) + if (pmsg->sCommand == L"330") m_whoisDlg->m_InfoAuth.SetText(pmsg->parameters[2].c_str()); - else if (pmsg->parameters[2] == _T("is an identified user") || pmsg->parameters[2] == _T("is a registered nick")) + else if (pmsg->parameters[2] == L"is an identified user" || pmsg->parameters[2] == L"is a registered nick") m_whoisDlg->m_InfoAuth.SetText(pmsg->parameters[2].c_str()); else OnIrc_WHOIS_OTHER(pmsg); @@ -1767,7 +1767,7 @@ bool CIrcProto::OnIrc_WHOIS_NO_USER(const CIrcMessage* pmsg) CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, false, false }; MCONTACT hContact = CList_FindContact(&user); if (hContact) { - AddOutgoingMessageToDB(hContact, (TCHAR*)((CMString)_T("> ") + pmsg->parameters[2] + (CMString)_T(": ") + pmsg->parameters[1]).c_str()); + AddOutgoingMessageToDB(hContact, (TCHAR*)((CMString)L"> " + pmsg->parameters[2] + (CMString)L": " + pmsg->parameters[1]).c_str()); DBVARIANT dbv; if (!getTString(hContact, "Default", &dbv)) { @@ -1775,13 +1775,13 @@ bool CIrcProto::OnIrc_WHOIS_NO_USER(const CIrcMessage* pmsg) DBVARIANT dbv2; if (getByte(hContact, "AdvancedMode", 0) == 0) - DoUserhostWithReason(1, ((CMString)_T("S") + dbv.ptszVal).c_str(), true, dbv.ptszVal); + DoUserhostWithReason(1, ((CMString)L"S" + dbv.ptszVal).c_str(), true, dbv.ptszVal); else { if (!getTString(hContact, "UWildcard", &dbv2)) { - DoUserhostWithReason(2, ((CMString)_T("S") + dbv2.ptszVal).c_str(), true, dbv2.ptszVal); + DoUserhostWithReason(2, ((CMString)L"S" + dbv2.ptszVal).c_str(), true, dbv2.ptszVal); db_free(&dbv2); } - else DoUserhostWithReason(2, ((CMString)_T("S") + dbv.ptszVal).c_str(), true, dbv.ptszVal); + else DoUserhostWithReason(2, ((CMString)L"S" + dbv.ptszVal).c_str(), true, dbv.ptszVal); } setString(hContact, "User", ""); setString(hContact, "Host", ""); @@ -1804,7 +1804,7 @@ static void __stdcall sttShowNickWnd(void* param) } SetEvent(ppro->m_evWndCreate); SetDlgItemText(ppro->m_nickDlg->GetHwnd(), IDC_CAPTION, TranslateT("Change nickname")); - SetDlgItemText(ppro->m_nickDlg->GetHwnd(), IDC_TEXT, pmsg->parameters.getCount() > 2 ? pmsg->parameters[2].c_str() : _T("")); + SetDlgItemText(ppro->m_nickDlg->GetHwnd(), IDC_TEXT, pmsg->parameters.getCount() > 2 ? pmsg->parameters[2].c_str() : L""); ppro->m_nickDlg->m_Enick.SetText(pmsg->parameters[1].c_str()); ppro->m_nickDlg->m_Enick.SendMsg(CB_SETEDITSEL, 0, MAKELPARAM(0, -1)); delete pmsg; @@ -1815,7 +1815,7 @@ bool CIrcProto::OnIrc_NICK_ERR(const CIrcMessage* pmsg) if (pmsg->m_bIncoming) { if (nickflag && ((m_alternativeNick[0] != 0)) && (pmsg->parameters.getCount() > 2 && mir_tstrcmp(pmsg->parameters[1].c_str(), m_alternativeNick))) { TCHAR m[200]; - mir_sntprintf(m, _T("NICK %s"), m_alternativeNick); + mir_sntprintf(m, L"NICK %s", m_alternativeNick); if (IsConnected()) SendIrcMessage(m); } @@ -1834,8 +1834,8 @@ bool CIrcProto::OnIrc_JOINERROR(const CIrcMessage* pmsg) if (pmsg->m_bIncoming) { DBVARIANT dbv; if (!getTString("JTemp", &dbv)) { - CMString command = _T("a"); - CMString save = _T(""); + CMString command = L"a"; + CMString save = L""; int i = 0; while (!command.IsEmpty()) { @@ -1843,7 +1843,7 @@ bool CIrcProto::OnIrc_JOINERROR(const CIrcMessage* pmsg) i++; if (!command.IsEmpty() && pmsg->parameters[0] == command.Mid(1)) - save += command + _T(" "); + save += command + L" "; } db_free(&dbv); @@ -1862,9 +1862,9 @@ bool CIrcProto::OnIrc_JOINERROR(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_UNKNOWN(const CIrcMessage* pmsg) { if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 0) { - if (pmsg->parameters[0] == _T("WHO") && GetNextUserhostReason(2) != _T("U")) + if (pmsg->parameters[0] == L"WHO" && GetNextUserhostReason(2) != L"U") return true; - if (pmsg->parameters[0] == _T("USERHOST") && GetNextUserhostReason(1) != _T("U")) + if (pmsg->parameters[0] == L"USERHOST" && GetNextUserhostReason(1) != L"U") return true; } ShowMessage(pmsg); @@ -1926,7 +1926,7 @@ bool CIrcProto::OnIrc_WHO_END(const CIrcMessage* pmsg) while (!User.IsEmpty()) { if (GetWord(m_whoReply.c_str(), 3)[0] == 'G') { S += User; - S += _T("\t"); + S += L"\t"; DoEvent(GC_EVENT_SETCONTACTSTATUS, pmsg->parameters[1].c_str(), User.c_str(), NULL, NULL, NULL, ID_STATUS_AWAY, FALSE, FALSE); } else DoEvent(GC_EVENT_SETCONTACTSTATUS, pmsg->parameters[1].c_str(), User.c_str(), NULL, NULL, NULL, ID_STATUS_ONLINE, FALSE, FALSE); @@ -1945,7 +1945,7 @@ bool CIrcProto::OnIrc_WHO_END(const CIrcMessage* pmsg) /// if it is not a channel ptrT UserList(mir_tstrdup(m_whoReply.c_str())); const TCHAR* p1 = UserList; - m_whoReply = _T(""); + m_whoReply = L""; CONTACT ccUser = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, true, false }; MCONTACT hContact = CList_FindContact(&ccUser); @@ -1991,7 +1991,7 @@ bool CIrcProto::OnIrc_WHO_END(const CIrcMessage* pmsg) if (DBWildcard && DBNick && !WCCmp(CharLower(DBWildcard), CharLower(DBNick))) { setTString(hContact, "Nick", DBDefault); - DoUserhostWithReason(2, ((CMString)_T("S") + DBWildcard).c_str(), true, (TCHAR*)DBWildcard); + DoUserhostWithReason(2, ((CMString)L"S" + DBWildcard).c_str(), true, (TCHAR*)DBWildcard); setString(hContact, "User", ""); setString(hContact, "Host", ""); @@ -2015,7 +2015,7 @@ bool CIrcProto::OnIrc_WHO_REPLY(const CIrcMessage* pmsg) { CMString command = PeekAtReasons(2); if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 6 && command[0] == 'S') { - m_whoReply.AppendFormat(_T("%s %s %s %s "), pmsg->parameters[5].c_str(), pmsg->parameters[2].c_str(), pmsg->parameters[3].c_str(), pmsg->parameters[6].c_str()); + m_whoReply.AppendFormat(L"%s %s %s %s ", pmsg->parameters[5].c_str(), pmsg->parameters[2].c_str(), pmsg->parameters[3].c_str(), pmsg->parameters[6].c_str()); if (mir_tstrcmpi(pmsg->parameters[5].c_str(), m_info.sNick.c_str()) == 0) { TCHAR host[1024]; mir_tstrncpy(host, pmsg->parameters[3].c_str(), 1024); @@ -2030,12 +2030,12 @@ bool CIrcProto::OnIrc_WHO_REPLY(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_TRYAGAIN(const CIrcMessage* pmsg) { - CMString command = _T(""); + CMString command = L""; if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 1) { - if (pmsg->parameters[1] == _T("WHO")) + if (pmsg->parameters[1] == L"WHO") command = GetNextUserhostReason(2); - if (pmsg->parameters[1] == _T("USERHOST")) + if (pmsg->parameters[1] == L"USERHOST") command = GetNextUserhostReason(1); } if (command[0] == 'U') @@ -2048,7 +2048,7 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg) CMString command; if (pmsg->m_bIncoming) { command = GetNextUserhostReason(1); - if (!command.IsEmpty() && command != _T("U") && pmsg->parameters.getCount() > 1) { + if (!command.IsEmpty() && command != L"U" && pmsg->parameters.getCount() > 1) { CONTACT finduser = { NULL, NULL, NULL, false, false, false }; int awaystatus = 0; CMString sTemp; @@ -2096,8 +2096,8 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg) user = p2; nick = p1; } - mess = _T(""); - mask = nick + _T("!") + user + _T("@") + host; + mess = L""; + mask = nick + L"!" + user + L"@" + host; if (host.IsEmpty() || user.IsEmpty() || nick.IsEmpty()) { mir_free(p1); continue; @@ -2126,32 +2126,32 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg) break; case 'I': // m_ignore - mess = _T("/IGNORE %question=\""); + mess = L"/IGNORE %question=\""; mess += TranslateT("Please enter the hostmask (nick!user@host)\nNOTE! Contacts on your contact list are never ignored"); - mess += (CMString)_T("\",\"") + TranslateT("Ignore") + _T("\",\"*!*@") + host + _T("\""); + mess += (CMString)L"\",\"" + TranslateT("Ignore") + L"\",\"*!*@" + host + L"\""; if (m_ignoreChannelDefault) - mess += _T(" +qnidcm"); + mess += L" +qnidcm"; else - mess += _T(" +qnidc"); + mess += L" +qnidc"; break; case 'J': // Unignore - mess = _T("/UNIGNORE *!*@") + host; + mess = L"/UNIGNORE *!*@" + host; break; case 'B': // Ban channel = (command.c_str() + 1); - mess = _T("/MODE ") + channel + _T(" +b *!*@") + host; + mess = L"/MODE " + channel + L" +b *!*@" + host; break; case 'K': // Ban & Kick channel = (command.c_str() + 1); - mess.Format(_T("/MODE %s +b *!*@%s%%newl/KICK %s %s"), channel.c_str(), host.c_str(), channel.c_str(), nick.c_str()); + mess.Format(L"/MODE %s +b *!*@%s%%newl/KICK %s %s", channel.c_str(), host.c_str(), channel.c_str(), nick.c_str()); break; case 'L': // Ban & Kick with reason channel = (command.c_str() + 1); - mess.Format(_T("/MODE %s +b *!*@%s%%newl/KICK %s %s %%question=\"%s\",\"%s\",\"%s\""), + mess.Format(L"/MODE %s +b *!*@%s%%newl/KICK %s %s %%question=\"%s\",\"%s\",\"%s\"", channel.c_str(), host.c_str(), channel.c_str(), nick.c_str(), TranslateT("Please enter the reason"), TranslateT("Ban'n Kick"), TranslateT("Jerk")); break; @@ -2177,14 +2177,14 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg) } } - if (!pmsg->m_bIncoming || command == _T("U")) + if (!pmsg->m_bIncoming || command == L"U") ShowMessage(pmsg); return true; } bool CIrcProto::OnIrc_SUPPORT(const CIrcMessage* pmsg) { - static const TCHAR *lpszFmt = _T("Try server %99[^ ,], port %19s"); + static const TCHAR *lpszFmt = L"Try server %99[^ ,], port %19s"; TCHAR szAltServer[100]; TCHAR szAltPort[20]; if (pmsg->parameters.getCount() > 1 && _stscanf(pmsg->parameters[1].c_str(), lpszFmt, &szAltServer, &szAltPort) == 2) { @@ -2204,19 +2204,19 @@ bool CIrcProto::OnIrc_SUPPORT(const CIrcMessage* pmsg) CMString S; for (int i = 0; i < pmsg->parameters.getCount(); i++) { TCHAR* temp = mir_tstrdup(pmsg->parameters[i].c_str()); - if (_tcsstr(temp, _T("CHANTYPES="))) { + if (_tcsstr(temp, L"CHANTYPES=")) { TCHAR* p1 = _tcschr(temp, '='); p1++; if (mir_tstrlen(p1) > 0) sChannelPrefixes = p1; } - if (_tcsstr(temp, _T("CHANMODES="))) { + if (_tcsstr(temp, L"CHANMODES=")) { TCHAR* p1 = _tcschr(temp, '='); p1++; if (mir_tstrlen(p1) > 0) sChannelModes = (char*)_T2A(p1); } - if (_tcsstr(temp, _T("PREFIX="))) { + if (_tcsstr(temp, L"PREFIX=")) { TCHAR* p1 = _tcschr(temp, '('); TCHAR* p2 = _tcschr(temp, ')'); if (p1 && p2) { @@ -2268,7 +2268,7 @@ void CIrcProto::OnIrcDefault(const CIrcMessage* pmsg) void CIrcProto::OnIrcDisconnected() { - m_statusMessage = _T(""); + m_statusMessage = L""; db_unset(NULL, m_szModuleName, "JTemp"); bTempDisableCheck = false; bTempForceCheck = false; @@ -2286,7 +2286,7 @@ void CIrcProto::OnIrcDisconnected() m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)Temp, ID_STATUS_OFFLINE); - CMString sDisconn = _T("\035\002"); + CMString sDisconn = L"\035\002"; sDisconn += TranslateT("*Disconnected*"); DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, sDisconn.c_str(), NULL, NULL, NULL, true, false); @@ -2339,7 +2339,7 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)Temp, m_iStatus); if (m_iDesiredStatus == ID_STATUS_AWAY) - PostIrcMessage(_T("/AWAY %s"), m_statusMessage.Mid(0, 450)); + PostIrcMessage(L"/AWAY %s", m_statusMessage.Mid(0, 450)); if (m_perform) { DoPerform("ALL NETWORKS"); @@ -2362,14 +2362,14 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.iType == GCW_CHATROOM) { CHANNELINFO *wi = (CHANNELINFO*)gci.dwItemData; if (wi && wi->pszPassword) - PostIrcMessage(_T("/JOIN %s %s"), gci.pszName, wi->pszPassword); + PostIrcMessage(L"/JOIN %s %s", gci.pszName, wi->pszPassword); else - PostIrcMessage(_T("/JOIN %s"), gci.pszName); + PostIrcMessage(L"/JOIN %s", gci.pszName); } } } - DoEvent(GC_EVENT_ADDGROUP, SERVERWINDOW, NULL, NULL, _T("Normal"), NULL, NULL, FALSE, TRUE); + DoEvent(GC_EVENT_ADDGROUP, SERVERWINDOW, NULL, NULL, L"Normal", NULL, NULL, FALSE, TRUE); { GCDEST gcd = { m_szModuleName, SERVERWINDOW, GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -2394,7 +2394,7 @@ int CIrcProto::DoPerform(const char* event) DBVARIANT dbv; if (!getTString(sSetting.c_str(), &dbv)) { - if (!my_strstri(dbv.ptszVal, _T("/away"))) + if (!my_strstri(dbv.ptszVal, L"/away")) PostIrcMessageWnd(NULL, NULL, dbv.ptszVal); else mir_forkthread(AwayWarningThread, NULL); @@ -2406,7 +2406,7 @@ int CIrcProto::DoPerform(const char* event) int CIrcProto::IsIgnored(const CMString& nick, const CMString& address, const CMString& host, char type) { - return IsIgnored(nick + _T("!") + address + _T("@") + host, type); + return IsIgnored(nick + L"!" + address + L"@" + host, type); } int CIrcProto::IsIgnored(CMString user, char type) @@ -2440,7 +2440,7 @@ int CIrcProto::IsIgnored(CMString user, char type) bool CIrcProto::AddIgnore(const TCHAR* mask, const TCHAR* flags, const TCHAR* network) { RemoveIgnore(mask); - m_ignoreItems.insert(new CIrcIgnoreItem(mask, (_T("+") + CMString(flags)).c_str(), network)); + m_ignoreItems.insert(new CIrcIgnoreItem(mask, (L"+" + CMString(flags)).c_str(), network)); RewriteIgnoreSettings(); if (m_ignoreDlg) diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp index ef2611db39..d8204e63dc 100644 --- a/protocols/IRCG/src/input.cpp +++ b/protocols/IRCG/src/input.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" #include "version.h" -#define NICKSUBSTITUTE _T("!_nick_!") +#define NICKSUBSTITUTE L"!_nick_!" void CIrcProto::FormatMsg(CMString& text) { @@ -30,25 +30,25 @@ void CIrcProto::FormatMsg(CMString& text) mir_tstrncpy(temp, GetWord(text.c_str(), 0).c_str(), 29); CharLower(temp); CMString command = temp; - CMString S = _T(""); - if (command == _T("/quit") || command == _T("/away")) - S = GetWord(text.c_str(), 0) + _T(" :") + GetWordAddress(text.c_str(), 1); - else if (command == _T("/privmsg") || command == _T("/part") || command == _T("/topic") || command == _T("/notice")) { - S = GetWord(text.c_str(), 0) + _T(" ") + GetWord(text.c_str(), 1) + _T(" :"); + CMString S = L""; + if (command == L"/quit" || command == L"/away") + S = GetWord(text.c_str(), 0) + L" :" + GetWordAddress(text.c_str(), 1); + else if (command == L"/privmsg" || command == L"/part" || command == L"/topic" || command == L"/notice") { + S = GetWord(text.c_str(), 0) + L" " + GetWord(text.c_str(), 1) + L" :"; if (!GetWord(text.c_str(), 2).IsEmpty()) S += CMString(GetWordAddress(text.c_str(), 2)); } - else if (command == _T("/kick")) { - S = GetWord(text.c_str(), 0) + _T(" ") + GetWord(text.c_str(), 1) + _T(" ") + GetWord(text.c_str(), 2) + _T(" :") + GetWordAddress(text.c_str(), 3); + else if (command == L"/kick") { + S = GetWord(text.c_str(), 0) + L" " + GetWord(text.c_str(), 1) + L" " + GetWord(text.c_str(), 2) + L" :" + GetWordAddress(text.c_str(), 3); } - else if (command == _T("/nick")) { + else if (command == L"/nick") { if (!_tcsstr(GetWord(text.c_str(), 1).c_str(), NICKSUBSTITUTE)) { sNick4Perform = GetWord(text.c_str(), 1); S = GetWordAddress(text.c_str(), 0); } else { CMString sNewNick = GetWord(text.c_str(), 1); - if (sNick4Perform == _T("")) { + if (sNick4Perform == L"") { DBVARIANT dbv; if (!getTString("PNick", &dbv)) { sNick4Perform = dbv.ptszVal; @@ -57,7 +57,7 @@ void CIrcProto::FormatMsg(CMString& text) } sNewNick.Replace(NICKSUBSTITUTE, sNick4Perform.c_str()); - S = GetWord(text.c_str(), 0) + _T(" ") + sNewNick; + S = GetWord(text.c_str(), 0) + L" " + sNewNick; } } else S = GetWordAddress(text.c_str(), 0); @@ -68,17 +68,17 @@ void CIrcProto::FormatMsg(CMString& text) static void AddCR(CMString& text) { - text.Replace(_T("\n"), _T("\r\n")); - text.Replace(_T("\r\r"), _T("\r")); + text.Replace(L"\n", L"\r\n"); + text.Replace(L"\r\r", L"\r"); } CMString CIrcProto::DoAlias(const TCHAR *text, TCHAR *window) { - CMString Messageout = _T(""); + CMString Messageout = L""; const TCHAR* p1 = text; const TCHAR* p2 = text; bool LinebreakFlag = false, hasAlias = false; - p2 = _tcsstr(p1, _T("\r\n")); + p2 = _tcsstr(p1, L"\r\n"); if (!p2) p2 = _tcschr(p1, '\0'); if (p1 == p2) @@ -86,7 +86,7 @@ CMString CIrcProto::DoAlias(const TCHAR *text, TCHAR *window) do { if (LinebreakFlag) - Messageout += _T("\r\n"); + Messageout += L"\r\n"; TCHAR* line = new TCHAR[p2 - p1 + 1]; mir_tstrncpy(line, p1, p2 - p1 + 1); @@ -100,42 +100,42 @@ CMString CIrcProto::DoAlias(const TCHAR *text, TCHAR *window) line = new TCHAR[S.GetLength() + 2]; mir_tstrncpy(line, S.c_str(), S.GetLength() + 1); CMString alias(m_alias); - const TCHAR* p3 = _tcsstr(alias.c_str(), (GetWord(line, 0) + _T(" ")).c_str()); + const TCHAR* p3 = _tcsstr(alias.c_str(), (GetWord(line, 0) + L" ").c_str()); if (p3 != alias.c_str()) { - CMString str = _T("\r\n"); - str += GetWord(line, 0) + _T(" "); + CMString str = L"\r\n"; + str += GetWord(line, 0) + L" "; p3 = _tcsstr(alias.c_str(), str.c_str()); if (p3) p3 += 2; } if (p3 != NULL) { hasAlias = true; - const TCHAR* p4 = _tcsstr(p3, _T("\r\n")); + const TCHAR* p4 = _tcsstr(p3, L"\r\n"); if (!p4) p4 = _tcschr(p3, '\0'); *(TCHAR*)p4 = 0; CMString str = p3; - str.Replace(_T("##"), window); - str.Replace(_T("$?"), _T("%question")); + str.Replace(L"##", window); + str.Replace(L"$?", L"%question"); TCHAR buf[5]; for (int index = 1; index < 8; index++) { - mir_sntprintf(buf, _T("#$%u"), index); + mir_sntprintf(buf, L"#$%u", index); if (!GetWord(line, index).IsEmpty() && IsChannel(GetWord(line, index))) str.Replace(buf, GetWord(line, index).c_str()); else { - CMString S1 = _T("#"); + CMString S1 = L"#"; S1 += GetWord(line, index); str.Replace(buf, S1.c_str()); } } for (int index2 = 1; index2 < 8; index2++) { - mir_sntprintf(buf, _T("$%u-"), index2); + mir_sntprintf(buf, L"$%u-", index2); str.Replace(buf, GetWordAddress(line, index2)); } for (int index3 = 1; index3 < 8; index3++) { - mir_sntprintf(buf, _T("$%u"), index3); + mir_sntprintf(buf, L"$%u", index3); str.Replace(buf, GetWord(line, index3).c_str()); } Messageout += GetWordAddress(str.c_str(), 1); @@ -147,7 +147,7 @@ CMString CIrcProto::DoAlias(const TCHAR *text, TCHAR *window) p1 = p2; if (*p1 == '\r') p1 += 2; - p2 = _tcsstr(p1, _T("\r\n")); + p2 = _tcsstr(p1, L"\r\n"); if (!p2) p2 = _tcschr(p1, '\0'); delete[] line; @@ -164,32 +164,32 @@ CMString CIrcProto::DoIdentifiers(CMString text, const TCHAR*) TCHAR str[2]; GetLocalTime(&time); - text.Replace(_T("%mnick"), m_nick); - text.Replace(_T("%anick"), m_alternativeNick); - text.Replace(_T("%awaymsg"), m_statusMessage.c_str()); - text.Replace(_T("%module"), _A2T(m_szModuleName)); - text.Replace(_T("%name"), m_name); - text.Replace(_T("%newl"), _T("\r\n")); - text.Replace(_T("%network"), m_info.sNetwork.c_str()); - text.Replace(_T("%me"), m_info.sNick.c_str()); + text.Replace(L"%mnick", m_nick); + text.Replace(L"%anick", m_alternativeNick); + text.Replace(L"%awaymsg", m_statusMessage.c_str()); + text.Replace(L"%module", _A2T(m_szModuleName)); + text.Replace(L"%name", m_name); + text.Replace(L"%newl", L"\r\n"); + text.Replace(L"%network", m_info.sNetwork.c_str()); + text.Replace(L"%me", m_info.sNick.c_str()); char mirver[100]; CallService(MS_SYSTEM_GETVERSIONTEXT, _countof(mirver), LPARAM(mirver)); - text.Replace(_T("%mirver"), _A2T(mirver)); + text.Replace(L"%mirver", _A2T(mirver)); - text.Replace(_T("%version"), _T(__VERSION_STRING_DOTS)); + text.Replace(L"%version", _T(__VERSION_STRING_DOTS)); str[0] = 3; str[1] = '\0'; - text.Replace(_T("%color"), str); + text.Replace(L"%color", str); str[0] = 2; - text.Replace(_T("%bold"), str); + text.Replace(L"%bold", str); str[0] = 31; - text.Replace(_T("%underline"), str); + text.Replace(L"%underline", str); str[0] = 22; - text.Replace(_T("%italics"), str); + text.Replace(L"%italics", str); return text; } @@ -218,19 +218,19 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta CMString three = GetWord(text, 3); CMString therest = GetWordAddress(text, 4); - if (command == _T("/servershow") || command == _T("/serverhide")) { + if (command == L"/servershow" || command == L"/serverhide") { if (m_useServer) { GCDEST gcd = { m_szModuleName, SERVERWINDOW, GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; - CallChatEvent(command == _T("/servershow") ? WINDOW_VISIBLE : WINDOW_HIDDEN, (LPARAM)&gce); + CallChatEvent(command == L"/servershow" ? WINDOW_VISIBLE : WINDOW_HIDDEN, (LPARAM)&gce); } return true; } - else if (command == _T("/sleep") || command == _T("/wait")) { + else if (command == L"/sleep" || command == L"/wait") { if (!one.IsEmpty()) { int ms; - if (_stscanf(one.c_str(), _T("%d"), &ms) == 1 && ms > 0 && ms <= 4000) + if (_stscanf(one.c_str(), L"%d", &ms) == 1 && ms > 0 && ms <= 4000) Sleep(ms); else DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Incorrect parameters. Usage: /sleep [ms], ms should be greater than 0 and less than 4000."), NULL, NULL, NULL, true, false); @@ -238,10 +238,10 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true; } - if (command == _T("/clear")) { + if (command == L"/clear") { CMString S; if (!one.IsEmpty()) { - if (one == _T("server")) + if (one == L"server") S = SERVERWINDOW; else S = MakeWndID(one.c_str()); @@ -257,7 +257,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true; } - if (command == _T("/ignore")) { + if (command == L"/ignore") { if (IsConnected()) { CMString IgnoreFlags; TCHAR temp[500]; @@ -268,18 +268,18 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Ignore system is disabled"), NULL, NULL, NULL, true, false); return true; } - if (!mir_tstrcmpi(one.c_str(), _T("on"))) { + if (!mir_tstrcmpi(one.c_str(), L"on")) { m_ignore = 1; DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Ignore system is enabled"), NULL, NULL, NULL, true, false); return true; } - if (!mir_tstrcmpi(one.c_str(), _T("off"))) { + if (!mir_tstrcmpi(one.c_str(), L"off")) { m_ignore = 0; DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Ignore system is disabled"), NULL, NULL, NULL, true, false); return true; } if (!_tcschr(one.c_str(), '!') && !_tcschr(one.c_str(), '@')) - one += _T("!*@*"); + one += L"!*@*"; if (!two.IsEmpty() && two[0] == '+') { if (_tcschr(two.c_str(), 'q')) @@ -295,7 +295,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta if (_tcschr(two.c_str(), 'm')) IgnoreFlags += 'm'; } - else IgnoreFlags = _T("qnidc"); + else IgnoreFlags = L"qnidc"; CMString szNetwork; if (three.IsEmpty()) @@ -311,9 +311,9 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true; } - if (command == _T("/unignore")) { + if (command == L"/unignore") { if (!_tcschr(one.c_str(), '!') && !_tcschr(one.c_str(), '@')) - one += _T("!*@*"); + one += L"!*@*"; TCHAR temp[500]; if (RemoveIgnore(one.c_str())) @@ -324,15 +324,15 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true; } - if (command == _T("/userhost")) { + if (command == L"/userhost") { if (one.IsEmpty()) return true; - DoUserhostWithReason(1, _T("U"), false, command); + DoUserhostWithReason(1, L"U", false, command); return false; } - if (command == _T("/joinx")) { + if (command == L"/joinx") { if (!one.IsEmpty()) { for (int i = 1;; i++) { CMString tmp = GetWord(text, i); @@ -342,12 +342,12 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta AddToJTemp('X', tmp); } - PostIrcMessage(_T("/JOIN %s"), GetWordAddress(text, 1)); + PostIrcMessage(L"/JOIN %s", GetWordAddress(text, 1)); } return true; } - if (command == _T("/joinm")) { + if (command == L"/joinm") { if (!one.IsEmpty()) { for (int i = 1;; i++) { CMString tmp = GetWord(text, i); @@ -357,12 +357,12 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta AddToJTemp('M', tmp); } - PostIrcMessage(_T("/JOIN %s"), GetWordAddress(text, 1)); + PostIrcMessage(L"/JOIN %s", GetWordAddress(text, 1)); } return true; } - if (command == _T("/nusers")) { + if (command == L"/nusers") { TCHAR szTemp[40]; CMString S = MakeWndID(window); GC_INFO gci = { 0 }; @@ -370,22 +370,22 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta gci.pszModule = m_szModuleName; gci.pszID = S.c_str(); if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) - mir_sntprintf(szTemp, _T("users: %u"), gci.iCount); + mir_sntprintf(szTemp, L"users: %u", gci.iCount); DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), szTemp, NULL, NULL, NULL, true, false); return true; } - if (command == _T("/echo")) { + if (command == L"/echo") { if (one.IsEmpty()) return true; - if (!mir_tstrcmpi(one.c_str(), _T("on"))) { + if (!mir_tstrcmpi(one.c_str(), L"on")) { bEcho = TRUE; DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Outgoing commands are shown"), NULL, NULL, NULL, true, false); } - if (!mir_tstrcmpi(one.c_str(), _T("off"))) { + if (!mir_tstrcmpi(one.c_str(), L"off")) { DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Outgoing commands are not shown"), NULL, NULL, NULL, true, false); bEcho = FALSE; } @@ -393,7 +393,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true; } - if (command == _T("/buddycheck")) { + if (command == L"/buddycheck") { if (one.IsEmpty()) { if ((m_autoOnlineNotification && !bTempDisableCheck) || bTempForceCheck) DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("The buddy check function is enabled"), NULL, NULL, NULL, true, false); @@ -401,17 +401,17 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("The buddy check function is disabled"), NULL, NULL, NULL, true, false); return true; } - if (!mir_tstrcmpi(one.c_str(), _T("on"))) { + if (!mir_tstrcmpi(one.c_str(), L"on")) { bTempForceCheck = true; bTempDisableCheck = false; CallFunctionAsync(sttSetTimerOn, this); } - if (!mir_tstrcmpi(one.c_str(), _T("off"))) { + if (!mir_tstrcmpi(one.c_str(), L"off")) { bTempForceCheck = false; bTempDisableCheck = true; CallFunctionAsync(sttSetTimerOff, this); } - if (!mir_tstrcmpi(one.c_str(), _T("time")) && !two.IsEmpty()) { + if (!mir_tstrcmpi(one.c_str(), L"time") && !two.IsEmpty()) { m_iTempCheckTime = _ttoi(two.c_str()); if (m_iTempCheckTime < 10 && m_iTempCheckTime != 0) m_iTempCheckTime = 10; @@ -427,14 +427,14 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true; } - if (command == _T("/whois")) { + if (command == L"/whois") { if (one.IsEmpty()) return false; m_manualWhoisCount++; return false; } - if (command == _T("/channelmanager")) { + if (command == L"/channelmanager") { if (window && !hContact && IsChannel(window)) { if (IsConnected()) { if (m_managerDlg != NULL) { @@ -452,26 +452,26 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true; } - if (command == _T("/who")) { + if (command == L"/who") { if (one.IsEmpty()) return true; - DoUserhostWithReason(2, _T("U"), false, _T("%s"), one.c_str()); + DoUserhostWithReason(2, L"U", false, L"%s", one.c_str()); return false; } - if (command == _T("/hop")) { + if (command == L"/hop") { if (!IsChannel(window)) return true; - PostIrcMessage(_T("/PART %s"), window); + PostIrcMessage(L"/PART %s", window); if ((one.IsEmpty() || !IsChannel(one))) { CHANNELINFO *wi = (CHANNELINFO *)DoEvent(GC_EVENT_GETITEMDATA, window, NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, 0); if (wi && wi->pszPassword) - PostIrcMessage(_T("/JOIN %s %s"), window, wi->pszPassword); + PostIrcMessage(L"/JOIN %s %s", window, wi->pszPassword); else - PostIrcMessage(_T("/JOIN %s"), window); + PostIrcMessage(L"/JOIN %s", window); return true; } @@ -480,11 +480,11 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta GCEVENT gce = { sizeof(gce), &gcd }; CallChatEvent(SESSION_TERMINATE, (LPARAM)&gce); - PostIrcMessage(_T("/JOIN %s"), GetWordAddress(text, 1)); + PostIrcMessage(L"/JOIN %s", GetWordAddress(text, 1)); return true; } - if (command == _T("/list")) { + if (command == L"/list") { if (m_listDlg == NULL) { m_listDlg = new CListDlg(this); m_listDlg->Show(); @@ -496,55 +496,55 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta CMString szMsg(FORMAT, TranslateT("This command is not recommended on a network of this size!\r\nIt will probably cause high CPU usage and/or high bandwidth\r\nusage for around %u to %u minute(s).\r\n\r\nDo you want to continue?"), minutes2, minutes); if (m_noOfChannels < 4000 || (m_noOfChannels >= 4000 && MessageBox(NULL, szMsg, TranslateT("IRC warning"), MB_YESNO | MB_ICONWARNING | MB_DEFBUTTON2) == IDYES)) { ListView_DeleteAllItems(GetDlgItem(m_listDlg->GetHwnd(), IDC_INFO_LISTVIEW)); - PostIrcMessage(_T("/lusers")); + PostIrcMessage(L"/lusers"); return false; } m_listDlg->m_status.SetText(TranslateT("Aborted")); return true; } - if (command == _T("/me")) { + if (command == L"/me") { if (one.IsEmpty()) return true; TCHAR szTemp[4000]; - mir_sntprintf(szTemp, _T("\001ACTION %s\001"), GetWordAddress(text.c_str(), 1)); + mir_sntprintf(szTemp, L"\001ACTION %s\001", GetWordAddress(text.c_str(), 1)); PostIrcMessageWnd(window, hContact, szTemp); return true; } - if (command == _T("/ame")) { + if (command == L"/ame") { if (one.IsEmpty()) return true; - CMString S = _T("/ME ") + DoIdentifiers(GetWordAddress(text.c_str(), 1), window); - S.Replace(_T("%"), _T("%%")); + CMString S = L"/ME " + DoIdentifiers(GetWordAddress(text.c_str(), 1), window); + S.Replace(L"%", L"%%"); DoEvent(GC_EVENT_SENDMESSAGE, NULL, NULL, S.c_str(), NULL, NULL, NULL, FALSE, FALSE); return true; } - if (command == _T("/amsg")) { + if (command == L"/amsg") { if (one.IsEmpty()) return true; CMString S = DoIdentifiers(GetWordAddress(text.c_str(), 1), window); - S.Replace(_T("%"), _T("%%")); + S.Replace(L"%", L"%%"); DoEvent(GC_EVENT_SENDMESSAGE, NULL, NULL, S.c_str(), NULL, NULL, NULL, FALSE, FALSE); return true; } - if (command == _T("/msg")) { + if (command == L"/msg") { if (one.IsEmpty() || two.IsEmpty()) return true; TCHAR szTemp[4000]; - mir_sntprintf(szTemp, _T("/PRIVMSG %s"), GetWordAddress(text.c_str(), 1)); + mir_sntprintf(szTemp, L"/PRIVMSG %s", GetWordAddress(text.c_str(), 1)); PostIrcMessageWnd(window, hContact, szTemp); return true; } - if (command == _T("/query")) { + if (command == L"/query") { if (one.IsEmpty() || IsChannel(one.c_str())) return true; @@ -552,17 +552,17 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta MCONTACT hContact2 = CList_AddContact(&user, false, false); if (hContact2) { if (getByte(hContact, "AdvancedMode", 0) == 0) - DoUserhostWithReason(1, (_T("S") + one).c_str(), true, one.c_str()); + DoUserhostWithReason(1, (L"S" + one).c_str(), true, one.c_str()); else { DBVARIANT dbv1; if (!getTString(hContact, "UWildcard", &dbv1)) { - CMString S = _T("S"); + CMString S = L"S"; S += dbv1.ptszVal; DoUserhostWithReason(2, S.c_str(), true, dbv1.ptszVal); db_free(&dbv1); } else { - CMString S = _T("S"); + CMString S = L"S"; S += one; DoUserhostWithReason(2, S.c_str(), true, one.c_str()); } @@ -573,13 +573,13 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta if (!two.IsEmpty()) { TCHAR szTemp[4000]; - mir_sntprintf(szTemp, _T("/PRIVMSG %s"), GetWordAddress(text.c_str(), 1)); + mir_sntprintf(szTemp, L"/PRIVMSG %s", GetWordAddress(text.c_str(), 1)); PostIrcMessageWnd(window, hContact, szTemp); } return true; } - if (command == _T("/ctcp")) { + if (command == L"/ctcp") { if (one.IsEmpty() || two.IsEmpty()) return true; @@ -591,15 +591,15 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta ulAdr = ConvertIPToInteger(m_IPFromServer ? m_myHost : m_myLocalHost); // if it is not dcc or if it is dcc and a local ip exist - if (mir_tstrcmpi(two.c_str(), _T("dcc")) != 0 || ulAdr) { - if (mir_tstrcmpi(two.c_str(), _T("ping")) == 0) - mir_sntprintf(szTemp, _T("/PRIVMSG %s \001%s %u\001"), one.c_str(), two.c_str(), time(0)); + if (mir_tstrcmpi(two.c_str(), L"dcc") != 0 || ulAdr) { + if (mir_tstrcmpi(two.c_str(), L"ping") == 0) + mir_sntprintf(szTemp, L"/PRIVMSG %s \001%s %u\001", one.c_str(), two.c_str(), time(0)); else - mir_sntprintf(szTemp, _T("/PRIVMSG %s \001%s\001"), one.c_str(), GetWordAddress(text.c_str(), 2)); + mir_sntprintf(szTemp, L"/PRIVMSG %s \001%s\001", one.c_str(), GetWordAddress(text.c_str(), 2)); PostIrcMessageWnd(window, hContact, szTemp); } - if (mir_tstrcmpi(two.c_str(), _T("dcc")) != 0) { + if (mir_tstrcmpi(two.c_str(), L"dcc") != 0) { mir_sntprintf(szTemp, TranslateT("CTCP %s request sent to %s"), two.c_str(), one.c_str()); DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, m_info.sNick.c_str(), szTemp, NULL, NULL, NULL, true, false); } @@ -607,11 +607,11 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true; } - if (command == _T("/dcc")) { + if (command == L"/dcc") { if (one.IsEmpty() || two.IsEmpty()) return true; - if (mir_tstrcmpi(one.c_str(), _T("send")) == 0) { + if (mir_tstrcmpi(one.c_str(), L"send") == 0) { TCHAR szTemp[1000]; unsigned long ulAdr = 0; @@ -627,10 +627,10 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta CMString s; if (getByte(ccNew, "AdvancedMode", 0) == 0) - DoUserhostWithReason(1, (_T("S") + two).c_str(), true, two.c_str()); + DoUserhostWithReason(1, (L"S" + two).c_str(), true, two.c_str()); else { DBVARIANT dbv1; - CMString S = _T("S"); + CMString S = L"S"; if (!getTString(ccNew, "UWildcard", &dbv1)) { S += dbv1.ptszVal; DoUserhostWithReason(2, S.c_str(), true, dbv1.ptszVal); @@ -661,7 +661,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true; } - if (mir_tstrcmpi(one.c_str(), _T("chat")) == 0) { + if (mir_tstrcmpi(one.c_str(), L"chat") == 0) { TCHAR szTemp[1000]; unsigned long ulAdr = 0; @@ -693,7 +693,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta } if (iPort != 0) { - PostIrcMessage(_T("/CTCP %s DCC CHAT chat %u %u"), two.c_str(), ulAdr, iPort); + PostIrcMessage(L"/CTCP %s DCC CHAT chat %u %u", two.c_str(), ulAdr, iPort); mir_sntprintf(szTemp, TranslateT("DCC CHAT request sent to %s"), two.c_str(), one.c_str()); DoEvent(GC_EVENT_INFORMATION, 0, m_info.sNick.c_str(), szTemp, NULL, NULL, NULL, true, false); } @@ -735,7 +735,7 @@ static void __stdcall DoInputRequestAliasApcStub(void* _par) TCHAR* title = NULL; TCHAR* defaulttext = NULL; CMString command = (TCHAR*)str; - TCHAR* p = _tcsstr((TCHAR*)str, _T("%question")); + TCHAR* p = _tcsstr((TCHAR*)str, L"%question"); if (p[9] == '=' && p[10] == '\"') { infotext = &p[11]; p = _tcschr(infotext, '\"'); @@ -833,12 +833,12 @@ bool CIrcProto::PostIrcMessageWnd(TCHAR *window, MCONTACT hContact, const TCHAR if (!hContact && IsConnected()) { Message = DoAlias(Message.c_str(), windowname); - if (Message.Find(_T("%question")) != -1) { + if (Message.Find(L"%question") != -1) { CallFunctionAsync(DoInputRequestAliasApcStub, new DoInputRequestParam(this, Message)); return 1; } - Message.Replace(_T("%newl"), _T("\r\n")); + Message.Replace(L"%newl", L"\r\n"); RemoveLinebreaks(Message); } @@ -852,8 +852,8 @@ bool CIrcProto::PostIrcMessageWnd(TCHAR *window, MCONTACT hContact, const TCHAR while (!Message.IsEmpty()) { // split the text into lines, and do an automatic textsplit on long lies as well bool flag = false; - CMString DoThis = _T(""); - int index = Message.Find(_T("\r\n"), 0); + CMString DoThis = L""; + int index = Message.Find(L"\r\n", 0); if (index == -1) index = Message.GetLength(); @@ -861,11 +861,11 @@ bool CIrcProto::PostIrcMessageWnd(TCHAR *window, MCONTACT hContact, const TCHAR index = 432; DoThis = Message.Mid(0, index); Message.Delete(0, index); - if (Message.Find(_T("\r\n"), 0) == 0) + if (Message.Find(L"\r\n", 0) == 0) Message.Delete(0, 2); //do this if it's a /raw - if (IsConnected() && (GetWord(DoThis.c_str(), 0) == _T("/raw") || GetWord(DoThis.c_str(), 0) == _T("/quote"))) { + if (IsConnected() && (GetWord(DoThis.c_str(), 0) == L"/raw" || GetWord(DoThis.c_str(), 0) == L"/quote")) { if (GetWord(DoThis.c_str(), 1).IsEmpty()) continue; @@ -878,11 +878,11 @@ bool CIrcProto::PostIrcMessageWnd(TCHAR *window, MCONTACT hContact, const TCHAR if ((GetWord(DoThis.c_str(), 0)[0] != '/') || // not a command ((GetWord(DoThis.c_str(), 0)[0] == '/') && (GetWord(DoThis.c_str(), 0)[1] == '/')) || // or double backslash at the beginning hContact) { - CMString S = _T("/PRIVMSG "); + CMString S = L"/PRIVMSG "; if (mir_tstrcmpi(window, SERVERWINDOW) == 0 && !m_info.sServerName.IsEmpty()) - S += m_info.sServerName + _T(" ") + DoThis; + S += m_info.sServerName + L" " + DoThis; else - S += CMString(windowname) + _T(" ") + DoThis; + S += CMString(windowname) + L" " + DoThis; DoThis = S; flag = true; diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp index 8d462b3a17..bac5fd2d2b 100644 --- a/protocols/IRCG/src/irclib.cpp +++ b/protocols/IRCG/src/irclib.cpp @@ -68,7 +68,7 @@ CIrcMessage::~CIrcMessage() void CIrcMessage::Reset() { - prefix.sNick = prefix.sUser = prefix.sHost = sCommand = _T(""); + prefix.sNick = prefix.sUser = prefix.sHost = sCommand = L""; m_bIncoming = false; m_bNotify = true; @@ -105,13 +105,13 @@ void CIrcMessage::ParseIrcCommand(const TCHAR* lpszCmdLine) if (*p1 == ':') { // break prefix into its components (nick!user@host) p2 = ++p1; - while (*p2 && !_tcschr(_T(" !"), *p2)) + while (*p2 && !_tcschr(L" !", *p2)) ++p2; prefix.sNick.SetString(p1, p2 - p1); if (*p2 != '!') goto end_of_prefix; p1 = ++p2; - while (*p2 && !_tcschr(_T(" @"), *p2)) + while (*p2 && !_tcschr(L" @", *p2)) ++p2; prefix.sUser.SetString(p1, p2 - p1); if (*p2 != '@') @@ -184,7 +184,7 @@ void CIrcProto::SendIrcMessage(const TCHAR* msg, bool bNotify, int cp) if (bNotify) { CIrcMessage ircMsg(this, msg, cp); - if (!ircMsg.sCommand.IsEmpty() && ircMsg.sCommand != _T("QUIT")) + if (!ircMsg.sCommand.IsEmpty() && ircMsg.sCommand != L"QUIT") Notify(&ircMsg); } } @@ -201,7 +201,7 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info) con = (HANDLE)CallService(MS_NETLIB_OPENCONNECTION, (WPARAM)m_hNetlibUser, (LPARAM)&ncon); if (con == NULL) { TCHAR szTemp[300]; - mir_sntprintf(szTemp, _T("\0035%s \002%s\002 (%S: %u)."), + mir_sntprintf(szTemp, L"\0035%s \002%s\002 (%S: %u).", TranslateT("Failed to connect to"), si.sNetwork.c_str(), si.sServer.c_str(), si.iPort); DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, szTemp, NULL, NULL, NULL, true, false); return false; @@ -230,7 +230,7 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info) Sleep(100); if (info.sPassword.GetLength()) NLSend("PASS %s\r\n", info.sPassword.c_str()); - NLSend(_T("NICK %s\r\n"), info.sNick.c_str()); + NLSend(L"NICK %s\r\n", info.sNick.c_str()); CMString userID = GetWord(info.sUserID.c_str(), 0); TCHAR szHostName[MAX_PATH]; @@ -238,10 +238,10 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info) GetComputerName(szHostName, &cbHostName); CMString HostName = GetWord(szHostName, 0); if (userID.IsEmpty()) - userID = _T("Miranda"); + userID = L"Miranda"; if (HostName.IsEmpty()) - HostName = _T("host"); - NLSend(_T("USER %s %s %s :%s\r\n"), userID.c_str(), HostName.c_str(), _T("server"), info.sFullName.c_str()); + HostName = L"host"; + NLSend(L"USER %s %s %s :%s\r\n", userID.c_str(), HostName.c_str(), L"server", info.sFullName.c_str()); return con != NULL; } @@ -256,7 +256,7 @@ void CIrcProto::Disconnect(void) KillIdent(); if (m_quitMessage[0]) - NLSend(_T("QUIT :%s\r\n"), m_quitMessage); + NLSend(L"QUIT :%s\r\n", m_quitMessage); else NLSend("QUIT \r\n"); @@ -635,18 +635,18 @@ CIrcSessionInfo::CIrcSessionInfo(const CIrcSessionInfo& si) : void CIrcSessionInfo::Reset() { sServer = ""; - sServerName = _T(""); + sServerName = L""; iPort = 0; - sNick = _T(""); - sUserID = _T(""); - sFullName = _T(""); + sNick = L""; + sUserID = L""; + sFullName = L""; sPassword = ""; bIdentServer = false; bNickFlag = false; m_iSSL = 0; - sIdentServerType = _T(""); + sIdentServerType = L""; iIdentServerPort = 0; - sNetwork = _T(""); + sNetwork = L""; } //////////////////////////////////////////////////////////////////// @@ -978,8 +978,8 @@ int CDccSession::SetupConnection() // if spaces in the filename surround with quotes if (sFileWithQuotes.Find(' ', 0) != -1) { - sFileWithQuotes.Insert(0, _T("\"")); - sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), _T("\"")); + sFileWithQuotes.Insert(0, L"\""); + sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), L"\""); } // send out DCC RECV command for passive filetransfers @@ -990,7 +990,7 @@ int CDccSession::SetupConnection() ulAdr = m_proto->m_IPFromServer ? ConvertIPToInteger(m_proto->m_myHost) : nb.dwExternalIP; if (di->iPort && ulAdr) - m_proto->PostIrcMessage(_T("/CTCP %s DCC SEND %s %u %u %I64u %s"), di->sContactName.c_str(), sFileWithQuotes.c_str(), ulAdr, di->iPort, di->dwSize, di->sToken.c_str()); + m_proto->PostIrcMessage(L"/CTCP %s DCC SEND %s %u %u %I64u %s", di->sContactName.c_str(), sFileWithQuotes.c_str(), ulAdr, di->iPort, di->dwSize, di->sToken.c_str()); return TRUE; } diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 4e5c156334..eaa7f8541b 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -219,7 +219,7 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM) CallChatEvent(WINDOW_HIDDEN, (LPARAM)&gce); TCHAR szTemp[MAX_PATH]; - mir_sntprintf(szTemp, _T("%%miranda_path%%\\Plugins\\%S_perform.ini"), m_szModuleName); + mir_sntprintf(szTemp, L"%%miranda_path%%\\Plugins\\%S_perform.ini", m_szModuleName); TCHAR *szLoadFileName = Utils_ReplaceVarsT(szTemp); char* pszPerformData = IrcLoadFile(szLoadFileName); if (pszPerformData != NULL) { @@ -274,13 +274,13 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM) if (m_nick[0]) { TCHAR szBuf[40]; if (mir_tstrlen(m_alternativeNick) == 0) { - mir_sntprintf(szBuf, _T("%s%u"), m_nick, rand() % 9999); + mir_sntprintf(szBuf, L"%s%u", m_nick, rand() % 9999); setTString("AlernativeNick", szBuf); mir_tstrncpy(m_alternativeNick, szBuf, 30); } if (mir_tstrlen(m_name) == 0) { - mir_sntprintf(szBuf, _T("Miranda%u"), rand() % 9999); + mir_sntprintf(szBuf, L"Miranda%u", rand() % 9999); setTString("Name", szBuf); mir_tstrncpy(m_name, szBuf, 200); } @@ -305,7 +305,7 @@ MCONTACT __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr) if (hContact) { DBVARIANT dbv1; - CMString S = _T("S"); + CMString S = L"S"; if (getByte(hContact, "AdvancedMode", 0) == 0) { S += user.name; @@ -323,7 +323,7 @@ MCONTACT __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr) } } if (getByte("MirVerAutoRequest", 1)) - PostIrcMessage(_T("/PRIVMSG %s \001VERSION\001"), user.name); + PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", user.name); } mir_free(id); @@ -421,14 +421,14 @@ int __cdecl CIrcProto::FileResume(HANDLE hTransfer, int* action, const TCHAR** s // if spaces in the filename surround witrh quotes if (sFileWithQuotes.Find(' ', 0) != -1) { - sFileWithQuotes.Insert(0, _T("\"")); - sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), _T("\"")); + sFileWithQuotes.Insert(0, L"\""); + sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), L"\""); } if (di->bReverse) - PostIrcMessage(_T("/PRIVMSG %s \001DCC RESUME %s 0 %I64u %s\001"), di->sContactName.c_str(), sFileWithQuotes.c_str(), dwPos, dcc->di->sToken.c_str()); + PostIrcMessage(L"/PRIVMSG %s \001DCC RESUME %s 0 %I64u %s\001", di->sContactName.c_str(), sFileWithQuotes.c_str(), dwPos, dcc->di->sToken.c_str()); else - PostIrcMessage(_T("/PRIVMSG %s \001DCC RESUME %s %u %I64u\001"), di->sContactName.c_str(), sFileWithQuotes.c_str(), di->iPort, dwPos); + PostIrcMessage(L"/PRIVMSG %s \001DCC RESUME %s %u %I64u\001", di->sContactName.c_str(), sFileWithQuotes.c_str(), di->iPort, dwPos); return 0; } @@ -565,8 +565,8 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz // if spaces in the filename surround witrh quotes if (sFileWithQuotes.Find(' ', 0) != -1) { - sFileWithQuotes.Insert(0, _T("\"")); - sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), _T("\"")); + sFileWithQuotes.Insert(0, L"\""); + sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), L"\""); } dci->hContact = hContact; @@ -584,12 +584,12 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz // need to make sure that %'s are doubled to avoid having chat interpret as color codes CMString sFileCorrect = dci->sFile; - sFileCorrect.Replace(_T("%"), _T("%%")); + sFileCorrect.Replace(L"%", L"%%"); // is it an reverse filetransfer (receiver acts as server) if (dci->bReverse) { TCHAR szTemp[256]; - PostIrcMessage(_T("/CTCP %s DCC SEND %s 200 0 %I64u %u"), + PostIrcMessage(L"/CTCP %s DCC SEND %s 200 0 %I64u %u", dci->sContactName.c_str(), sFileWithQuotes.c_str(), dci->dwSize, dcc->iToken); mir_sntprintf(szTemp, @@ -599,7 +599,7 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz if (m_sendNotice) { mir_sntprintf(szTemp, - _T("/NOTICE %s I am sending the file '\002%s\002' (%I64u kB) to you, please accept it. [Reverse transfer]"), + L"/NOTICE %s I am sending the file '\002%s\002' (%I64u kB) to you, please accept it. [Reverse transfer]", dci->sContactName.c_str(), sFileCorrect.c_str(), dci->dwSize / 1024); PostIrcMessage(szTemp); } @@ -608,7 +608,7 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz iPort = dcc->Connect(); if (iPort) { TCHAR szTemp[256]; - PostIrcMessage(_T("/CTCP %s DCC SEND %s %u %u %I64u"), + PostIrcMessage(L"/CTCP %s DCC SEND %s %u %u %I64u", dci->sContactName.c_str(), sFileWithQuotes.c_str(), ulAdr, iPort, dci->dwSize); mir_sntprintf(szTemp, @@ -618,7 +618,7 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz if (m_sendNotice) { mir_sntprintf(szTemp, - _T("/NOTICE %s I am sending the file '\002%s\002' (%I64u kB) to you, please accept it. [IP: %s]"), + L"/NOTICE %s I am sending the file '\002%s\002' (%I64u kB) to you, please accept it. [IP: %s]", dci->sContactName.c_str(), sFileCorrect.c_str(), dci->dwSize / 1024, (TCHAR*)_A2T(ConvertIntegerToIP(ulAdr))); PostIrcMessage(szTemp); } @@ -631,7 +631,7 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz index++; while (ppszFiles[index]) { if (_taccess(ppszFiles[index], 0) == 0) { - PostIrcMessage(_T("/DCC SEND %s %S"), dci->sContactName.c_str(), ppszFiles[index]); + PostIrcMessage(L"/DCC SEND %s %S", dci->sContactName.c_str(), ppszFiles[index]); } index++; } @@ -753,8 +753,8 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) } else if ((iNewStatus == ID_STATUS_ONLINE || iNewStatus == ID_STATUS_FREECHAT) && IsConnected() && m_iStatus == ID_STATUS_AWAY) //go to online while connected { - m_statusMessage = _T(""); - PostIrcMessage(_T("/AWAY")); + m_statusMessage = L""; + PostIrcMessage(L"/AWAY"); return 0; } else if (iNewStatus == ID_STATUS_OFFLINE && IsConnected()) //go from online/away to offline @@ -765,7 +765,7 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) } else if (iNewStatus == ID_STATUS_AWAY && IsConnected()) //go to away while connected { - PostIrcMessage(_T("/AWAY %s"), m_statusMessage.Mid(0, 450)); + PostIrcMessage(L"/AWAY %s", m_statusMessage.Mid(0, 450)); return 0; } else if (iNewStatus == ID_STATUS_ONLINE && IsConnected()) //already online @@ -781,7 +781,7 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) HANDLE __cdecl CIrcProto::GetAwayMsg(MCONTACT hContact) { - WhoisAwayReply = _T(""); + WhoisAwayReply = L""; DBVARIANT dbv; // bypass chat contacts. @@ -792,7 +792,7 @@ HANDLE __cdecl CIrcProto::GetAwayMsg(MCONTACT hContact) db_free(&dbv); return 0; } - CMString S = _T("WHOIS "); + CMString S = L"WHOIS "; S += dbv.ptszVal; if (IsConnected()) SendIrcMessage(S.c_str(), false); @@ -815,7 +815,7 @@ int __cdecl CIrcProto::SetAwayMsg(int status, const TCHAR* msg) default: CMString newStatus = msg; - newStatus.Replace(_T("\r\n"), _T(" ")); + newStatus.Replace(L"\r\n", L" "); if (m_statusMessage.IsEmpty() || msg == NULL || m_statusMessage != newStatus) { if (msg == NULL || *msg == 0) m_statusMessage = STR_AWAYMESSAGE; @@ -823,7 +823,7 @@ int __cdecl CIrcProto::SetAwayMsg(int status, const TCHAR* msg) m_statusMessage = newStatus; if (m_iStatus == ID_STATUS_AWAY) - PostIrcMessage(_T("/AWAY %s"), m_statusMessage.Mid(0, 450)); + PostIrcMessage(L"/AWAY %s", m_statusMessage.Mid(0, 450)); } } diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 7d13696798..608cd844bb 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -828,10 +828,10 @@ void CCtcpPrefsDlg::OnInitDialog() m_combo.AddStringA("8192"); TCHAR szTemp[10]; - mir_sntprintf(szTemp, _T("%u"), m_proto->m_DCCPacketSize); + mir_sntprintf(szTemp, L"%u", m_proto->m_DCCPacketSize); int i = m_combo.SelectString(szTemp); if (i == CB_ERR) - m_combo.SelectString(_T("4096")); + m_combo.SelectString(L"4096"); if (m_proto->m_DCCChatAccept == 1) m_radio1.SetState(true); @@ -849,14 +849,14 @@ void CCtcpPrefsDlg::OnInitDialog() else { if (m_proto->m_IPFromServer) { if (m_proto->m_myHost[0]) { - CMString s = (CMString)TranslateT("<Resolved IP: ") + (TCHAR*)_A2T(m_proto->m_myHost) + _T(">"); + CMString s = (CMString)TranslateT("<Resolved IP: ") + (TCHAR*)_A2T(m_proto->m_myHost) + L">"; m_ip.SetText(s.c_str()); } else m_ip.SetText(TranslateT("<Automatic>")); } else { if (m_proto->m_myLocalHost[0]) { - CMString s = (CMString)TranslateT("<Local IP: ") + (TCHAR*)_A2T(m_proto->m_myLocalHost) + _T(">"); + CMString s = (CMString)TranslateT("<Local IP: ") + (TCHAR*)_A2T(m_proto->m_myLocalHost) + L">"; m_ip.SetText(s.c_str()); } else m_ip.SetText(TranslateT("<Automatic>")); @@ -874,14 +874,14 @@ void CCtcpPrefsDlg::OnClicked(CCtrlData*) else { if (m_fromServer.GetState()) { if (m_proto->m_myHost[0]) { - CMString s = (CMString)TranslateT("<Resolved IP: ") + (TCHAR*)_A2T(m_proto->m_myHost) + _T(">"); + CMString s = (CMString)TranslateT("<Resolved IP: ") + (TCHAR*)_A2T(m_proto->m_myHost) + L">"; m_ip.SetText(s.c_str()); } else m_ip.SetText(TranslateT("<Automatic>")); } else { if (m_proto->m_myLocalHost[0]) { - CMString s = (CMString)TranslateT("<Local IP: ") + (TCHAR*)_A2T(m_proto->m_myLocalHost) + _T(">"); + CMString s = (CMString)TranslateT("<Local IP: ") + (TCHAR*)_A2T(m_proto->m_myLocalHost) + L">"; m_ip.SetText(s.c_str()); } else m_ip.SetText(TranslateT("<Automatic>")); @@ -1091,7 +1091,7 @@ void COtherPrefsDlg::OnAdd(CCtrlButton*) { TCHAR* temp = m_pertormEdit.GetText(); - if (my_strstri(temp, _T("/away"))) + if (my_strstri(temp, L"/away")) MessageBox(NULL, TranslateT("The usage of /AWAY in your perform buffer is restricted\n as IRC sends this command automatically."), TranslateT("IRC Error"), MB_OK); else { int i = m_performCombo.GetCurSel(); @@ -1113,7 +1113,7 @@ void COtherPrefsDlg::OnDelete(CCtrlButton*) if (i != CB_ERR) { PERFORM_INFO* pPerf = (PERFORM_INFO*)m_performCombo.GetItemData(i); if (pPerf != NULL) { - pPerf->mText = _T(""); + pPerf->mText = L""; m_pertormEdit.SetTextA(""); m_delete.Disable(); m_add.Disable(); @@ -1179,7 +1179,7 @@ void COtherPrefsDlg::addPerformComboValue(int idx, const char* szValueName) pPref = new PERFORM_INFO(sSetting.c_str(), dbv.ptszVal); db_free(&dbv); } - else pPref = new PERFORM_INFO(sSetting.c_str(), _T("")); + else pPref = new PERFORM_INFO(sSetting.c_str(), L""); m_performCombo.SetItemData(idx, (LPARAM)pPref); } @@ -1232,7 +1232,7 @@ void CAddIgnoreDlg::OnOk(CCtrlButton*) CMString Mask = GetWord(szMask, 0); if (Mask.GetLength() != 0) { if (!_tcschr(Mask.c_str(), '!') && !_tcschr(Mask.c_str(), '@')) - Mask += _T("!*@*"); + Mask += L"!*@*"; if (!flags.IsEmpty()) { if (*szOldMask) @@ -1316,7 +1316,7 @@ static LRESULT CALLBACK ListviewSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, void CIrcProto::InitIgnore(void) { TCHAR szTemp[MAX_PATH]; - mir_sntprintf(szTemp, _T("%%miranda_path%%\\Plugins\\%S_ignore.ini"), m_szModuleName); + mir_sntprintf(szTemp, L"%%miranda_path%%\\Plugins\\%S_ignore.ini", m_szModuleName); TCHAR *szLoadFileName = Utils_ReplaceVarsT(szTemp); char* pszIgnoreData = IrcLoadFile(szLoadFileName); if (pszIgnoreData != NULL) { @@ -1383,7 +1383,7 @@ void CIrcProto::RewriteIgnoreSettings(void) mir_snprintf(settingName, "IGNORE:%d", i); CIrcIgnoreItem& C = m_ignoreItems[i]; - setTString(settingName, (C.mask + _T(" ") + C.flags + _T(" ") + C.network).c_str()); + setTString(settingName, (C.mask + L" " + C.flags + L" " + C.network).c_str()); } } @@ -1662,11 +1662,11 @@ int CIrcProto::OnInitOptionsPages(WPARAM wParam, LPARAM) void CIrcProto::InitPrefs(void) { - ConnectSettings[0].defStr = _T("Miranda"); - ConnectSettings[1].defStr = _T("UNIX"); - ConnectSettings[2].defStr = _T("113"); - ConnectSettings[3].defStr = _T("30"); - ConnectSettings[4].defStr = _T("10"); + ConnectSettings[0].defStr = L"Miranda"; + ConnectSettings[1].defStr = L"UNIX"; + ConnectSettings[2].defStr = L"113"; + ConnectSettings[3].defStr = L"30"; + ConnectSettings[4].defStr = L"10"; CtcpSettings[0].defStr = STR_USERINFO; @@ -1701,7 +1701,7 @@ void CIrcProto::InitPrefs(void) m_mySpecifiedHostIP[0] = 0; if (m_alias == NULL) - m_alias = mir_tstrdup(_T("/op /mode ## +ooo $1 $2 $3\r\n/dop /mode ## -ooo $1 $2 $3\r\n/voice /mode ## +vvv $1 $2 $3\r\n/dvoice /mode ## -vvv $1 $2 $3\r\n/j /join #$1 $2-\r\n/p /part ## $1-\r\n/w /whois $1\r\n/k /kick ## $1 $2-\r\n/q /query $1\r\n/logon /log on ##\r\n/logoff /log off ##\r\n/save /log buffer $1\r\n/slap /me slaps $1 around a bit with a large trout")); + m_alias = mir_tstrdup(L"/op /mode ## +ooo $1 $2 $3\r\n/dop /mode ## -ooo $1 $2 $3\r\n/voice /mode ## +vvv $1 $2 $3\r\n/dvoice /mode ## -vvv $1 $2 $3\r\n/j /join #$1 $2-\r\n/p /part ## $1-\r\n/w /whois $1\r\n/k /kick ## $1 $2-\r\n/q /query $1\r\n/logon /log on ##\r\n/logoff /log off ##\r\n/save /log buffer $1\r\n/slap /me slaps $1 around a bit with a large trout"); m_quickComboSelection = getDword("QuickComboSelection", m_serverComboSelection + 1); m_myHost[0] = '\0'; @@ -1821,7 +1821,7 @@ INT_PTR CIrcProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam) static void sttImportIni(const TCHAR* szIniFile) { - FILE* serverFile = _tfopen(szIniFile, _T("r")); + FILE* serverFile = _tfopen(szIniFile, L"r"); if (serverFile == NULL) return; @@ -1847,17 +1847,17 @@ static void sttImportIni(const TCHAR* szIniFile) void InitServers() { - TCHAR *szTemp = Utils_ReplaceVarsT(_T("%miranda_path%\\Plugins\\IRC_servers.ini")); + TCHAR *szTemp = Utils_ReplaceVarsT(L"%miranda_path%\\Plugins\\IRC_servers.ini"); sttImportIni(szTemp); mir_free(szTemp); RereadServers(); if (g_servers.getCount() == 0) { - TCHAR *szIniFile = Utils_ReplaceVarsT(_T("%temp%\\default_servers.ini")); - FILE *serverFile = _tfopen(szIniFile, _T("a")); + TCHAR *szIniFile = Utils_ReplaceVarsT(L"%temp%\\default_servers.ini"); + FILE *serverFile = _tfopen(szIniFile, L"a"); if (serverFile) { - char* pszSvrs = (char*)LockResource(LoadResource(hInst, FindResource(hInst, MAKEINTRESOURCE(IDR_SERVERS), _T("TEXT")))); + char* pszSvrs = (char*)LockResource(LoadResource(hInst, FindResource(hInst, MAKEINTRESOURCE(IDR_SERVERS), L"TEXT"))); if (pszSvrs) fwrite(pszSvrs, 1, mir_strlen(pszSvrs) + 1, serverFile); fclose(serverFile); diff --git a/protocols/IRCG/src/output.cpp b/protocols/IRCG/src/output.cpp index c86d78fb61..8ff9d2a7b8 100644 --- a/protocols/IRCG/src/output.cpp +++ b/protocols/IRCG/src/output.cpp @@ -26,26 +26,26 @@ static CMString FormatOutput(const CIrcMessage* pmsg) CMString sMessage; if (pmsg->m_bIncoming) { // Is it an incoming message? - if (pmsg->sCommand == _T("WALLOPS") && pmsg->parameters.getCount() > 0) { + if (pmsg->sCommand == L"WALLOPS" && pmsg->parameters.getCount() > 0) { TCHAR temp[200]; *temp = '\0'; mir_sntprintf(temp, TranslateT("WallOps from %s: "), pmsg->prefix.sNick.c_str()); sMessage = temp; for (int i = 0; i < (int)pmsg->parameters.getCount(); i++) { sMessage += pmsg->parameters[i]; if (i != pmsg->parameters.getCount() - 1) - sMessage += _T(" "); + sMessage += L" "; } goto THE_END; } - if (pmsg->sCommand == _T("INVITE") && pmsg->parameters.getCount() > 1) { + if (pmsg->sCommand == L"INVITE" && pmsg->parameters.getCount() > 1) { TCHAR temp[256]; *temp = '\0'; mir_sntprintf(temp, TranslateT("%s invites you to %s"), pmsg->prefix.sNick.c_str(), pmsg->parameters[1].c_str()); sMessage = temp; for (int i = 2; i < (int)pmsg->parameters.getCount(); i++) { - sMessage += _T(": ") + pmsg->parameters[i]; + sMessage += L": " + pmsg->parameters[i]; if (i != pmsg->parameters.getCount() - 1) - sMessage += _T(" "); + sMessage += L" "; } goto THE_END; } @@ -56,30 +56,30 @@ static CMString FormatOutput(const CIrcMessage* pmsg) mir_sntprintf(temp, TranslateT("%s is away"), pmsg->parameters[1].c_str()); sMessage = temp; for (int i = 2; i < (int)pmsg->parameters.getCount(); i++) { - sMessage += _T(": ") + pmsg->parameters[i]; + sMessage += L": " + pmsg->parameters[i]; if (i != pmsg->parameters.getCount() - 1) - sMessage += _T(" "); + sMessage += L" "; } goto THE_END; } if ((index == 443 || index == 441) && pmsg->parameters.getCount() > 3) - return pmsg->parameters[1] + _T(" ") + pmsg->parameters[3] + _T(": ") + pmsg->parameters[2]; + return pmsg->parameters[1] + L" " + pmsg->parameters[3] + L": " + pmsg->parameters[2]; if (index == 303) { // ISON command sMessage = TranslateT("These are online: "); for (int i = 1; i < (int)pmsg->parameters.getCount(); i++) { sMessage += pmsg->parameters[i]; if (i != pmsg->parameters.getCount() - 1) - sMessage += _T(", "); + sMessage += L", "; } goto THE_END; } if ((index > 400 || index < 500) && pmsg->parameters.getCount() > 2 && pmsg->sCommand[0] == '4') //all error messages - return pmsg->parameters[2] + _T(": ") + pmsg->parameters[1]; + return pmsg->parameters[2] + L": " + pmsg->parameters[1]; } - else if (pmsg->sCommand == _T("NOTICE") && pmsg->parameters.getCount() > 1) { + else if (pmsg->sCommand == L"NOTICE" && pmsg->parameters.getCount() > 1) { TCHAR temp[500]; *temp = '\0'; int l = pmsg->parameters[1].GetLength(); @@ -89,7 +89,7 @@ static CMString FormatOutput(const CIrcMessage* pmsg) tempstr.Delete(0, 1); tempstr.Delete(tempstr.GetLength() - 1, 1); CMString type = GetWord(tempstr.c_str(), 0); - if (mir_tstrcmpi(type.c_str(), _T("ping")) == 0) + if (mir_tstrcmpi(type.c_str(), L"ping") == 0) mir_sntprintf(temp, TranslateT("CTCP %s reply sent to %s"), type.c_str(), pmsg->parameters[0].c_str()); else mir_sntprintf(temp, TranslateT("CTCP %s reply sent to %s: %s"), type.c_str(), pmsg->parameters[0].c_str(), GetWordAddress(tempstr.c_str(), 1)); @@ -101,7 +101,7 @@ static CMString FormatOutput(const CIrcMessage* pmsg) for (int i = 1; i < (int)pmsg->parameters.getCount(); i++) { sMessage += pmsg->parameters[i]; if (i != pmsg->parameters.getCount() - 1) - sMessage += _T(" "); + sMessage += L" "; } } goto THE_END; @@ -111,18 +111,18 @@ static CMString FormatOutput(const CIrcMessage* pmsg) if (pmsg->m_bIncoming) { if (pmsg->parameters.getCount() < 2 && pmsg->parameters.getCount() > 0) - return pmsg->sCommand + _T(" : ") + pmsg->parameters[0]; + return pmsg->sCommand + L" : " + pmsg->parameters[0]; if (pmsg->parameters.getCount() > 1) for (int i = 1; i < (int)pmsg->parameters.getCount(); i++) - sMessage += pmsg->parameters[i] + _T(" "); + sMessage += pmsg->parameters[i] + L" "; } else { if (pmsg->prefix.sNick.GetLength()) - sMessage = pmsg->prefix.sNick + _T(" "); - sMessage += pmsg->sCommand + _T(" "); + sMessage = pmsg->prefix.sNick + L" "; + sMessage += pmsg->sCommand + L" "; for (int i = 0; i < (int)pmsg->parameters.getCount(); i++) - sMessage += pmsg->parameters[i] + _T(" "); + sMessage += pmsg->parameters[i] + L" "; } THE_END: @@ -134,16 +134,16 @@ BOOL CIrcProto::ShowMessage(const CIrcMessage* pmsg) CMString mess = FormatOutput(pmsg); if (!pmsg->m_bIncoming) - mess.Replace(_T("%%"), _T("%")); + mess.Replace(L"%%", L"%"); int iTemp = _ttoi(pmsg->sCommand.c_str()); //To active window if ((iTemp > 400 || iTemp < 500) && pmsg->sCommand[0] == '4' //all error messages - || pmsg->sCommand == _T("303") //ISON command - || pmsg->sCommand == _T("INVITE") - || ((pmsg->sCommand == _T("NOTICE")) && ((pmsg->parameters.getCount() > 2) ? (_tcsstr(pmsg->parameters[1].c_str(), _T("\001")) == NULL) : false)) // CTCP answers should go to m_network Log window! - || pmsg->sCommand == _T("515")) //chanserv error + || pmsg->sCommand == L"303" //ISON command + || pmsg->sCommand == L"INVITE" + || ((pmsg->sCommand == L"NOTICE") && ((pmsg->parameters.getCount() > 2) ? (_tcsstr(pmsg->parameters[1].c_str(), L"\001") == NULL) : false)) // CTCP answers should go to m_network Log window! + || pmsg->sCommand == L"515") //chanserv error { DoEvent(GC_EVENT_INFORMATION, NULL, pmsg->m_bIncoming ? pmsg->prefix.sNick.c_str() : m_info.sNick.c_str(), mess.c_str(), NULL, NULL, NULL, true, pmsg->m_bIncoming ? false : true); return TRUE; diff --git a/protocols/IRCG/src/scripting.cpp b/protocols/IRCG/src/scripting.cpp index b8cd6b6e7b..ef968fb631 100644 --- a/protocols/IRCG/src/scripting.cpp +++ b/protocols/IRCG/src/scripting.cpp @@ -149,7 +149,7 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) gci.pszID = S.c_str(); if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) { TCHAR szTemp[40]; - mir_sntprintf(szTemp, _T("%u"), gci.iCount); + mir_sntprintf(szTemp, L"%u", gci.iCount); sOutput = szTemp; } } @@ -163,7 +163,7 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) return (INT_PTR)mir_strdup(gci.pszUsers); } else if (sRequest == "channellist") { - CMString S = _T(""); + CMString S = L""; int n = CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)m_szModuleName); if (n >= 0) { int j = 0; @@ -175,10 +175,10 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) { if (mir_tstrcmpi(gci.pszID, SERVERWINDOW)) { CMString S1 = gci.pszID; - int k = S1.Find(_T(" ")); + int k = S1.Find(L" "); if (k != -1) S1 = S1.Mid(0, k); - S += S1 + _T(" "); + S += S1 + L" "; } } j++; diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index d147b48b2e..559e3bf29d 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -201,7 +201,7 @@ int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM) if (!getTString(hContact, "Nick", &dbv)) { int type = getByte(hContact, "ChatRoom", 0); if (type != 0) { - CMString S = _T(""); + CMString S = L""; if (type == GCW_CHATROOM) S = MakeWndID(dbv.ptszVal); if (type == GCW_SERVER) @@ -210,7 +210,7 @@ int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM) GCEVENT gce = { sizeof(gce), &gcd }; int i = CallChatEvent(SESSION_TERMINATE, (LPARAM)&gce); if (i && type == GCW_CHATROOM) - PostIrcMessage(_T("/PART %s %s"), dbv.ptszVal, m_userInfo); + PostIrcMessage(L"/PART %s %s", dbv.ptszVal, m_userInfo); } else { BYTE bDCC = getByte((MCONTACT)wp, "DCC", 0); @@ -234,7 +234,7 @@ INT_PTR __cdecl CIrcProto::OnJoinChat(WPARAM wp, LPARAM) DBVARIANT dbv; if (!getTString((MCONTACT)wp, "Nick", &dbv)) { if (getByte((MCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM) - PostIrcMessage(_T("/JOIN %s"), dbv.ptszVal); + PostIrcMessage(L"/JOIN %s", dbv.ptszVal); db_free(&dbv); } return 0; @@ -248,7 +248,7 @@ INT_PTR __cdecl CIrcProto::OnLeaveChat(WPARAM wp, LPARAM) DBVARIANT dbv; if (!getTString((MCONTACT)wp, "Nick", &dbv)) { if (getByte((MCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM) { - PostIrcMessage(_T("/PART %s %s"), dbv.ptszVal, m_userInfo); + PostIrcMessage(L"/PART %s %s", dbv.ptszVal, m_userInfo); CMString S = MakeWndID(dbv.ptszVal); GCDEST gcd = { m_szModuleName, S.c_str(), GC_EVENT_CONTROL }; @@ -268,7 +268,7 @@ INT_PTR __cdecl CIrcProto::OnMenuChanSettings(WPARAM wp, LPARAM) MCONTACT hContact = (MCONTACT)wp; DBVARIANT dbv; if (!getTString(hContact, "Nick", &dbv)) { - PostIrcMessageWnd(dbv.ptszVal, NULL, _T("/CHANNELMANAGER")); + PostIrcMessageWnd(dbv.ptszVal, NULL, L"/CHANNELMANAGER"); db_free(&dbv); } return 0; @@ -282,7 +282,7 @@ INT_PTR __cdecl CIrcProto::OnMenuWhois(WPARAM wp, LPARAM) DBVARIANT dbv; if (!getTString((MCONTACT)wp, "Nick", &dbv)) { - PostIrcMessage(_T("/WHOIS %s %s"), dbv.ptszVal, dbv.ptszVal); + PostIrcMessage(L"/WHOIS %s %s", dbv.ptszVal, dbv.ptszVal); db_free(&dbv); } return 0; @@ -316,7 +316,7 @@ INT_PTR __cdecl CIrcProto::OnMenuIgnore(WPARAM wp, LPARAM) S = "+qnidcm"; else S = "+qnidc"; - PostIrcMessage(_T("/IGNORE %%question=\"%s\",\"%s\",\"*!*@%S\" %s"), + PostIrcMessage(L"/IGNORE %%question=\"%s\",\"%s\",\"*!*@%S\" %s", TranslateT("Please enter the hostmask (nick!user@host)\nNOTE! Contacts on your contact list are never ignored"), TranslateT("Ignore"), host, S.c_str()); db_free(&dbv1); @@ -361,7 +361,7 @@ INT_PTR __cdecl CIrcProto::OnQuickConnectMenuCommand(WPARAM, LPARAM) INT_PTR __cdecl CIrcProto::OnShowListMenuCommand(WPARAM, LPARAM) { - PostIrcMessage(_T("/LIST")); + PostIrcMessage(L"/LIST"); return 0; } @@ -404,22 +404,22 @@ static void DoChatFormatting(TCHAR* pszText) switch (p1[1]) { case 'B': case 'b': - mir_tstrcpy(InsertThis, _T("\002")); + mir_tstrcpy(InsertThis, L"\002"); iRemoveChars = 2; break; case 'I': case 'i': - mir_tstrcpy(InsertThis, _T("\026")); + mir_tstrcpy(InsertThis, L"\026"); iRemoveChars = 2; break; case 'U': case 'u': - mir_tstrcpy(InsertThis, _T("\037")); + mir_tstrcpy(InsertThis, L"\037"); iRemoveChars = 2; break; case 'c': { - mir_tstrcpy(InsertThis, _T("\003")); + mir_tstrcpy(InsertThis, L"\003"); iRemoveChars = 2; TCHAR szTemp[3]; @@ -429,36 +429,36 @@ static void DoChatFormatting(TCHAR* pszText) break; case 'C': if (p1[2] == '%' && p1[3] == 'F') { - mir_tstrcpy(InsertThis, _T("\x0399,99")); + mir_tstrcpy(InsertThis, L"\x0399,99"); iRemoveChars = 4; } else { - mir_tstrcpy(InsertThis, _T("\x0399")); + mir_tstrcpy(InsertThis, L"\x0399"); iRemoveChars = 2; } iFG = -1; break; case 'f': if (p1 - 3 >= pszText && p1[-3] == '\003') - mir_tstrcpy(InsertThis, _T(",")); + mir_tstrcpy(InsertThis, L","); else if (iFG >= 0) - mir_sntprintf(InsertThis, _T("\x03%u,"), iFG); + mir_sntprintf(InsertThis, L"\x03%u,", iFG); else - mir_tstrcpy(InsertThis, _T("\x0399,")); + mir_tstrcpy(InsertThis, L"\x0399,"); iRemoveChars = 2; break; case 'F': if (iFG >= 0) - mir_sntprintf(InsertThis, _T("\x03%u,99"), iFG); + mir_sntprintf(InsertThis, L"\x03%u,99", iFG); else - mir_tstrcpy(InsertThis, _T("\x0399,99")); + mir_tstrcpy(InsertThis, L"\x0399,99"); iRemoveChars = 2; break; case '%': - mir_tstrcpy(InsertThis, _T("%")); + mir_tstrcpy(InsertThis, L"%"); iRemoveChars = 2; break; @@ -481,7 +481,7 @@ static void DoChatFormatting(TCHAR* pszText) int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) { GCHOOK *gch = (GCHOOK*)lParam; - CMString S = _T(""); + CMString S = L""; mir_cslock lock(m_gchook); @@ -489,7 +489,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) if (gch) { if (!mir_strcmpi(gch->pDest->pszModule, m_szModuleName)) { TCHAR *p1 = mir_tstrdup(gch->pDest->ptszID); - TCHAR *p2 = _tcsstr(p1, _T(" - ")); + TCHAR *p2 = _tcsstr(p1, L" - "); if (p2) *p2 = '\0'; @@ -509,13 +509,13 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) break; case GC_USER_CHANMGR: - PostIrcMessageWnd(p1, NULL, _T("/CHANNELMANAGER")); + PostIrcMessageWnd(p1, NULL, L"/CHANNELMANAGER"); break; case GC_USER_PRIVMESS: { TCHAR szTemp[4000]; - mir_sntprintf(szTemp, _T("/QUERY %s"), gch->ptszUID); + mir_sntprintf(szTemp, L"/QUERY %s", gch->ptszUID); PostIrcMessageWnd(p1, NULL, szTemp); } break; @@ -526,11 +526,11 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) OnChangeNickMenuCommand(NULL, NULL); break; case 2: - PostIrcMessageWnd(p1, NULL, _T("/CHANNELMANAGER")); + PostIrcMessageWnd(p1, NULL, L"/CHANNELMANAGER"); break; case 3: - PostIrcMessage(_T("/PART %s %s"), p1, m_userInfo); + PostIrcMessage(L"/PART %s %s", p1, m_userInfo); { S = MakeWndID(p1); GCDEST gcd = { m_szModuleName, S.c_str(), GC_EVENT_CONTROL }; @@ -539,21 +539,21 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) } break; case 4: // show server window - PostIrcMessageWnd(p1, NULL, _T("/SERVERSHOW")); + PostIrcMessageWnd(p1, NULL, L"/SERVERSHOW"); break; /* case 5: // nickserv register nick - PostIrcMessage( _T("/nickserv REGISTER %%question=\"%s\",\"%s\""), + PostIrcMessage( L"/nickserv REGISTER %%question=\"%s\",\"%s\"", TranslateT("Please enter your authentication code"), TranslateT("Authenticate nick")); break; */ case 6: // nickserv Identify - PostIrcMessage(_T("/nickserv AUTH %%question=\"%s\",\"%s\""), + PostIrcMessage(L"/nickserv AUTH %%question=\"%s\",\"%s\"", TranslateT("Please enter your authentication code"), TranslateT("Authenticate nick")); break; case 7: // nickserv drop nick if (MessageBox(0, TranslateT("Are you sure you want to unregister your current nick?"), TranslateT("Delete nick"), MB_ICONERROR + MB_YESNO + MB_DEFBUTTON2) == IDYES) - PostIrcMessage(_T("/nickserv DROP")); + PostIrcMessage(L"/nickserv DROP"); break; case 8: // nickserv Identify { @@ -563,7 +563,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) HWND hEditCtrl = GetDlgItem(question_hWnd, IDC_EDIT); SetDlgItemText(question_hWnd, IDC_CAPTION, TranslateT("Identify nick")); SetDlgItemText(question_hWnd, IDC_TEXT, TranslateT("Please enter your password")); - SetDlgItemText(question_hWnd, IDC_HIDDENEDIT, _T("/nickserv IDENTIFY %question=\"%s\",\"%s\"")); + SetDlgItemText(question_hWnd, IDC_HIDDENEDIT, L"/nickserv IDENTIFY %question=\"%s\",\"%s\""); SetWindowLongPtr(GetDlgItem(question_hWnd, IDC_EDIT), GWL_STYLE, (LONG)GetWindowLongPtr(GetDlgItem(question_hWnd, IDC_EDIT), GWL_STYLE) | ES_PASSWORD); SendMessage(hEditCtrl, EM_SETPASSWORDCHAR, (WPARAM)_T('*'), 0); @@ -575,75 +575,75 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) { DBVARIANT dbv; if (!getTString("Nick", &dbv)) { - PostIrcMessage(_T("/nickserv SENDPASS %s"), dbv.ptszVal); + PostIrcMessage(L"/nickserv SENDPASS %s", dbv.ptszVal); db_free(&dbv); } } break; case 10: // nickserv set new password - PostIrcMessage(_T("/nickserv SET PASSWORD %%question=\"%s\",\"%s\""), + PostIrcMessage(L"/nickserv SET PASSWORD %%question=\"%s\",\"%s\"", TranslateT("Please enter your new password"), TranslateT("Set new password")); break; case 11: // nickserv set language - PostIrcMessage(_T("/nickserv SET LANGUAGE %%question=\"%s\",\"%s\""), + PostIrcMessage(L"/nickserv SET LANGUAGE %%question=\"%s\",\"%s\"", TranslateT("Please enter desired language ID (numeric value, depends on server)"), TranslateT("Change language of NickServ messages")); break; case 12: // nickserv set homepage - PostIrcMessage(_T("/nickserv SET URL %%question=\"%s\",\"%s\""), + PostIrcMessage(L"/nickserv SET URL %%question=\"%s\",\"%s\"", TranslateT("Please enter URL that will be linked to your nick"), TranslateT("Set URL, linked to nick")); break; case 13: // nickserv set email - PostIrcMessage(_T("/nickserv SET EMAIL %%question=\"%s\",\"%s\""), + PostIrcMessage(L"/nickserv SET EMAIL %%question=\"%s\",\"%s\"", TranslateT("Please enter your e-mail, that will be linked to your nick"), TranslateT("Set e-mail, linked to nick")); break; case 14: // nickserv set info - PostIrcMessage(_T("/nickserv SET INFO %%question=\"%s\",\"%s\""), + PostIrcMessage(L"/nickserv SET INFO %%question=\"%s\",\"%s\"", TranslateT("Please enter some information about your nick"), TranslateT("Set information for nick")); break; case 15: // nickserv kill unauth off - PostIrcMessage(_T("/nickserv SET KILL OFF")); + PostIrcMessage(L"/nickserv SET KILL OFF"); break; case 16: // nickserv kill unauth on - PostIrcMessage(_T("/nickserv SET KILL ON")); + PostIrcMessage(L"/nickserv SET KILL ON"); break; case 17: // nickserv kill unauth quick - PostIrcMessage(_T("/nickserv SET KILL QUICK")); + PostIrcMessage(L"/nickserv SET KILL QUICK"); break; case 18: // nickserv hide nick from /LIST - PostIrcMessage(_T("/nickserv SET PRIVATE ON")); + PostIrcMessage(L"/nickserv SET PRIVATE ON"); break; case 19: // nickserv show nick to /LIST - PostIrcMessage(_T("/nickserv SET PRIVATE OFF")); + PostIrcMessage(L"/nickserv SET PRIVATE OFF"); break; case 20: // nickserv Hide e-mail from info - PostIrcMessage(_T("/nickserv SET HIDE EMAIL ON")); + PostIrcMessage(L"/nickserv SET HIDE EMAIL ON"); break; case 21: // nickserv Show e-mail in info - PostIrcMessage(_T("/nickserv SET HIDE EMAIL OFF")); + PostIrcMessage(L"/nickserv SET HIDE EMAIL OFF"); break; case 22: // nickserv Set security for nick - PostIrcMessage(_T("/nickserv SET SECURE ON")); + PostIrcMessage(L"/nickserv SET SECURE ON"); break; case 23: // nickserv Remove security for nick - PostIrcMessage(_T("/nickserv SET SECURE OFF")); + PostIrcMessage(L"/nickserv SET SECURE OFF"); break; case 24: // nickserv Link nick to current - PostIrcMessage(_T("/nickserv LINK %%question=\"%s\",\"%s\""), + PostIrcMessage(L"/nickserv LINK %%question=\"%s\",\"%s\"", TranslateT("Please enter nick you want to link to your current nick"), TranslateT("Link another nick to current nick")); break; case 25: // nickserv Unlink nick from current - PostIrcMessage(_T("/nickserv LINK %%question=\"%s\",\"%s\""), + PostIrcMessage(L"/nickserv LINK %%question=\"%s\",\"%s\"", TranslateT("Please enter nick you want to unlink from your current nick"), TranslateT("Unlink another nick from current nick")); break; case 26: // nickserv Set main nick - PostIrcMessage(_T("/nickserv LINK %%question=\"%s\",\"%s\""), + PostIrcMessage(L"/nickserv LINK %%question=\"%s\",\"%s\"", TranslateT("Please enter nick you want to set as your main nick"), TranslateT("Set main nick")); break; case 27: // nickserv list all linked nicks - PostIrcMessage(_T("/nickserv LISTLINKS")); + PostIrcMessage(L"/nickserv LISTLINKS"); break; case 28: // nickserv list all channels owned - PostIrcMessage(_T("/nickserv LISTCHANS")); + PostIrcMessage(L"/nickserv LISTCHANS"); break; } break; @@ -651,35 +651,35 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) case GC_USER_NICKLISTMENU: switch (gch->dwData) { case 1: - PostIrcMessage(_T("/MODE %s +o %s"), p1, gch->ptszUID); + PostIrcMessage(L"/MODE %s +o %s", p1, gch->ptszUID); break; case 2: - PostIrcMessage(_T("/MODE %s -o %s"), p1, gch->ptszUID); + PostIrcMessage(L"/MODE %s -o %s", p1, gch->ptszUID); break; case 3: - PostIrcMessage(_T("/MODE %s +v %s"), p1, gch->ptszUID); + PostIrcMessage(L"/MODE %s +v %s", p1, gch->ptszUID); break; case 4: - PostIrcMessage(_T("/MODE %s -v %s"), p1, gch->ptszUID); + PostIrcMessage(L"/MODE %s -v %s", p1, gch->ptszUID); break; case 5: - PostIrcMessage(_T("/KICK %s %s"), p1, gch->ptszUID); + PostIrcMessage(L"/KICK %s %s", p1, gch->ptszUID); break; case 6: - PostIrcMessage(_T("/KICK %s %s %%question=\"%s\",\"%s\",\"%s\""), + PostIrcMessage(L"/KICK %s %s %%question=\"%s\",\"%s\",\"%s\"", p1, gch->ptszUID, TranslateT("Please enter the reason"), TranslateT("Kick"), TranslateT("Jerk")); break; case 7: - DoUserhostWithReason(1, _T("B") + (CMString)p1, true, _T("%s"), gch->ptszUID); + DoUserhostWithReason(1, L"B" + (CMString)p1, true, L"%s", gch->ptszUID); break; case 8: - DoUserhostWithReason(1, _T("K") + (CMString)p1, true, _T("%s"), gch->ptszUID); + DoUserhostWithReason(1, L"K" + (CMString)p1, true, L"%s", gch->ptszUID); break; case 9: - DoUserhostWithReason(1, _T("L") + (CMString)p1, true, _T("%s"), gch->ptszUID); + DoUserhostWithReason(1, L"L" + (CMString)p1, true, L"%s", gch->ptszUID); break; case 10: - PostIrcMessage(_T("/WHOIS %s %s"), gch->ptszUID, gch->ptszUID); + PostIrcMessage(L"/WHOIS %s %s", gch->ptszUID, gch->ptszUID); break; // case 11: // DoUserhostWithReason(1, "I", true, "%s", gch->ptszUID ); @@ -688,38 +688,38 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) // DoUserhostWithReason(1, "J", true, "%s", gch->ptszUID ); // break; case 13: - PostIrcMessage(_T("/DCC CHAT %s"), gch->ptszUID); + PostIrcMessage(L"/DCC CHAT %s", gch->ptszUID); break; case 14: - PostIrcMessage(_T("/DCC SEND %s"), gch->ptszUID); + PostIrcMessage(L"/DCC SEND %s", gch->ptszUID); break; case 15: - DoUserhostWithReason(1, _T("I"), true, _T("%s"), gch->ptszUID); + DoUserhostWithReason(1, L"I", true, L"%s", gch->ptszUID); break; case 16: - PostIrcMessage(_T("/MODE %s +h %s"), p1, gch->ptszUID); + PostIrcMessage(L"/MODE %s +h %s", p1, gch->ptszUID); break; case 17: - PostIrcMessage(_T("/MODE %s -h %s"), p1, gch->ptszUID); + PostIrcMessage(L"/MODE %s -h %s", p1, gch->ptszUID); break; case 18: - PostIrcMessage(_T("/MODE %s +q %s"), p1, gch->ptszUID); + PostIrcMessage(L"/MODE %s +q %s", p1, gch->ptszUID); break; case 19: - PostIrcMessage(_T("/MODE %s -q %s"), p1, gch->ptszUID); + PostIrcMessage(L"/MODE %s -q %s", p1, gch->ptszUID); break; case 20: - PostIrcMessage(_T("/MODE %s +a %s"), p1, gch->ptszUID); + PostIrcMessage(L"/MODE %s +a %s", p1, gch->ptszUID); break; case 21: - PostIrcMessage(_T("/MODE %s -a %s"), p1, gch->ptszUID); + PostIrcMessage(L"/MODE %s -a %s", p1, gch->ptszUID); break; case 22: - PostIrcMessage(_T("/NOTICE %s %%question=\"%s\",\"%s\""), + PostIrcMessage(L"/NOTICE %s %%question=\"%s\",\"%s\"", gch->ptszUID, TranslateT("Please enter the notice text"), TranslateT("Send notice")); break; case 23: - PostIrcMessage(_T("/INVITE %s %%question=\"%s\",\"%s\""), + PostIrcMessage(L"/INVITE %s %%question=\"%s\",\"%s\"", gch->ptszUID, TranslateT("Please enter the channel name to invite to"), TranslateT("Invite to channel")); break; case 30: @@ -738,13 +738,13 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) } break; case 31: //slap - PostIrcMessageWnd(p1, NULL, CMString(FORMAT, _T("/slap %s"), gch->ptszUID)); + PostIrcMessageWnd(p1, NULL, CMString(FORMAT, L"/slap %s", gch->ptszUID)); break; case 32: //nickserv info - PostIrcMessageWnd(p1, NULL, CMString(FORMAT, _T("/nickserv INFO %s ALL"), gch->ptszUID)); + PostIrcMessageWnd(p1, NULL, CMString(FORMAT, L"/nickserv INFO %s ALL", gch->ptszUID)); break; case 33: //nickserv ghost - PostIrcMessageWnd(p1, NULL, CMString(FORMAT, _T("/nickserv GHOST %s"), gch->ptszUID)); + PostIrcMessageWnd(p1, NULL, CMString(FORMAT, L"/nickserv GHOST %s", gch->ptszUID)); break; } break; @@ -761,7 +761,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) static gc_item logItems[] = { { LPGENT("&Change your nickname"), 1, MENU_ITEM, FALSE }, { LPGENT("Channel &settings"), 2, MENU_ITEM, FALSE }, - { _T(""), 0, MENU_SEPARATOR, FALSE }, + { L"", 0, MENU_SEPARATOR, FALSE }, { LPGENT("NickServ"), 0, MENU_NEWPOPUP, FALSE }, { LPGENT("Register nick"), 5, MENU_POPUPITEM, TRUE }, { LPGENT("Auth nick"), 6, MENU_POPUPITEM, FALSE }, @@ -773,27 +773,27 @@ static gc_item logItems[] = { { LPGENT("Set homepage"), 12, MENU_POPUPITEM, FALSE }, { LPGENT("Set e-mail"), 13, MENU_POPUPITEM, FALSE }, { LPGENT("Set info"), 14, MENU_POPUPITEM, FALSE }, - { _T(""), 0, MENU_POPUPSEPARATOR, FALSE }, + { L"", 0, MENU_POPUPSEPARATOR, FALSE }, { LPGENT("Hide e-mail from info"), 20, MENU_POPUPITEM, FALSE }, { LPGENT("Show e-mail in info"), 21, MENU_POPUPITEM, FALSE }, - { _T(""), 0, MENU_POPUPSEPARATOR, FALSE }, + { L"", 0, MENU_POPUPSEPARATOR, FALSE }, { LPGENT("Set security for nick"), 22, MENU_POPUPITEM, FALSE }, { LPGENT("Remove security for nick"), 23, MENU_POPUPITEM, FALSE }, - { _T(""), 0, MENU_POPUPSEPARATOR, FALSE }, + { L"", 0, MENU_POPUPSEPARATOR, FALSE }, { LPGENT("Link nick to current"), 24, MENU_POPUPITEM, FALSE }, { LPGENT("Unlink nick from current"), 25, MENU_POPUPITEM, FALSE }, { LPGENT("Set main nick"), 26, MENU_POPUPITEM, FALSE }, { LPGENT("List all your nicks"), 27, MENU_POPUPITEM, FALSE }, { LPGENT("List your channels"), 28, MENU_POPUPITEM, FALSE }, - { _T(""), 0, MENU_POPUPSEPARATOR, FALSE }, + { L"", 0, MENU_POPUPSEPARATOR, FALSE }, { LPGENT("Kill unauthorized: off"), 15, MENU_POPUPITEM, FALSE }, { LPGENT("Kill unauthorized: on"), 16, MENU_POPUPITEM, FALSE }, { LPGENT("Kill unauthorized: quick"), 17, MENU_POPUPITEM, FALSE }, - { _T(""), 0, MENU_POPUPSEPARATOR, FALSE }, + { L"", 0, MENU_POPUPSEPARATOR, FALSE }, { LPGENT("Hide nick from list"), 18, MENU_POPUPITEM, FALSE }, { LPGENT("Show nick to list"), 19, MENU_POPUPITEM, FALSE }, { LPGENT("Show the server &window"), 4, MENU_ITEM, FALSE }, - { _T(""), 0, MENU_SEPARATOR, FALSE }, + { L"", 0, MENU_SEPARATOR, FALSE }, { LPGENT("&Leave the channel"), 3, MENU_ITEM, FALSE } }; @@ -815,7 +815,7 @@ static gc_item nickItems[] = { { LPGENT("Take H&alfop"), 17, MENU_POPUPITEM, FALSE }, { LPGENT("Give &Voice"), 3, MENU_POPUPITEM, FALSE }, //15 { LPGENT("Take V&oice"), 4, MENU_POPUPITEM, FALSE }, - { _T(""), 0, MENU_POPUPSEPARATOR, FALSE }, + { L"", 0, MENU_POPUPSEPARATOR, FALSE }, { LPGENT("&Kick"), 5, MENU_POPUPITEM, FALSE }, { LPGENT("Ki&ck (reason)"), 6, MENU_POPUPITEM, FALSE }, { LPGENT("&Ban"), 7, MENU_POPUPITEM, FALSE }, //20 @@ -825,7 +825,7 @@ static gc_item nickItems[] = { { LPGENT("Request &Chat"), 13, MENU_POPUPITEM, FALSE }, { LPGENT("Send &File"), 14, MENU_POPUPITEM, FALSE }, //25 { LPGENT("Add to &ignore list"), 15, MENU_ITEM, FALSE }, - { _T(""), 12, MENU_SEPARATOR, FALSE }, + { L"", 12, MENU_SEPARATOR, FALSE }, { LPGENT("&Add User"), 30, MENU_ITEM, FALSE } }; @@ -968,7 +968,7 @@ int __cdecl CIrcProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) DBVARIANT dbv; if (!getTString(hContact, "Nick", &dbv)) { if (getByte("MirVerAutoRequest", 1)) - PostIrcMessage(_T("/PRIVMSG %s \001VERSION\001"), dbv.ptszVal); + PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", dbv.ptszVal); db_free(&dbv); } } @@ -1045,9 +1045,9 @@ void CIrcProto::ConnectToServer(void) bTempDisableCheck = false; bTempForceCheck = false; m_iTempCheckTime = 0; - sChannelPrefixes = _T("&#"); + sChannelPrefixes = L"&#"; sUserModes = "ov"; - sUserModePrefixes = _T("@+"); + sUserModePrefixes = L"@+"; sChannelModes = "btnimklps"; if (!m_bConnectThreadRunning) @@ -1056,7 +1056,7 @@ void CIrcProto::ConnectToServer(void) InterlockedIncrement((long *)&m_bConnectRequested); TCHAR szTemp[300]; - mir_sntprintf(szTemp, _T("\033%s \002%s\002 (%S: %u)"), + mir_sntprintf(szTemp, L"\033%s \002%s\002 (%S: %u)", TranslateT("Connecting to"), si.sNetwork.c_str(), si.sServer.c_str(), si.iPort); DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, szTemp, NULL, NULL, NULL, true, false); } diff --git a/protocols/IRCG/src/stdafx.h b/protocols/IRCG/src/stdafx.h index 6870a538d2..2fa3ab877b 100644 --- a/protocols/IRCG/src/stdafx.h +++ b/protocols/IRCG/src/stdafx.h @@ -79,12 +79,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define IRC_UM_DISCONNECT "/UMenuDisconnect" #define IRC_UM_IGNORE "/UMenuIgnore" -#define STR_QUITMESSAGE _T("\002Miranda NG!\002 Smaller, Faster, Easier. http://miranda-ng.org/") -#define STR_USERINFO _T("I'm a happy Miranda NG user! Get it here: http://miranda-ng.org/") -#define STR_AWAYMESSAGE _T("I'm away from the computer.") // Default away -#define DCCSTRING _T(" (DCC)") +#define STR_QUITMESSAGE L"\002Miranda NG!\002 Smaller, Faster, Easier. http://miranda-ng.org/" +#define STR_USERINFO L"I'm a happy Miranda NG user! Get it here: http://miranda-ng.org/" +#define STR_AWAYMESSAGE L"I'm away from the computer." // Default away +#define DCCSTRING L" (DCC)" #define SERVERSMODULE "IRC Servers" -#define SERVERWINDOW _T("Network log") +#define SERVERWINDOW L"Network log" #define DCC_CHAT 1 #define DCC_SEND 2 diff --git a/protocols/IRCG/src/tools.cpp b/protocols/IRCG/src/tools.cpp index c21a4760d6..cfae12a301 100644 --- a/protocols/IRCG/src/tools.cpp +++ b/protocols/IRCG/src/tools.cpp @@ -29,7 +29,7 @@ void CIrcProto::AddToJTemp(TCHAR op, CMString& sCommand) int pos = 0; for (;;) { - CMString tmp = sCommand.Tokenize(_T(","), pos); + CMString tmp = sCommand.Tokenize(L",", pos); if (pos == -1) break; @@ -37,12 +37,12 @@ void CIrcProto::AddToJTemp(TCHAR op, CMString& sCommand) if (res.IsEmpty()) res = tmp; else - res += _T(" ") + tmp; + res += L" " + tmp; } DBVARIANT dbv; if (!getTString("JTemp", &dbv)) { - res = CMString(dbv.ptszVal) + _T(" ") + res; + res = CMString(dbv.ptszVal) + L" " + res; db_free(&dbv); } @@ -110,13 +110,13 @@ const TCHAR* __stdcall GetWordAddress(const TCHAR* text, int index) void __stdcall RemoveLinebreaks(CMString &Message) { - while (Message.Find(_T("\r\n\r\n"), 0) != -1) - Message.Replace(_T("\r\n\r\n"), _T("\r\n")); + while (Message.Find(L"\r\n\r\n", 0) != -1) + Message.Replace(L"\r\n\r\n", L"\r\n"); - if (Message.Find(_T("\r\n"), 0) == 0) + if (Message.Find(L"\r\n", 0) == 0) Message.Delete(0, 2); - if ((Message.GetLength() > 1) && (Message.Find(_T("\r\n"), Message.GetLength() - 2) == 0)) + if ((Message.GetLength() > 1) && (Message.Find(L"\r\n", Message.GetLength() - 2) == 0)) Message.Delete(Message.GetLength() - 2, 2); } @@ -124,7 +124,7 @@ char* __stdcall IrcLoadFile(TCHAR* szPath) { char * szContainer = NULL; DWORD dwSiz = 0; - FILE *hFile = _tfopen(szPath, _T("rb")); + FILE *hFile = _tfopen(szPath, L"rb"); if (hFile != NULL) { fseek(hFile, 0, SEEK_END); // seek to end dwSiz = ftell(hFile); // size @@ -342,7 +342,7 @@ TCHAR* __stdcall DoColorCodes(const TCHAR* text, bool bStrip, bool bReplacePerce *p++ = '%'; *p++ = 'c'; - mir_sntprintf(buf, _T("%02u"), iFG); + mir_sntprintf(buf, L"%02u", iFG); for (int i = 0; i < 2; i++) *p++ = buf[i]; } @@ -355,7 +355,7 @@ TCHAR* __stdcall DoColorCodes(const TCHAR* text, bool bStrip, bool bReplacePerce *p++ = '%'; *p++ = 'f'; - mir_sntprintf(buf, _T("%02u"), iBG); + mir_sntprintf(buf, L"%02u", iBG); for (int i = 0; i < 2; i++) *p++ = buf[i]; } @@ -387,7 +387,7 @@ INT_PTR CIrcProto::DoEvent(int iEvent, const TCHAR* pszWindow, const TCHAR* pszN { GCDEST gcd = { m_szModuleName, NULL, iEvent }; CMString sID; - CMString sText = _T(""); + CMString sText = L""; if (iEvent == GC_EVENT_INFORMATION && bIsMe && !bEcho) return false; @@ -401,7 +401,7 @@ INT_PTR CIrcProto::DoEvent(int iEvent, const TCHAR* pszWindow, const TCHAR* pszN if (pszWindow) { if (mir_tstrcmpi(pszWindow, SERVERWINDOW)) - sID = pszWindow + (CMString)_T(" - ") + m_info.sNetwork; + sID = pszWindow + (CMString)L" - " + m_info.sNetwork; else sID = pszWindow; gcd.ptszID = (TCHAR*)sID.c_str(); @@ -435,21 +435,21 @@ CMString CIrcProto::ModeToStatus(int sMode) if (sUserModes.Find(sMode) != -1) { switch (sMode) { case 'q': - return (CMString)_T("Owner"); + return (CMString)L"Owner"; case 'o': - return (CMString)_T("Op"); + return (CMString)L"Op"; case 'v': - return (CMString)_T("Voice"); + return (CMString)L"Voice"; case 'h': - return (CMString)_T("Halfop"); + return (CMString)L"Halfop"; case 'a': - return (CMString)_T("Admin"); + return (CMString)L"Admin"; default: - return (CMString)_T("Unknown"); + return (CMString)L"Unknown"; } } - return (CMString)_T("Normal"); + return (CMString)L"Normal"; } CMString CIrcProto::PrefixToStatus(int cPrefix) @@ -460,7 +460,7 @@ CMString CIrcProto::PrefixToStatus(int cPrefix) return ModeToStatus(sUserModes[index]); } - return (CMString)_T("Normal"); + return (CMString)L"Normal"; } ///////////////////////////////////////////////////////////////////////////////////////// @@ -533,11 +533,11 @@ void CIrcProto::KillChatTimer(UINT_PTR &nIDEvent) int CIrcProto::SetChannelSBText(CMString sWindow, CHANNELINFO * wi) { - CMString sTemp = _T(""); + CMString sTemp = L""; if (wi->pszMode) { - sTemp += _T("["); + sTemp += L"["; sTemp += wi->pszMode; - sTemp += _T("] "); + sTemp += L"] "; } if (wi->pszTopic) sTemp += wi->pszTopic; @@ -548,7 +548,7 @@ int CIrcProto::SetChannelSBText(CMString sWindow, CHANNELINFO * wi) CMString CIrcProto::MakeWndID(const TCHAR* sWindow) { TCHAR buf[200]; - mir_sntprintf(buf, _T("%s - %s"), sWindow, (IsConnected()) ? m_info.sNetwork.c_str() : TranslateT("Offline")); + mir_sntprintf(buf, L"%s - %s", sWindow, (IsConnected()) ? m_info.sNetwork.c_str() : TranslateT("Offline")); return CMString(buf); } @@ -613,22 +613,22 @@ void CIrcProto::FindLocalIP(HANDLE hConn) // inspiration from jabber void CIrcProto::DoUserhostWithReason(int type, CMString reason, bool bSendCommand, CMString userhostparams, ...) { TCHAR temp[4096]; - CMString S = _T(""); + CMString S = L""; switch (type) { case 1: - S = _T("USERHOST"); + S = L"USERHOST"; break; case 2: - S = _T("WHO"); + S = L"WHO"; break; default: - S = _T("USERHOST"); + S = L"USERHOST"; break; } va_list ap; va_start(ap, userhostparams); - mir_vsntprintf(temp, _countof(temp), (S + _T(" ") + userhostparams).c_str(), ap); + mir_vsntprintf(temp, _countof(temp), (S + L" " + userhostparams).c_str(), ap); va_end(ap); // Add reason @@ -644,7 +644,7 @@ void CIrcProto::DoUserhostWithReason(int type, CMString reason, bool bSendComman CMString CIrcProto::GetNextUserhostReason(int type) { - CMString reason = _T(""); + CMString reason = L""; switch (type) { case 1: if (!vUserhostReasons.getCount()) diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp index c3ed0b36bf..dd557e25d1 100644 --- a/protocols/IRCG/src/userinfo.cpp +++ b/protocols/IRCG/src/userinfo.cpp @@ -114,9 +114,9 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM DBVARIANT dbv; if (!p->ppro->getTString(p->hContact, "Default", &dbv)) { CMString S = _T(STR_ERROR); - S += _T(" ("); + S += L" ("; S += dbv.ptszVal; - S += _T(")"); + S += L")"; if ((mir_tstrlen(temp) < 4 && mir_tstrlen(temp)) || !WCCmp(CharLower(temp), CharLower(dbv.ptszVal))) { MessageBox(NULL, TranslateTS(S.c_str()), TranslateT("IRC error"), MB_OK | MB_ICONERROR); db_free(&dbv); diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index 78417104da..e41020e7d1 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -111,14 +111,14 @@ void CWhoisDlg::OnGo(CCtrlButton*) { TCHAR szTemp[255]; m_InfoNick.GetText(szTemp, _countof(szTemp)); - m_proto->PostIrcMessage(_T("/WHOIS %s %s"), szTemp, szTemp); + m_proto->PostIrcMessage(L"/WHOIS %s %s", szTemp, szTemp); } void CWhoisDlg::OnQuery(CCtrlButton*) { TCHAR szTemp[255]; m_InfoNick.GetText(szTemp, _countof(szTemp)); - m_proto->PostIrcMessage(_T("/QUERY %s"), szTemp); + m_proto->PostIrcMessage(L"/QUERY %s", szTemp); } void CWhoisDlg::OnPing(CCtrlButton*) @@ -126,7 +126,7 @@ void CWhoisDlg::OnPing(CCtrlButton*) TCHAR szTemp[255]; m_InfoNick.GetText(szTemp, _countof(szTemp)); m_Reply.SetText(TranslateT("Please wait...")); - m_proto->PostIrcMessage(_T("/PRIVMSG %s \001PING %u\001"), szTemp, time(0)); + m_proto->PostIrcMessage(L"/PRIVMSG %s \001PING %u\001", szTemp, time(0)); } void CWhoisDlg::OnUserInfo(CCtrlButton*) @@ -134,7 +134,7 @@ void CWhoisDlg::OnUserInfo(CCtrlButton*) TCHAR szTemp[255]; m_InfoNick.GetText(szTemp, _countof(szTemp)); m_Reply.SetText(TranslateT("Please wait...")); - m_proto->PostIrcMessage(_T("/PRIVMSG %s \001USERINFO\001"), szTemp); + m_proto->PostIrcMessage(L"/PRIVMSG %s \001USERINFO\001", szTemp); } void CWhoisDlg::OnTime(CCtrlButton*) @@ -142,7 +142,7 @@ void CWhoisDlg::OnTime(CCtrlButton*) TCHAR szTemp[255]; m_InfoNick.GetText(szTemp, _countof(szTemp)); m_Reply.SetText(TranslateT("Please wait...")); - m_proto->PostIrcMessage(_T("/PRIVMSG %s \001TIME\001"), szTemp); + m_proto->PostIrcMessage(L"/PRIVMSG %s \001TIME\001", szTemp); } void CWhoisDlg::OnVersion(CCtrlButton*) @@ -150,7 +150,7 @@ void CWhoisDlg::OnVersion(CCtrlButton*) TCHAR szTemp[255]; m_InfoNick.GetText(szTemp, _countof(szTemp)); m_Reply.SetText(TranslateT("Please wait...")); - m_proto->PostIrcMessage(_T("/PRIVMSG %s \001VERSION\001"), szTemp); + m_proto->PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", szTemp); } void CWhoisDlg::ShowMessage(const CIrcMessage* pmsg) @@ -163,12 +163,12 @@ void CWhoisDlg::ShowMessage(const CIrcMessage* pmsg) m_InfoName.SetText(pmsg->parameters[5].c_str()); m_InfoAddress.SetText(pmsg->parameters[3].c_str()); m_InfoId.SetText(pmsg->parameters[2].c_str()); - m_InfoChannels.SetText(_T("")); - m_InfoServer.SetText(_T("")); - m_InfoAway2.SetText(_T("")); - m_InfoAuth.SetText(_T("")); - m_InfoOther.SetText(_T("")); - m_Reply.SetText(_T("")); + m_InfoChannels.SetText(L""); + m_InfoServer.SetText(L""); + m_InfoAway2.SetText(L""); + m_InfoAuth.SetText(L""); + m_InfoOther.SetText(L""); + m_Reply.SetText(L""); SetWindowText(m_hwnd, TranslateT("User information")); EnableWindow(GetDlgItem(m_hwnd, ID_INFO_QUERY), true); ShowWindow(m_hwnd, SW_SHOW); @@ -183,14 +183,14 @@ void CWhoisDlg::ShowMessageNoUser(const CIrcMessage *pmsg) m_InfoNick.SetText(pmsg->parameters[2].c_str()); m_InfoNick.SendMsg(CB_SETEDITSEL, 0, MAKELPARAM(0, -1)); m_Caption.SetText(pmsg->parameters[2].c_str()); - m_InfoName.SetText(_T("")); - m_InfoAddress.SetText(_T("")); - m_InfoId.SetText(_T("")); - m_InfoChannels.SetText(_T("")); - m_InfoServer.SetText(_T("")); - m_InfoAway2.SetText(_T("")); - m_InfoAuth.SetText(_T("")); - m_Reply.SetText(_T("")); + m_InfoName.SetText(L""); + m_InfoAddress.SetText(L""); + m_InfoId.SetText(L""); + m_InfoChannels.SetText(L""); + m_InfoServer.SetText(L""); + m_InfoAway2.SetText(L""); + m_InfoAuth.SetText(L""); + m_Reply.SetText(L""); EnableWindow(GetDlgItem(m_hwnd, ID_INFO_QUERY), false); } @@ -230,7 +230,7 @@ void CNickDlg::OnOk(CCtrlButton*) { TCHAR szTemp[255]; m_Enick.GetText(szTemp, _countof(szTemp)); - m_proto->PostIrcMessage(_T("/NICK %s"), szTemp); + m_proto->PostIrcMessage(L"/NICK %s", szTemp); CMString S = szTemp; DBVARIANT dbv; @@ -238,7 +238,7 @@ void CNickDlg::OnOk(CCtrlButton*) for (int i = 0; i < 10; i++) { CMString s = GetWord(dbv.ptszVal, i); if (!s.IsEmpty() && s != szTemp) - S += _T(" ") + s; + S += L" " + s; } db_free(&dbv); } @@ -279,7 +279,7 @@ void CListDlg::OnInitDialog() switch (index) { case 0: mir_tstrcpy(szBuffer, TranslateT("Channel")); break; - case 1: mir_tstrcpy(szBuffer, _T("#")); break; + case 1: mir_tstrcpy(szBuffer, L"#"); break; case 2: mir_tstrcpy(szBuffer, TranslateT("Mode")); break; case 3: mir_tstrcpy(szBuffer, TranslateT("Topic")); break; } @@ -470,7 +470,7 @@ void CListDlg::OnJoin(CCtrlButton*) m_list2.GetItemText(m_list2.GetSelectionMark(), 0, szTemp, 255); else m_list.GetItemText(m_list.GetSelectionMark(), 0, szTemp, 255); - m_proto->PostIrcMessage(_T("/JOIN %s"), szTemp); + m_proto->PostIrcMessage(L"/JOIN %s", szTemp); } void CListDlg::UpdateList() @@ -507,7 +507,7 @@ void CJoinDlg::OnInitDialog() for (int i = 0; i < 20; i++) { if (!GetWord(dbv.ptszVal, i).IsEmpty()) { CMString S = GetWord(dbv.ptszVal, i); - S.Replace(_T("%newl"), _T(" ")); + S.Replace(L"%newl", L" "); SendDlgItemMessage(m_hwnd, IDC_ENICK, CB_ADDSTRING, 0, (LPARAM)S.c_str()); } } @@ -526,12 +526,12 @@ void CJoinDlg::OnOk(CCtrlButton*) TCHAR szTemp[255]; GetDlgItemText(m_hwnd, IDC_ENICK, szTemp, _countof(szTemp)); if (m_proto->IsChannel(szTemp)) - m_proto->PostIrcMessage(_T("/JOIN %s"), szTemp); + m_proto->PostIrcMessage(L"/JOIN %s", szTemp); else - m_proto->PostIrcMessage(_T("/JOIN #%s"), szTemp); + m_proto->PostIrcMessage(L"/JOIN #%s", szTemp); CMString S = szTemp; - S.Replace(_T(" "), _T("%newl")); + S.Replace(L" ", L"%newl"); CMString SL = S; DBVARIANT dbv; @@ -539,7 +539,7 @@ void CJoinDlg::OnOk(CCtrlButton*) for (int i = 0; i < 20; i++) { CMString W = GetWord(dbv.ptszVal, i); if (!W.IsEmpty() && W != SL) - S += _T(" ") + W; + S += L" " + W; } db_free(&dbv); } @@ -633,7 +633,7 @@ void CQuickDlg::OnOk(CCtrlButton*) TCHAR windowname[20]; GetWindowText(m_hwnd, windowname, _countof(windowname)); - if (mir_tstrcmpi(windowname, _T("Miranda IRC")) == 0) { + if (mir_tstrcmpi(windowname, L"Miranda IRC") == 0) { m_proto->m_serverComboSelection = m_serverCombo.GetCurSel() - 1; m_proto->setDword("ServerComboSelection", m_proto->m_serverComboSelection); m_proto->setString("ServerName", m_proto->m_serverName); @@ -734,7 +734,7 @@ void CQuestionDlg::OnOk(CCtrlButton*) TCHAR *m = new TCHAR[j + 2]; GetDlgItemText(m_hwnd, IDC_HIDDENEDIT, m, j + 1); - TCHAR *text = _tcsstr(m, _T("%question")); + TCHAR *text = _tcsstr(m, L"%question"); TCHAR *p1 = text; TCHAR *p2 = NULL; if (p1) { @@ -909,21 +909,21 @@ void CManagerDlg::OnClose() TCHAR window[256]; GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window)); - CMString S = _T(""); + CMString S = L""; TCHAR temp[1000]; for (int i = 0; i < 5; i++) { if (m_topic.SendMsg(CB_GETLBTEXT, i, (LPARAM)temp) != LB_ERR) { CMString S1 = temp; /* FIXME: What the hell does it mean!? GCC won't compile this on UNICODE */ #if !defined(__GNUC__) || !defined(UNICODE) - S1.Replace(_T(" "), _T("%�")); + S1.Replace(L" ", L"%�"); #endif - S += _T(" ") + S1; + S += L" " + S1; } } if (!S.IsEmpty() && m_proto->IsConnected()) { - mir_sntprintf(temp, _T("Topic%s%s"), window, m_proto->m_info.sNetwork.c_str()); + mir_sntprintf(temp, L"Topic%s%s", window, m_proto->m_info.sNetwork.c_str()); char* p = mir_t2a(temp); m_proto->setTString(p, S.c_str()); mir_free(p); @@ -942,15 +942,15 @@ void CManagerDlg::OnAdd(CCtrlButton*) TCHAR temp[100]; TCHAR mode[3]; if (m_radio1.GetState()) { - mir_tstrcpy(mode, _T("+b")); + mir_tstrcpy(mode, L"+b"); mir_tstrncpy(temp, TranslateT("Add ban"), 100); } if (m_radio2.GetState()) { - mir_tstrcpy(mode, _T("+I")); + mir_tstrcpy(mode, L"+I"); mir_tstrncpy(temp, TranslateT("Add invite"), 100); } if (m_radio3.GetState()) { - mir_tstrcpy(mode, _T("+e")); + mir_tstrcpy(mode, L"+e"); mir_tstrncpy(temp, TranslateT("Add exception"), 100); } @@ -967,7 +967,7 @@ void CManagerDlg::OnAdd(CCtrlButton*) TCHAR temp2[450]; TCHAR window[256]; GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window)); - mir_sntprintf(temp2, _T("/MODE %s %s %s"), window, mode, _T("%question")); + mir_sntprintf(temp2, L"/MODE %s %s %s", window, mode, L"%question"); SetDlgItemText(addban_hWnd, IDC_HIDDENEDIT, temp2); dlg->Activate(); } @@ -984,15 +984,15 @@ void CManagerDlg::OnEdit(CCtrlButton*) TCHAR temp[100]; TCHAR mode[3]; if (m_radio1.GetState()) { - mir_tstrcpy(mode, _T("b")); + mir_tstrcpy(mode, L"b"); mir_tstrncpy(temp, TranslateT("Edit ban"), 100); } if (m_radio2.GetState()) { - mir_tstrcpy(mode, _T("I")); + mir_tstrcpy(mode, L"I"); mir_tstrncpy(temp, TranslateT("Edit invite?"), 100); } if (m_radio3.GetState()) { - mir_tstrcpy(mode, _T("e")); + mir_tstrcpy(mode, L"e"); mir_tstrncpy(temp, TranslateT("Edit exception?"), 100); } @@ -1010,7 +1010,7 @@ void CManagerDlg::OnEdit(CCtrlButton*) TCHAR temp2[450]; TCHAR window[256]; GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window)); - mir_sntprintf(temp2, _T("/MODE %s -%s %s%s/MODE %s +%s %s"), window, mode, user.c_str(), _T("%newl"), window, mode, _T("%question")); + mir_sntprintf(temp2, L"/MODE %s -%s %s%s/MODE %s +%s %s", window, mode, user.c_str(), L"%newl", window, mode, L"%question"); SetDlgItemText(addban_hWnd, IDC_HIDDENEDIT, temp2); dlg->Activate(); } @@ -1030,22 +1030,22 @@ void CManagerDlg::OnRemove(CCtrlButton*) CMString user = GetWord(m, 0); if (m_radio1.GetState()) { - mir_tstrcpy(mode, _T("-b")); + mir_tstrcpy(mode, L"-b"); mir_tstrncpy(temp, TranslateT("Remove ban?"), 100); } if (m_radio2.GetState()) { - mir_tstrcpy(mode, _T("-I")); + mir_tstrcpy(mode, L"-I"); mir_tstrncpy(temp, TranslateT("Remove invite?"), 100); } if (m_radio3.GetState()) { - mir_tstrcpy(mode, _T("-e")); + mir_tstrcpy(mode, L"-e"); mir_tstrncpy(temp, TranslateT("Remove exception?"), 100); } TCHAR window[256]; GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window)); if (MessageBox(m_hwnd, user.c_str(), temp, MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) == IDYES) { - m_proto->PostIrcMessage(_T("/MODE %s %s %s"), window, mode, user.c_str()); + m_proto->PostIrcMessage(L"/MODE %s %s %s", window, mode, user.c_str()); ApplyQuestion(); } CloseQuestion(); @@ -1083,79 +1083,79 @@ void CManagerDlg::OnApplyModes(CCtrlButton*) if (wi) { TCHAR toadd[10]; *toadd = '\0'; TCHAR toremove[10]; *toremove = '\0'; - CMString appendixadd = _T(""); - CMString appendixremove = _T(""); + CMString appendixadd = L""; + CMString appendixremove = L""; if (wi->pszMode && _tcschr(wi->pszMode, 't')) { if (!m_check1.GetState()) - mir_tstrcat(toremove, _T("t")); + mir_tstrcat(toremove, L"t"); } else if (m_check1.GetState()) - mir_tstrcat(toadd, _T("t")); + mir_tstrcat(toadd, L"t"); if (wi->pszMode && _tcschr(wi->pszMode, 'n')) { if (!m_check2.GetState()) - mir_tstrcat(toremove, _T("n")); + mir_tstrcat(toremove, L"n"); } else if (m_check2.GetState()) - mir_tstrcat(toadd, _T("n")); + mir_tstrcat(toadd, L"n"); if (wi->pszMode && _tcschr(wi->pszMode, 'i')) { if (!m_check3.GetState()) - mir_tstrcat(toremove, _T("i")); + mir_tstrcat(toremove, L"i"); } else if (m_check3.GetState()) - mir_tstrcat(toadd, _T("i")); + mir_tstrcat(toadd, L"i"); if (wi->pszMode && _tcschr(wi->pszMode, 'm')) { if (!m_check4.GetState()) - mir_tstrcat(toremove, _T("m")); + mir_tstrcat(toremove, L"m"); } else if (m_check4.GetState()) - mir_tstrcat(toadd, _T("m")); + mir_tstrcat(toadd, L"m"); if (wi->pszMode && _tcschr(wi->pszMode, 'p')) { if (!m_check7.GetState()) - mir_tstrcat(toremove, _T("p")); + mir_tstrcat(toremove, L"p"); } else if (m_check7.GetState()) - mir_tstrcat(toadd, _T("p")); + mir_tstrcat(toadd, L"p"); if (wi->pszMode && _tcschr(wi->pszMode, 's')) { if (!m_check8.GetState()) - mir_tstrcat(toremove, _T("s")); + mir_tstrcat(toremove, L"s"); } else if (m_check8.GetState()) - mir_tstrcat(toadd, _T("s")); + mir_tstrcat(toadd, L"s"); if (wi->pszMode && _tcschr(wi->pszMode, 'c')) { if (!m_check9.GetState()) - mir_tstrcat(toremove, _T("c")); + mir_tstrcat(toremove, L"c"); } else if (m_check9.GetState()) - mir_tstrcat(toadd, _T("c")); + mir_tstrcat(toadd, L"c"); - CMString Key = _T(""); - CMString Limit = _T(""); + CMString Key = L""; + CMString Limit = L""; if (wi->pszMode && wi->pszPassword && _tcschr(wi->pszMode, 'k')) { if (!m_check5.GetState()) { - mir_tstrcat(toremove, _T("k")); - appendixremove += _T(" ") + CMString(wi->pszPassword); + mir_tstrcat(toremove, L"k"); + appendixremove += L" " + CMString(wi->pszPassword); } else if (GetWindowTextLength(m_key.GetHwnd())) { TCHAR temp[400]; m_key.GetText(temp, 14); if (Key != temp) { - mir_tstrcat(toremove, _T("k")); - mir_tstrcat(toadd, _T("k")); - appendixadd += _T(" ") + CMString(temp); - appendixremove += _T(" ") + CMString(wi->pszPassword); + mir_tstrcat(toremove, L"k"); + mir_tstrcat(toadd, L"k"); + appendixadd += L" " + CMString(temp); + appendixremove += L" " + CMString(wi->pszPassword); } } } else if (m_check5.GetState() && GetWindowTextLength(m_key.GetHwnd())) { - mir_tstrcat(toadd, _T("k")); - appendixadd += _T(" "); + mir_tstrcat(toadd, L"k"); + appendixadd += L" "; TCHAR temp[400]; m_key.GetText(temp, _countof(temp)); @@ -1164,19 +1164,19 @@ void CManagerDlg::OnApplyModes(CCtrlButton*) if (_tcschr(wi->pszMode, 'l')) { if (!m_check6.GetState()) - mir_tstrcat(toremove, _T("l")); + mir_tstrcat(toremove, L"l"); else if (GetWindowTextLength(GetDlgItem(m_hwnd, IDC_LIMIT))) { TCHAR temp[15]; GetDlgItemText(m_hwnd, IDC_LIMIT, temp, _countof(temp)); if (wi->pszLimit && mir_tstrcmpi(wi->pszLimit, temp)) { - mir_tstrcat(toadd, _T("l")); - appendixadd += _T(" ") + CMString(temp); + mir_tstrcat(toadd, L"l"); + appendixadd += L" " + CMString(temp); } } } else if (m_check6.GetState() && GetWindowTextLength(m_limit.GetHwnd())) { - mir_tstrcat(toadd, _T("l")); - appendixadd += _T(" "); + mir_tstrcat(toadd, L"l"); + appendixadd += L" "; TCHAR temp[15]; m_limit.GetText(temp, _countof(temp)); @@ -1185,13 +1185,13 @@ void CManagerDlg::OnApplyModes(CCtrlButton*) if (mir_tstrlen(toadd) || mir_tstrlen(toremove)) { TCHAR temp[500]; - mir_tstrcpy(temp, _T("/mode ")); + mir_tstrcpy(temp, L"/mode "); mir_tstrcat(temp, window); - mir_tstrcat(temp, _T(" ")); + mir_tstrcat(temp, L" "); if (mir_tstrlen(toremove)) - mir_sntprintf(temp, _T("%s-%s"), temp, toremove); + mir_sntprintf(temp, L"%s-%s", temp, toremove); if (mir_tstrlen(toadd)) - mir_sntprintf(temp, _T("%s+%s"), temp, toadd); + mir_sntprintf(temp, L"%s+%s", temp, toadd); if (!appendixremove.IsEmpty()) mir_tstrcat(temp, appendixremove.c_str()); if (!appendixadd.IsEmpty()) @@ -1209,7 +1209,7 @@ void CManagerDlg::OnApplyTopic(CCtrlButton*) TCHAR window[256]; GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window)); m_topic.GetText(temp, _countof(temp)); - m_proto->PostIrcMessage(_T("/TOPIC %s %s"), window, temp); + m_proto->PostIrcMessage(L"/TOPIC %s %s", window, temp); int i = m_topic.SendMsg(CB_FINDSTRINGEXACT, -1, (LPARAM)temp); if (i != LB_ERR) m_topic.SendMsg(CB_DELETESTRING, i, 0); @@ -1246,11 +1246,11 @@ void CManagerDlg::ApplyQuestion() GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window)); TCHAR mode[3]; - mir_tstrcpy(mode, _T("+b")); + mir_tstrcpy(mode, L"+b"); if (m_radio2.GetState()) - mir_tstrcpy(mode, _T("+I")); + mir_tstrcpy(mode, L"+I"); if (m_radio3.GetState()) - mir_tstrcpy(mode, _T("+e")); + mir_tstrcpy(mode, L"+e"); m_list.ResetContent(); m_radio1.Disable(); m_radio2.Disable(); @@ -1258,7 +1258,7 @@ void CManagerDlg::ApplyQuestion() m_add.Disable(); m_edit.Disable(); m_remove.Disable(); - m_proto->PostIrcMessage(_T("%s %s %s"), _T("/MODE"), window, mode); //wrong overloaded operator if three args + m_proto->PostIrcMessage(L"%s %s %s", L"/MODE", window, mode); //wrong overloaded operator if three args } void CManagerDlg::CloseQuestion() @@ -1278,7 +1278,7 @@ void CManagerDlg::InitManager(int mode, const TCHAR* window) if (wi) { if (m_proto->IsConnected()) { TCHAR temp[1000]; - mir_sntprintf(temp, _T("Topic%s%s"), window, m_proto->m_info.sNetwork.c_str()); + mir_sntprintf(temp, L"Topic%s%s", window, m_proto->m_info.sNetwork.c_str()); char* p = mir_t2a(temp); @@ -1289,7 +1289,7 @@ void CManagerDlg::InitManager(int mode, const TCHAR* window) if (!S.IsEmpty()) { /* FIXME: What the hell does it mean!? GCC won't compile this on UNICODE */ #if !defined(__GNUC__) || !defined(UNICODE) - S.Replace(_T("%�"), _T(" ")); + S.Replace(L"%�", L" "); #endif m_topic.SendMsg(CB_ADDSTRING, 0, (LPARAM)S.c_str()); } @@ -1364,7 +1364,7 @@ void CManagerDlg::InitManager(int mode, const TCHAR* window) if (strchr(m_proto->sChannelModes.c_str(), 'b')) { m_radio1.SetState(true); - m_proto->PostIrcMessage(_T("/MODE %s +b"), window); + m_proto->PostIrcMessage(L"/MODE %s +b", window); } } diff --git a/protocols/IcqOscarJ/src/editlist.cpp b/protocols/IcqOscarJ/src/editlist.cpp index dfaebb4c85..df0840385a 100644 --- a/protocols/IcqOscarJ/src/editlist.cpp +++ b/protocols/IcqOscarJ/src/editlist.cpp @@ -79,7 +79,7 @@ void ChangeInfoData::BeginListEdit(int iItem, RECT *rc, int iSetting, WORD wVKey UpdateWindow(hwndList); dataListEdit = this; - hwndListEdit = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, _T("LISTBOX"), _T(""), WS_POPUP | WS_BORDER | WS_VSCROLL, + hwndListEdit = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, L"LISTBOX", L"", WS_POPUP | WS_BORDER | WS_VSCROLL, rc->left, rc->bottom, rc->right - rc->left, 150, NULL, NULL, hInst, NULL); SendMessage(hwndListEdit, WM_SETFONT, (WPARAM)hListFont, 0); int itemHeight = SendMessage(hwndListEdit, LB_GETITEMHEIGHT, 0, 0); diff --git a/protocols/IcqOscarJ/src/editstring.cpp b/protocols/IcqOscarJ/src/editstring.cpp index 1cd3a2f805..94b41836ee 100644 --- a/protocols/IcqOscarJ/src/editstring.cpp +++ b/protocols/IcqOscarJ/src/editstring.cpp @@ -257,7 +257,7 @@ void ChangeInfoData::BeginStringEdit(int iItem, RECT *rc, int i, WORD wVKey) } dataStringEdit = this; - hwndEdit = CreateWindow(_T("EDIT"), _T(""), WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL | ((si.displayType&LIM_TYPE) == LI_NUMBER ? ES_NUMBER : 0) | (si.displayType&LIF_PASSWORD ? ES_PASSWORD : 0), rc->left, rc->top, rc->right - rc->left, rc->bottom - rc->top, hwndList, NULL, hInst, NULL); + hwndEdit = CreateWindow(L"EDIT", L"", WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL | ((si.displayType&LIM_TYPE) == LI_NUMBER ? ES_NUMBER : 0) | (si.displayType&LIF_PASSWORD ? ES_PASSWORD : 0), rc->left, rc->top, rc->right - rc->left, rc->bottom - rc->top, hwndList, NULL, hInst, NULL); SetWindowTextUtf(hwndEdit, szValue); if (alloced) SAFE_FREE(&szValue); mir_subclassWindow(hwndEdit, StringEditSubclassProc); @@ -265,7 +265,7 @@ void ChangeInfoData::BeginStringEdit(int iItem, RECT *rc, int i, WORD wVKey) if ((si.displayType & LIM_TYPE) == LI_NUMBER) { int *range = (int*)si.pList; RECT rcUpDown; - hwndUpDown = CreateWindow(UPDOWN_CLASS, _T(""), WS_VISIBLE | WS_CHILD | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_HOTTRACK | UDS_NOTHOUSANDS | UDS_SETBUDDYINT, 0, 0, 0, 0, hwndList, NULL, hInst, NULL); + hwndUpDown = CreateWindow(UPDOWN_CLASS, L"", WS_VISIBLE | WS_CHILD | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_HOTTRACK | UDS_NOTHOUSANDS | UDS_SETBUDDYINT, 0, 0, 0, 0, hwndList, NULL, hInst, NULL); SendMessage(hwndUpDown, UDM_SETRANGE32, range[0], range[1]); SendMessage(hwndUpDown, UDM_SETPOS32, 0, sid.value); if (!(si.displayType & LIF_ZEROISVALID) && sid.value == 0) diff --git a/protocols/IcqOscarJ/src/fam_04message.cpp b/protocols/IcqOscarJ/src/fam_04message.cpp index f0f32a831b..da09e845dd 100644 --- a/protocols/IcqOscarJ/src/fam_04message.cpp +++ b/protocols/IcqOscarJ/src/fam_04message.cpp @@ -948,7 +948,7 @@ void CIcqProto::handleRecvServMsgContacts(BYTE *buf, size_t wLen, DWORD dwUin, c contacts[iContact] = (ICQSEARCHRESULT*)SAFE_MALLOC(sizeof(ICQSEARCHRESULT)); contacts[iContact]->hdr.cbSize = sizeof(ICQSEARCHRESULT); contacts[iContact]->hdr.flags = PSR_TCHAR; - contacts[iContact]->hdr.nick.t = null_strdup(_T("")); + contacts[iContact]->hdr.nick.t = null_strdup(L""); contacts[iContact]->hdr.id.t = ansi_to_tchar(szUid); if (IsStringUIN(szUid)) { // icq contact diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp index c1d1b30564..130f8796c7 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.cpp +++ b/protocols/IcqOscarJ/src/icq_avatar.cpp @@ -76,7 +76,7 @@ void CIcqProto::GetFullAvatarFileName(int dwUin, const char *szUid, int dwFormat void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, TCHAR *pszDest, size_t cbLen) { TCHAR szPath[MAX_PATH * 2]; - mir_sntprintf(szPath, _T("%s\\%S\\"), VARST(_T("%miranda_avatarcache%")), m_szModuleName); + mir_sntprintf(szPath, L"%s\\%S\\", VARST(L"%miranda_avatarcache%"), m_szModuleName); FOLDERSGETDATA fgd = { sizeof(fgd) }; fgd.nMaxPathSize = _countof(szPath); @@ -100,14 +100,14 @@ void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, TCHAR *pszDest, else { TCHAR szBuf[MAX_PATH]; if (CallService(MS_DB_GETPROFILENAMET, MAX_PATH, (LPARAM)szBuf)) - mir_tstrcpy(pszDest + tPathLen, _T("avatar")); + mir_tstrcpy(pszDest + tPathLen, L"avatar"); else { TCHAR *szLastDot = _tcsrchr(szBuf, '.'); if (szLastDot) szLastDot[0] = '\0'; mir_tstrcpy(pszDest + tPathLen, szBuf); - mir_tstrcat(pszDest + tPathLen, _T("_avt")); + mir_tstrcat(pszDest + tPathLen, L"_avt"); } } } @@ -115,7 +115,7 @@ void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, TCHAR *pszDest, void AddAvatarExt(int dwFormat, TCHAR *pszDest) { const TCHAR *ext = ProtoGetAvatarExtension(dwFormat); - mir_tstrcat(pszDest, (*ext == 0) ? _T(".dat") : ext); + mir_tstrcat(pszDest, (*ext == 0) ? L".dat" : ext); } #define MD5_BLOCK_SIZE 1024*1024 /* use 1MB blocks */ @@ -1212,7 +1212,7 @@ void avatars_server_connection::handleAvatarFam(BYTE *pBuffer, size_t wBufferLen const TCHAR *ptszExt; int dwPaFormat = ProtoGetBufferFormat(pBuffer, &ptszExt); TCHAR tszImageFile[MAX_PATH]; - mir_sntprintf(tszImageFile, _T("%s%s"), pCookieData->szFile, ptszExt); + mir_sntprintf(tszImageFile, L"%s%s", pCookieData->szFile, ptszExt); ppro->setByte(pCookieData->hContact, "AvatarType", (BYTE)dwPaFormat); ai.format = dwPaFormat; // set the format diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index 12c8b99307..12694a3763 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -386,7 +386,7 @@ int CIcqProto::Authorize(MEVENT hDbEvent) if (getContactUid(hContact, &uin, &uid)) return 1; - icq_sendAuthResponseServ(uin, uid, 1, _T("")); + icq_sendAuthResponseServ(uin, uid, 1, L""); delSetting(hContact, "Grant"); diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index 9a21a65877..3168d290ec 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -126,14 +126,14 @@ static HANDLE LoadXStatusIconLibrary(TCHAR *path, const TCHAR *sub) HANDLE hLib; mir_tstrcpy(p, sub); - mir_tstrcat(p, _T("\\xstatus_ICQ.dll")); + mir_tstrcat(p, L"\\xstatus_ICQ.dll"); if (hLib = LoadLibrary(path)) return hLib; mir_tstrcpy(p, sub); - mir_tstrcat(p, _T("\\xstatus_icons.dll")); + mir_tstrcat(p, L"\\xstatus_icons.dll"); if (hLib = LoadLibrary(path)) return hLib; - mir_tstrcpy(p, _T("\\")); + mir_tstrcpy(p, L"\\"); return hLib; } @@ -145,9 +145,9 @@ static TCHAR* InitXStatusIconLibrary(TCHAR *buf, size_t buf_size) // get miranda's exe path GetModuleFileName(NULL, path, MAX_PATH); - hXStatusIconsDLL = (HMODULE)LoadXStatusIconLibrary(path, _T("\\Icons")); + hXStatusIconsDLL = (HMODULE)LoadXStatusIconLibrary(path, L"\\Icons"); if (!hXStatusIconsDLL) // TODO: add "Custom Folders" support - hXStatusIconsDLL = (HMODULE)LoadXStatusIconLibrary(path, _T("\\Plugins")); + hXStatusIconsDLL = (HMODULE)LoadXStatusIconLibrary(path, L"\\Plugins"); if (hXStatusIconsDLL) { null_strcpy(buf, path, buf_size - 1); diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 874b3ecab5..3c5f4e165a 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -109,8 +109,8 @@ static int OnModulesLoaded(WPARAM, LPARAM) HookEvent(ME_TTB_MODULELOADED, g_OnToolbarInit); bSecureIM = ServiceExists("SecureIM/IsContactSecured") != 0; - bMirOTR = GetModuleHandle(_T("mirotr.dll")) != NULL; - bNewGPG = GetModuleHandle(_T("new_gpg.dll")) != NULL; + bMirOTR = GetModuleHandle(L"mirotr.dll") != NULL; + bNewGPG = GetModuleHandle(L"new_gpg.dll") != NULL; #ifdef _WIN64 bPlatform = 1; #else @@ -128,14 +128,14 @@ static int OnModulesLoaded(WPARAM, LPARAM) fontid.cbSize = sizeof(fontid); _tcsncpy_s(fontid.group, LPGENT("Jabber"), _TRUNCATE); strncpy_s(fontid.dbSettingsGroup, GLOBAL_SETTING_MODULE, _TRUNCATE); - _tcsncpy_s(fontid.backgroundGroup, _T("Jabber"), _TRUNCATE); - _tcsncpy_s(fontid.backgroundName, _T("Background"), _TRUNCATE); + _tcsncpy_s(fontid.backgroundGroup, L"Jabber", _TRUNCATE); + _tcsncpy_s(fontid.backgroundName, L"Background", _TRUNCATE); fontid.flags = FIDF_DEFAULTVALID; fontid.deffontsettings.charset = DEFAULT_CHARSET; fontid.deffontsettings.colour = GetSysColor(COLOR_WINDOWTEXT); fontid.deffontsettings.size = -11; - mir_tstrncpy(fontid.deffontsettings.szFace, _T("MS Shell Dlg"), _countof(fontid.deffontsettings.szFace)); + mir_tstrncpy(fontid.deffontsettings.szFace, L"MS Shell Dlg", _countof(fontid.deffontsettings.szFace)); fontid.deffontsettings.style = 0; _tcsncpy_s(fontid.name, LPGENT("Frame title"), _TRUNCATE); @@ -150,10 +150,10 @@ static int OnModulesLoaded(WPARAM, LPARAM) ColourIDT colourid = {0}; colourid.cbSize = sizeof(colourid); - _tcsncpy_s(colourid.group, _T("Jabber"), _TRUNCATE); + _tcsncpy_s(colourid.group, L"Jabber", _TRUNCATE); strncpy_s(colourid.dbSettingsGroup, GLOBAL_SETTING_MODULE, _TRUNCATE); - _tcsncpy_s(colourid.name, _T("Background"), _TRUNCATE); + _tcsncpy_s(colourid.name, L"Background", _TRUNCATE); strncpy_s(colourid.setting, "clFrameBack", _TRUNCATE); colourid.defcolour = GetSysColor(COLOR_WINDOW); ColourRegisterT(&colourid); @@ -188,14 +188,14 @@ extern "C" int __declspec(dllexport) Load() { INT_PTR result = CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&FIP); if (FIP == NULL || result != S_OK) { - MessageBoxEx(NULL, TranslateT("Fatal error, image services not found. Jabber Protocol will be disabled."), _T("Error"), MB_OK | MB_ICONERROR | MB_APPLMODAL, 0); + MessageBoxEx(NULL, TranslateT("Fatal error, image services not found. Jabber Protocol will be disabled."), L"Error", MB_OK | MB_ICONERROR | MB_APPLMODAL, 0); return 1; } } WORD v[4]; CallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)v); - mir_sntprintf(szCoreVersion, _T("%d.%d.%d.%d"), v[0], v[1], v[2], v[3]); + mir_sntprintf(szCoreVersion, L"%d.%d.%d.%d", v[0], v[1], v[2], v[3]); CallService(MS_UTILS_GETCOUNTRYLIST, (WPARAM)&g_cbCountries, (LPARAM)&g_countries); @@ -235,13 +235,13 @@ extern "C" int __declspec(dllexport) Unload(void) if (g_nTempFileId != 0) { TCHAR tszTempPath[MAX_PATH], tszFilePath[MAX_PATH]; GetTempPath(_countof(tszTempPath), tszTempPath); - mir_sntprintf(tszFilePath, _T("%sjab*.tmp.*"), tszTempPath); + mir_sntprintf(tszFilePath, L"%sjab*.tmp.*", tszTempPath); WIN32_FIND_DATA findData; HANDLE hFind = FindFirstFile(tszFilePath, &findData); if (hFind != INVALID_HANDLE_VALUE) { do { - mir_sntprintf(tszFilePath, _T("%s%s"), tszTempPath, findData.cFileName); + mir_sntprintf(tszFilePath, L"%s%s", tszTempPath, findData.cFileName); DeleteFile(tszFilePath); } while (FindNextFile(hFind, &findData)); diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index 5186d2241e..045c72c092 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -109,25 +109,25 @@ void CJabberProto::OnIqResult_CommandExecution(HXML iqNode, CJabberIqInfo *pInfo void CJabberProto::AdHoc_RequestListOfCommands(TCHAR * szResponder, HWND hwndDlg) { m_ThreadInfo->send(XmlNodeIq(AddIQ(&CJabberProto::OnIqResult_ListOfCommands, JABBER_IQ_TYPE_GET, szResponder, 0, -1, hwndDlg)) - << XQUERY(JABBER_FEAT_DISCO_ITEMS) << XATTR(_T("node"), JABBER_FEAT_COMMANDS)); + << XQUERY(JABBER_FEAT_DISCO_ITEMS) << XATTR(L"node", JABBER_FEAT_COMMANDS)); } int CJabberProto::AdHoc_ExecuteCommand(HWND hwndDlg, TCHAR*, JabberAdHocData* dat) { for (int i = 1;; i++) { - HXML itemNode = XmlGetNthChild(dat->CommandsNode, _T("item"), i); + HXML itemNode = XmlGetNthChild(dat->CommandsNode, L"item", i); if (!itemNode) break; if (BST_UNCHECKED == IsDlgButtonChecked(GetDlgItem(hwndDlg, IDC_FRAME), i)) continue; - const TCHAR *node = XmlGetAttrValue(itemNode, _T("node")); + const TCHAR *node = XmlGetAttrValue(itemNode, L"node"); if (node) { - const TCHAR *jid2 = XmlGetAttrValue(itemNode, _T("jid")); + const TCHAR *jid2 = XmlGetAttrValue(itemNode, L"jid"); m_ThreadInfo->send( XmlNodeIq(AddIQ(&CJabberProto::OnIqResult_CommandExecution, JABBER_IQ_TYPE_SET, jid2, 0, -1, hwndDlg)) - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), node) << XATTR(_T("action"), _T("execute"))); + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", node) << XATTR(L"action", L"execute")); EnableDlgItem(hwndDlg, IDC_SUBMIT, FALSE); SetDlgItemText(hwndDlg, IDC_SUBMIT, TranslateT("OK")); @@ -142,8 +142,8 @@ int CJabberProto::AdHoc_ExecuteCommand(HWND hwndDlg, TCHAR*, JabberAdHocData* da int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, JabberAdHocData* dat) { int nodeIdx = 0; - const TCHAR * type = XmlGetAttrValue(iqNode, _T("type")); - if (!type || !mir_tstrcmp(type, _T("error"))) { + const TCHAR * type = XmlGetAttrValue(iqNode, L"type"); + if (!type || !mir_tstrcmp(type, L"error")) { // error occurred here TCHAR buff[255]; const TCHAR *code = NULL; @@ -151,13 +151,13 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe HXML errorNode = XmlGetChild(iqNode, "error"); if (errorNode) { - code = XmlGetAttrValue(errorNode, _T("code")); + code = XmlGetAttrValue(errorNode, L"code"); description = XmlGetText(errorNode); } - mir_sntprintf(buff, TranslateT("Error %s %s"), (code) ? code : _T(""), (description) ? description : _T("")); + mir_sntprintf(buff, TranslateT("Error %s %s"), (code) ? code : L"", (description) ? description : L""); JabberFormSetInstruction(hwndDlg, buff); } - else if (!mir_tstrcmp(type, _T("result"))) { + else if (!mir_tstrcmp(type, L"result")) { BOOL validResponse = FALSE; EnumChildWindows(GetDlgItem(hwndDlg, IDC_FRAME), sttDeleteChildWindowsProc, 0); dat->CurrentHeight = 0; @@ -165,8 +165,8 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe SetScrollPos(GetDlgItem(hwndDlg, IDC_VSCROLL), SB_CTL, 0, FALSE); HXML queryNode = XmlGetChild(iqNode, "query"); if (queryNode) { - const TCHAR *xmlns = XmlGetAttrValue(queryNode, _T("xmlns")); - const TCHAR *node = XmlGetAttrValue(queryNode, _T("node")); + const TCHAR *xmlns = XmlGetAttrValue(queryNode, L"xmlns"); + const TCHAR *node = XmlGetAttrValue(queryNode, L"node"); if (xmlns && node && !mir_tstrcmp(xmlns, JABBER_FEAT_DISCO_ITEMS) && !mir_tstrcmp(node, JABBER_FEAT_COMMANDS)) validResponse = TRUE; } @@ -175,12 +175,12 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe int ypos = 20; for (nodeIdx = 1;; nodeIdx++) { - HXML itemNode = XmlGetNthChild(queryNode, _T("item"), nodeIdx); + HXML itemNode = XmlGetNthChild(queryNode, L"item", nodeIdx); if (!itemNode) break; - const TCHAR *name = XmlGetAttrValue(itemNode, _T("name")); - if (!name) name = XmlGetAttrValue(itemNode, _T("node")); + const TCHAR *name = XmlGetAttrValue(itemNode, L"name"); + if (!name) name = XmlGetAttrValue(itemNode, L"node"); ypos = AdHoc_AddCommandRadio(GetDlgItem(hwndDlg, IDC_FRAME), TranslateTS(name), nodeIdx, ypos, (nodeIdx == 1) ? 1 : 0); dat->CurrentHeight = ypos; } @@ -212,16 +212,16 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA dat->AdHocNode = xmlCopyNode(workNode); const TCHAR *type; - if ((type = XmlGetAttrValue(workNode, _T("type"))) == NULL) return TRUE; - if (!mir_tstrcmp(type, _T("result"))) { + if ((type = XmlGetAttrValue(workNode, L"type")) == NULL) return TRUE; + if (!mir_tstrcmp(type, L"result")) { // wParam = <iq/> node from responder as a result of command execution HXML commandNode, xNode; - if ((commandNode = XmlGetChild(dat->AdHocNode, _T("command"))) == NULL) + if ((commandNode = XmlGetChild(dat->AdHocNode, L"command")) == NULL) return TRUE; - const TCHAR *status = XmlGetAttrValue(commandNode, _T("status")); + const TCHAR *status = XmlGetAttrValue(commandNode, L"status"); if (!status) - status = _T("completed"); + status = L"completed"; if ((xNode = XmlGetChild(commandNode, "x"))) { // use jabber:x:data form @@ -264,12 +264,12 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA EnableDlgItem(hwndDlg, IDC_SUBMIT, TRUE); } - if (!status || mir_tstrcmp(status, _T("executing"))) { + if (!status || mir_tstrcmp(status, L"executing")) { ShowDlgItem(hwndDlg, IDC_SUBMIT, SW_HIDE); SetDlgItemText(hwndDlg, IDCANCEL, TranslateT("Done")); } } - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { // error occurred here int toHide[] = { IDC_FRAME, IDC_FRAME_TEXT, IDC_VSCROLL, IDC_PREV, IDC_NEXT, IDC_COMPLETE, IDC_SUBMIT, 0}; sttShowControls(hwndDlg, FALSE, toHide); @@ -279,10 +279,10 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA TCHAR buff[255]; HXML errorNode = XmlGetChild(workNode , "error"); if (errorNode) { - code = XmlGetAttrValue(errorNode, _T("code")); + code = XmlGetAttrValue(errorNode, L"code"); description = XmlGetText(errorNode); } - mir_sntprintf(buff, TranslateT("Error %s %s"), code ? code : _T(""), description ? description : _T("")); + mir_sntprintf(buff, TranslateT("Error %s %s"), code ? code : L"", description ? description : L""); JabberFormSetInstruction(hwndDlg,buff); } JabberAdHoc_RefreshFrameScroll(hwndDlg, dat); @@ -295,20 +295,20 @@ int CJabberProto::AdHoc_SubmitCommandForm(HWND hwndDlg, JabberAdHocData* dat, TC HXML xNode = XmlGetChild(commandNode, "x"); HXML dataNode = JabberFormGetData(GetDlgItem(hwndDlg, IDC_FRAME), xNode); - LPCTSTR jid2 = XmlGetAttrValue(dat->AdHocNode, _T("from")); + LPCTSTR jid2 = XmlGetAttrValue(dat->AdHocNode, L"from"); XmlNodeIq iq(AddIQ(&CJabberProto::OnIqResult_CommandExecution, JABBER_IQ_TYPE_SET, jid2, 0, -1, hwndDlg)); - HXML command = iq << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS); + HXML command = iq << XCHILDNS(L"command", JABBER_FEAT_COMMANDS); - const TCHAR *sessionId = XmlGetAttrValue(commandNode, _T("sessionid")); + const TCHAR *sessionId = XmlGetAttrValue(commandNode, L"sessionid"); if (sessionId) - command << XATTR(_T("sessionid"), sessionId); + command << XATTR(L"sessionid", sessionId); - const TCHAR *node = XmlGetAttrValue(commandNode, _T("node")); + const TCHAR *node = XmlGetAttrValue(commandNode, L"node"); if (node) - command << XATTR(_T("node"), node); + command << XATTR(L"node", node); if (action) - command << XATTR(_T("action"), action); + command << XATTR(L"action", action); XmlAddChild(command, dataNode); m_ThreadInfo->send(iq); @@ -339,7 +339,7 @@ int CJabberProto::AdHoc_AddCommandRadio(HWND hFrame, TCHAR * labelStr, int id, i ctrlWidth = min(ctrlWidth, strRect.right - strRect.left + 20); ReleaseDC(hFrame, hdc); - HWND hCtrl = CreateWindowEx(0, _T("button"), labelStr, WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTORADIOBUTTON, ctrlOffset, ypos, ctrlWidth, labelHeight, hFrame, (HMENU)id, hInst, NULL); + HWND hCtrl = CreateWindowEx(0, L"button", labelStr, WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTORADIOBUTTON, ctrlOffset, ypos, ctrlWidth, labelHeight, hFrame, (HMENU)id, hInst, NULL); SendMessage(hCtrl, WM_SETFONT, (WPARAM)SendMessage(GetParent(hFrame), WM_GETFONT, 0, 0), 0); SendMessage(hCtrl, BM_SETCHECK, value, 0); return (ypos + labelHeight + verticalStep); @@ -391,8 +391,8 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA else { dat->proto->m_ThreadInfo->send( XmlNodeIq(dat->proto->AddIQ(&CJabberProto::OnIqResult_CommandExecution, JABBER_IQ_TYPE_SET, pStartupParams->m_szJid, 0, -1, hwndDlg)) - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) - << XATTR(_T("node"), pStartupParams->m_szNode) << XATTR(_T("action"), _T("execute"))); + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) + << XATTR(L"node", pStartupParams->m_szNode) << XATTR(L"action", L"execute")); EnableDlgItem(hwndDlg, IDC_SUBMIT, FALSE); SetDlgItemText(hwndDlg, IDC_SUBMIT, TranslateT("OK")); @@ -416,11 +416,11 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA case WM_COMMAND: switch (LOWORD(wParam)) { case IDC_PREV: - return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, _T("prev")); + return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, L"prev"); case IDC_NEXT: - return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, _T("next")); + return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, L"next"); case IDC_COMPLETE: - return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, _T("complete")); + return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, L"complete"); case IDC_SUBMIT: if (!dat->AdHocNode && dat->CommandsNode && LOWORD(wParam) == IDC_SUBMIT) return dat->proto->AdHoc_ExecuteCommand(hwndDlg, dat->ResponderJID, dat); @@ -527,7 +527,7 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM hContact, LPARAM lParam) HMENU hMenu = CreatePopupMenu(); for (int i = 0; i < item->arResources.getCount(); i++) AppendMenu(hMenu, MF_STRING, i + 1, item->arResources[i]->m_tszResourceName); - HWND hwndTemp = CreateWindowEx(WS_EX_TOOLWINDOW, _T("button"), _T("PopupMenuHost"), 0, 0, 0, 10, 10, NULL, NULL, hInst, NULL); + HWND hwndTemp = CreateWindowEx(WS_EX_TOOLWINDOW, L"button", L"PopupMenuHost", 0, 0, 0, 10, 10, NULL, NULL, hInst, NULL); SetForegroundWindow(hwndTemp); RECT rc; POINT pt; @@ -541,7 +541,7 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM hContact, LPARAM lParam) if (selected > 0) { JABBER_RESOURCE_STATUS *r = item->arResources[selected - 1]; if (r) { - mir_tstrncat(jid, _T("/"), _countof(jid) - mir_tstrlen(jid)); + mir_tstrncat(jid, L"/", _countof(jid) - mir_tstrlen(jid)); mir_tstrncat(jid, r->m_tszResourceName, _countof(jid) - mir_tstrlen(jid)); } selected = 1; diff --git a/protocols/JabberG/src/jabber_agent.cpp b/protocols/JabberG/src/jabber_agent.cpp index 43b4ff0c60..f7c2b64a45 100644 --- a/protocols/JabberG/src/jabber_agent.cpp +++ b/protocols/JabberG/src/jabber_agent.cpp @@ -169,13 +169,13 @@ public: break; if (XmlGetName(n)) { - if (!mir_tstrcmp(XmlGetName(n), _T("instructions"))) { + if (!mir_tstrcmp(XmlGetName(n), L"instructions")) { JabberFormSetInstruction(m_hwnd, XmlGetText(n)); } - else if (!mir_tstrcmp(XmlGetName(n), _T("key")) || !mir_tstrcmp(XmlGetName(n), _T("registered"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"key") || !mir_tstrcmp(XmlGetName(n), L"registered")) { // do nothing } - else if (!mir_tstrcmp(XmlGetName(n), _T("password"))) + else if (!mir_tstrcmp(XmlGetName(n), L"password")) JabberFormAppendControl(hFrame, layout_info, JFORM_CTYPE_TEXT_PRIVATE, XmlGetName(n), XmlGetText(n)); else // everything else is a normal text field JabberFormAppendControl(hFrame, layout_info, JFORM_CTYPE_TEXT_SINGLE, XmlGetName(n), XmlGetText(n)); @@ -229,7 +229,7 @@ public: const TCHAR *from; if (m_agentRegIqNode == NULL) return; - if ((from = XmlGetAttrValue(m_agentRegIqNode, _T("from"))) == NULL) return; + if ((from = XmlGetAttrValue(m_agentRegIqNode, L"from")) == NULL) return; if ((queryNode = XmlGetChild(m_agentRegIqNode , "query")) == NULL) return; HWND hFrame = GetDlgItem(m_hwnd, IDC_FRAME); @@ -253,14 +253,14 @@ public: break; if (XmlGetName(n)) { - if (!mir_tstrcmp(XmlGetName(n), _T("key"))) { + if (!mir_tstrcmp(XmlGetName(n), L"key")) { // field that must be passed along with the registration if (XmlGetText(n)) XmlAddChild(query, XmlGetName(n), XmlGetText(n)); else XmlAddChild(query, XmlGetName(n)); } - else if (!mir_tstrcmp(XmlGetName(n), _T("registered")) || !mir_tstrcmp(XmlGetName(n), _T("instructions"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"registered") || !mir_tstrcmp(XmlGetName(n), L"instructions")) { // do nothing, we will skip these } else { diff --git a/protocols/JabberG/src/jabber_api.cpp b/protocols/JabberG/src/jabber_api.cpp index 4c4b93c27c..97850e9336 100644 --- a/protocols/JabberG/src/jabber_api.cpp +++ b/protocols/JabberG/src/jabber_api.cpp @@ -240,7 +240,7 @@ int CJabberProto::RegisterFeature(LPCTSTR szFeature, LPCTSTR szDescription) LPTSTR szExt = mir_tstrdup(szFeature); LPTSTR pSrc, pDst; for (pSrc = szExt, pDst = szExt; *pSrc; pSrc++) - if (_tcschr(_T("bcdfghjklmnpqrstvwxz0123456789"), *pSrc)) + if (_tcschr(L"bcdfghjklmnpqrstvwxz0123456789", *pSrc)) *pDst++ = *pSrc; *pDst = 0; m_clientCapsManager.SetClientCaps(JABBER_CAPS_MIRANDA_NODE, szExt, jcb); diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp index e532302a42..5d9d101ee6 100644 --- a/protocols/JabberG/src/jabber_archive.cpp +++ b/protocols/JabberG/src/jabber_archive.cpp @@ -33,8 +33,8 @@ bool operator==(const DBEVENTINFO &ev1, const DBEVENTINFO &ev2) void CJabberProto::EnableArchive(bool bEnable) { - m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext()) - << XCHILDNS(_T("auto"), JABBER_FEAT_ARCHIVE) << XATTR(_T("save"), (bEnable) ? _T("true") : _T("false"))); + m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext()) + << XCHILDNS(L"auto", JABBER_FEAT_ARCHIVE) << XATTR(L"save", (bEnable) ? L"true" : L"false")); } void CJabberProto::RetrieveMessageArchive(MCONTACT hContact, JABBER_LIST_ITEM *pItem) @@ -45,38 +45,38 @@ void CJabberProto::RetrieveMessageArchive(MCONTACT hContact, JABBER_LIST_ITEM *p pItem->bHistoryRead = true; XmlNodeIq iq(AddIQ(&CJabberProto::OnIqResultGetCollectionList, JABBER_IQ_TYPE_GET)); - HXML list = iq << XCHILDNS(_T("list"), JABBER_FEAT_ARCHIVE) << XATTR(_T("with"), pItem->jid); + HXML list = iq << XCHILDNS(L"list", JABBER_FEAT_ARCHIVE) << XATTR(L"with", pItem->jid); time_t tmLast = getDword(hContact, "LastCollection", 0); if (tmLast) { TCHAR buf[40]; - list << XATTR(_T("start"), time2str(tmLast, buf, _countof(buf))); + list << XATTR(L"start", time2str(tmLast, buf, _countof(buf))); } m_ThreadInfo->send(iq); } void CJabberProto::OnIqResultGetCollectionList(HXML iqNode, CJabberIqInfo*) { - const TCHAR *to = XmlGetAttrValue(iqNode, _T("to")); - if (to == NULL || mir_tstrcmp(XmlGetAttrValue(iqNode, _T("type")), _T("result"))) + const TCHAR *to = XmlGetAttrValue(iqNode, L"to"); + if (to == NULL || mir_tstrcmp(XmlGetAttrValue(iqNode, L"type"), L"result")) return; HXML list = XmlGetChild(iqNode, "list"); - if (!list || mir_tstrcmp(XmlGetAttrValue(list, _T("xmlns")), JABBER_FEAT_ARCHIVE)) + if (!list || mir_tstrcmp(XmlGetAttrValue(list, L"xmlns"), JABBER_FEAT_ARCHIVE)) return; for (int nodeIdx = 1;; nodeIdx++) { - HXML itemNode = XmlGetNthChild(list, _T("chat"), nodeIdx); + HXML itemNode = XmlGetNthChild(list, L"chat", nodeIdx); if (!itemNode) break; - const TCHAR* start = XmlGetAttrValue(itemNode, _T("start")); - const TCHAR* with = XmlGetAttrValue(itemNode, _T("with")); + const TCHAR* start = XmlGetAttrValue(itemNode, L"start"); + const TCHAR* with = XmlGetAttrValue(itemNode, L"with"); if (!start || !with) continue; m_ThreadInfo->send(XmlNodeIq(AddIQ(&CJabberProto::OnIqResultGetCollection, JABBER_IQ_TYPE_GET)) - << XCHILDNS(_T("retrieve"), JABBER_FEAT_ARCHIVE) << XATTR(_T("with"), with) << XATTR(_T("start"), start)); + << XCHILDNS(L"retrieve", JABBER_FEAT_ARCHIVE) << XATTR(L"with", with) << XATTR(L"start", start)); } } @@ -221,15 +221,15 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*) { - if (mir_tstrcmp(XmlGetAttrValue(iqNode, _T("type")), _T("result"))) + if (mir_tstrcmp(XmlGetAttrValue(iqNode, L"type"), L"result")) return; HXML chatNode = XmlGetChild(iqNode, "chat"); - if (!chatNode || mir_tstrcmp(XmlGetAttrValue(chatNode, _T("xmlns")), JABBER_FEAT_ARCHIVE)) + if (!chatNode || mir_tstrcmp(XmlGetAttrValue(chatNode, L"xmlns"), JABBER_FEAT_ARCHIVE)) return; - const TCHAR* start = XmlGetAttrValue(chatNode, _T("start")); - const TCHAR* with = XmlGetAttrValue(chatNode, _T("with")); + const TCHAR* start = XmlGetAttrValue(chatNode, L"start"); + const TCHAR* with = XmlGetAttrValue(chatNode, L"with"); if (!start || !with) return; @@ -249,9 +249,9 @@ void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*) int from; const TCHAR *itemName = XmlGetName(itemNode); - if (!mir_tstrcmp(itemName, _T("to"))) + if (!mir_tstrcmp(itemName, L"to")) from = DBEF_SENT; - else if (!mir_tstrcmp(itemName, _T("from"))) + else if (!mir_tstrcmp(itemName, L"from")) from = 0; else continue; @@ -261,7 +261,7 @@ void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*) continue; const TCHAR *tszBody = XmlGetText(body); - const TCHAR *tszSecs = XmlGetAttrValue(itemNode, _T("secs")); + const TCHAR *tszSecs = XmlGetAttrValue(itemNode, L"secs"); if (!tszBody || !tszSecs) continue; diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index 2106a4b2c7..362e300e89 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -47,7 +47,7 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM param->ppro->m_hwndJabberAddBookmark = hwndDlg; TranslateDialogDefault(hwndDlg); if (item = param->m_item) { - if (!mir_tstrcmp(item->type, _T("conference"))) { + if (!mir_tstrcmp(item->type, L"conference")) { if (!_tcschr(item->jid, _T('@'))) { //no room name - consider it is transport CheckDlgButton(hwndDlg, IDC_AGENT_RADIO, BST_CHECKED); EnableWindow(GetDlgItem(hwndDlg, IDC_NICK), FALSE); @@ -118,9 +118,9 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM item = param->ppro->ListAdd(LIST_BOOKMARK, roomJID); if (IsDlgButtonChecked(hwndDlg, IDC_URL_RADIO) == BST_CHECKED) - replaceStrT(item->type, _T("url")); + replaceStrT(item->type, L"url"); else - replaceStrT(item->type, _T("conference")); + replaceStrT(item->type, L"conference"); GetDlgItemText(hwndDlg, IDC_NICK, text, _countof(text)); replaceStrT(item->nick, text); @@ -265,7 +265,7 @@ void CJabberDlgBookmarks::UpdateData() m_proto->m_ThreadInfo->send( XmlNodeIq( m_proto->AddIQ(&CJabberProto::OnIqResultDiscoBookmarks, JABBER_IQ_TYPE_GET)) - << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(_T("storage"), _T("storage:bookmarks"))); + << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(L"storage", L"storage:bookmarks")); } void CJabberDlgBookmarks::OnInitDialog() @@ -329,7 +329,7 @@ void CJabberDlgBookmarks::OpenBookmark() JABBER_LIST_ITEM *item = m_proto->ListGetItemPtr(LIST_BOOKMARK, address); if (item == NULL) return; - if (!mir_tstrcmpi(item->type, _T("conference"))) { + if (!mir_tstrcmpi(item->type, L"conference")) { m_lvBookmarks.SetItemState(iItem, 0, LVIS_SELECTED); // Unselect the item /* some hack for using bookmark to transport not under XEP-0048 */ @@ -391,7 +391,7 @@ void CJabberDlgBookmarks::OnProtoRefresh(WPARAM, LPARAM) LISTFOREACH(i, m_proto, LIST_BOOKMARK) { if (item = m_proto->ListGetItemPtrFromIndex(i)) { - int itemType = mir_tstrcmpi(item->type, _T("conference")) ? 1 : 0; + int itemType = mir_tstrcmpi(item->type, L"conference") ? 1 : 0; int iItem = m_lvBookmarks.AddItem(item->name, itemType, (LPARAM)item->jid, itemType); m_lvBookmarks.SetItem(iItem, 1, item->jid); if (itemType == 0) diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index 02c7e6b611..8059f3a1bd 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -60,13 +60,13 @@ void CJabberProto::IqResultProxyDiscovery(HXML iqNode, CJabberIqInfo *pInfo) if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) { HXML queryNode = XmlGetChild(iqNode , "query"); if (queryNode) { - const TCHAR *queryXmlns = XmlGetAttrValue(queryNode, _T("xmlns")); + const TCHAR *queryXmlns = XmlGetAttrValue(queryNode, L"xmlns"); if (queryXmlns && !mir_tstrcmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) { HXML streamHostNode = XmlGetChild(queryNode , "streamhost"); if (streamHostNode) { - const TCHAR *streamJid = XmlGetAttrValue(streamHostNode, _T("jid")); - const TCHAR *streamHost = XmlGetAttrValue(streamHostNode, _T("host")); - const TCHAR *streamPort = XmlGetAttrValue(streamHostNode, _T("port")); + const TCHAR *streamJid = XmlGetAttrValue(streamHostNode, L"jid"); + const TCHAR *streamHost = XmlGetAttrValue(streamHostNode, L"host"); + const TCHAR *streamPort = XmlGetAttrValue(streamHostNode, L"port"); if (streamJid && streamHost && streamPort) { jbt->szProxyHost = mir_tstrdup(streamHost); jbt->szProxyJid = mir_tstrdup(streamJid); @@ -94,7 +94,7 @@ void JabberByteSendConnection(HANDLE hConn, DWORD /*dwRemoteIP*/, void* extra) NETLIBCONNINFO connInfo = { sizeof(connInfo) }; CallService(MS_NETLIB_GETCONNECTIONINFO, (WPARAM)hConn, (LPARAM)&connInfo); - mir_sntprintf(szPort, _T("%u"), connInfo.wPort); + mir_sntprintf(szPort, L"%u", connInfo.wPort); ppro->debugLogA("bytestream_send_connection incoming connection accepted: %s", connInfo.szIpPort); if ((item = ppro->ListGetItemPtr(LIST_BYTE, szPort)) == NULL) { @@ -187,7 +187,7 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) nIqId = pInfo->GetIqId(); { XmlNodeIq iq(pInfo); - HXML query = iq << XQUERY(JABBER_FEAT_BYTESTREAMS) << XATTR(_T("sid"), jbt->sid); + HXML query = iq << XQUERY(JABBER_FEAT_BYTESTREAMS) << XATTR(L"sid", jbt->sid); if (bDirect) { ptrA localAddr; @@ -209,24 +209,24 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) if (localAddr == NULL) localAddr = (char*)CallService(MS_NETLIB_ADDRESSTOSTRING, 1, nlb.dwExternalIP); - mir_sntprintf(szPort, _T("%d"), nlb.wPort); + mir_sntprintf(szPort, L"%d", nlb.wPort); JABBER_LIST_ITEM *item = ListAdd(LIST_BYTE, szPort); item->jbt = jbt; hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); jbt->hEvent = hEvent; jbt->hSendEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - query << XCHILD(_T("streamhost")) << XATTR(_T("jid"), m_ThreadInfo->fullJID) << XATTR(_T("host"), _A2T(localAddr)) << XATTRI(_T("port"), nlb.wPort); + query << XCHILD(L"streamhost") << XATTR(L"jid", m_ThreadInfo->fullJID) << XATTR(L"host", _A2T(localAddr)) << XATTRI(L"port", nlb.wPort); NETLIBIPLIST* ihaddr = (NETLIBIPLIST*)CallService(MS_NETLIB_GETMYIP, 1, 0); for (unsigned i=0; i < ihaddr->cbNum; i++) if (mir_strcmp(localAddr, ihaddr->szIp[i])) - query << XCHILD(_T("streamhost")) << XATTR(_T("jid"), m_ThreadInfo->fullJID) << XATTR(_T("host"), _A2T(ihaddr->szIp[i])) << XATTRI(_T("port"), nlb.wPort); + query << XCHILD(L"streamhost") << XATTR(L"jid", m_ThreadInfo->fullJID) << XATTR(L"host", _A2T(ihaddr->szIp[i])) << XATTRI(L"port", nlb.wPort); mir_free(ihaddr); } if (jbt->bProxyDiscovered) - query << XCHILD(_T("streamhost")) << XATTR(_T("jid"), jbt->szProxyJid) << XATTR(_T("host"), jbt->szProxyHost) << XATTR(_T("port"), jbt->szProxyPort); + query << XCHILD(L"streamhost") << XATTR(L"jid", jbt->szProxyJid) << XATTR(L"host", jbt->szProxyHost) << XATTR(L"port", jbt->szProxyPort); jbt->hProxyEvent = CreateEvent(NULL, FALSE, FALSE, NULL); jbt->szStreamhostUsed = NULL; @@ -299,11 +299,11 @@ void CJabberProto::ByteInitiateResult(HXML iqNode, CJabberIqInfo *pInfo) if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) { HXML queryNode = XmlGetChild(iqNode , "query"); if (queryNode) { - const TCHAR *queryXmlns = XmlGetAttrValue(queryNode, _T("xmlns")); + const TCHAR *queryXmlns = XmlGetAttrValue(queryNode, L"xmlns"); if (queryXmlns && !mir_tstrcmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) { HXML streamHostNode = XmlGetChild(queryNode , "streamhost-used"); if (streamHostNode) { - const TCHAR *streamJid = XmlGetAttrValue(streamHostNode, _T("jid")); + const TCHAR *streamJid = XmlGetAttrValue(streamHostNode, L"jid"); if (streamJid) jbt->szStreamhostUsed = mir_tstrdup(streamJid); } } } } @@ -364,7 +364,7 @@ int CJabberProto::ByteSendParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, char* b TCHAR *szInitiatorJid = JabberPrepareJid(jbt->srcJID); TCHAR *szTargetJid = JabberPrepareJid(jbt->dstJID); - mir_sntprintf(text, _T("%s%s%s"), jbt->sid, szInitiatorJid, szTargetJid); + mir_sntprintf(text, L"%s%s%s", jbt->sid, szInitiatorJid, szTargetJid); mir_free(szInitiatorJid); mir_free(szTargetJid); @@ -407,13 +407,13 @@ void CJabberProto::IqResultStreamActivate(HXML iqNode, CJabberIqInfo*) int id = JabberGetPacketID(iqNode); TCHAR listJid[JABBER_MAX_JID_LEN]; - mir_sntprintf(listJid, _T("ftproxy_%d"), id); + mir_sntprintf(listJid, L"ftproxy_%d", id); JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_FTIQID, listJid); if (item == NULL) return; - if (!mir_tstrcmp(XmlGetAttrValue(iqNode, _T("type")), _T("result"))) + if (!mir_tstrcmp(XmlGetAttrValue(iqNode, L"type"), L"result")) item->jbt->bStreamActivated = TRUE; if (item->jbt->hProxyEvent) @@ -433,9 +433,9 @@ void CJabberProto::ByteSendViaProxy(JABBER_BYTE_TRANSFER *jbt) if (jbt == NULL) return; if ((buffer=(char*)mir_alloc(JABBER_NETWORK_BUFFER_SIZE)) == NULL) { - m_ThreadInfo->send( XmlNodeIq(_T("error"), jbt->iqId, jbt->srcJID) - << XCHILD(_T("error")) << XATTRI(_T("code"), 406) << XATTR(_T("type"), _T("auth")) - << XCHILDNS(_T("not-acceptable"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"))); + m_ThreadInfo->send( XmlNodeIq(L"error", jbt->iqId, jbt->srcJID) + << XCHILD(L"error") << XATTRI(L"code", 406) << XATTR(L"type", L"auth") + << XCHILDNS(L"not-acceptable", L"urn:ietf:params:xml:ns:xmpp-stanzas")); return; } @@ -482,9 +482,9 @@ void CJabberProto::ByteSendViaProxy(JABBER_BYTE_TRANSFER *jbt) (this->*jbt->pfnFinal)((jbt->state == JBT_DONE) ? TRUE : FALSE, jbt->ft); jbt->ft = NULL; if (!validStreamhost) - m_ThreadInfo->send( XmlNodeIq(_T("error"), jbt->iqId, jbt->srcJID) - << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel")) - << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"))); + m_ThreadInfo->send( XmlNodeIq(L"error", jbt->iqId, jbt->srcJID) + << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel") + << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas")); } int CJabberProto::ByteSendProxyParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, char* buffer, int datalen) @@ -513,7 +513,7 @@ int CJabberProto::ByteSendProxyParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, ch TCHAR *szInitiatorJid = JabberPrepareJid(jbt->srcJID); TCHAR *szTargetJid = JabberPrepareJid(jbt->dstJID); - mir_sntprintf(text, _T("%s%s%s"), jbt->sid, szInitiatorJid, szTargetJid); + mir_sntprintf(text, L"%s%s%s", jbt->sid, szInitiatorJid, szTargetJid); mir_free(szInitiatorJid); mir_free(szTargetJid); @@ -556,14 +556,14 @@ int CJabberProto::ByteSendProxyParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, ch int iqId = SerialNext(); TCHAR listJid[256]; - mir_sntprintf(listJid, _T("ftproxy_%d"), iqId); + mir_sntprintf(listJid, L"ftproxy_%d", iqId); JABBER_LIST_ITEM *item = ListAdd(LIST_FTIQID, listJid); item->jbt = jbt; m_ThreadInfo->send( XmlNodeIq(AddIQ(&CJabberProto::IqResultStreamActivate, JABBER_IQ_TYPE_SET, jbt->streamhostJID, 0, iqId)) - << XQUERY(JABBER_FEAT_BYTESTREAMS) << XATTR(_T("sid"), jbt->sid) << XCHILD(_T("activate"), jbt->dstJID)); + << XQUERY(JABBER_FEAT_BYTESTREAMS) << XATTR(L"sid", jbt->sid) << XCHILD(L"activate", jbt->dstJID)); WaitForSingleObject(jbt->hProxyEvent, INFINITE); @@ -602,13 +602,13 @@ void __cdecl CJabberProto::ByteReceiveThread(JABBER_BYTE_TRANSFER *jbt) jbt->state = JBT_INIT; if (iqNode = jbt->iqNode) { - from = XmlGetAttrValue(iqNode, _T("from")); - to = XmlGetAttrValue(iqNode, _T("to")); - szId = XmlGetAttrValue(iqNode, _T("id")); + from = XmlGetAttrValue(iqNode, L"from"); + to = XmlGetAttrValue(iqNode, L"to"); + szId = XmlGetAttrValue(iqNode, L"id"); queryNode = XmlGetChild(iqNode, "query"); if (queryNode) - sid = XmlGetAttrValue(queryNode, _T("sid")); + sid = XmlGetAttrValue(queryNode, L"sid"); } if (szId && from && to && sid && (n = XmlGetChild(queryNode, "streamhost")) != NULL) { @@ -618,15 +618,15 @@ void __cdecl CJabberProto::ByteReceiveThread(JABBER_BYTE_TRANSFER *jbt) jbt->sid = mir_tstrdup(sid); if ((buffer = (char*)mir_alloc(JABBER_NETWORK_BUFFER_SIZE))) { - for (i = 1; (n = XmlGetNthChild(queryNode, _T("streamhost"), i)) != NULL; i++) { - if ((szHost = XmlGetAttrValue(n, _T("host"))) != NULL && - (szPort = XmlGetAttrValue(n, _T("port"))) != NULL && - (str = XmlGetAttrValue(n, _T("jid"))) != NULL) { + for (i = 1; (n = XmlGetNthChild(queryNode, L"streamhost", i)) != NULL; i++) { + if ((szHost = XmlGetAttrValue(n, L"host")) != NULL && + (szPort = XmlGetAttrValue(n, L"port")) != NULL && + (str = XmlGetAttrValue(n, L"jid")) != NULL) { port = (WORD)_ttoi(szPort); replaceStrT(jbt->streamhostJID, str); - debugLog(_T("bytestream_recv connecting to %s:%d"), szHost, port); + debugLog(L"bytestream_recv connecting to %s:%d", szHost, port); NETLIBOPENCONNECTION nloc = { 0 }; nloc.cbSize = sizeof(nloc); nloc.szHost = mir_t2a(szHost); @@ -674,9 +674,9 @@ void __cdecl CJabberProto::ByteReceiveThread(JABBER_BYTE_TRANSFER *jbt) if (!validStreamhost && szId && from) { debugLogA("bytestream_recv_connection session not completed"); - m_ThreadInfo->send(XmlNodeIq(_T("error"), szId, from) - << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel")) - << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"))); + m_ThreadInfo->send(XmlNodeIq(L"error", szId, from) + << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel") + << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas")); } delete jbt; @@ -709,7 +709,7 @@ int CJabberProto::ByteReceiveParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, char { ptrT szInitiatorJid(JabberPrepareJid(jbt->srcJID)); ptrT szTargetJid(JabberPrepareJid(jbt->dstJID)); - mir_sntprintf(text, _T("%s%s%s"), jbt->sid, szInitiatorJid, szTargetJid); + mir_sntprintf(text, L"%s%s%s", jbt->sid, szInitiatorJid, szTargetJid); } T2Utf szAuthString(text); @@ -746,8 +746,8 @@ int CJabberProto::ByteReceiveParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, char jbt->state = JBT_RECVING; m_ThreadInfo->send( - XmlNodeIq(_T("result"), jbt->iqId, jbt->srcJID) << XQUERY(JABBER_FEAT_BYTESTREAMS) - << XCHILD(_T("streamhost-used")) << XATTR(_T("jid"), jbt->streamhostJID)); + XmlNodeIq(L"result", jbt->iqId, jbt->srcJID) << XQUERY(JABBER_FEAT_BYTESTREAMS) + << XCHILD(L"streamhost-used") << XATTR(L"jid", jbt->streamhostJID)); } else jbt->state = JBT_SOCKSERR; break; diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp index 602b47f7a7..eb859e524b 100644 --- a/protocols/JabberG/src/jabber_caps.cpp +++ b/protocols/JabberG/src/jabber_caps.cpp @@ -109,22 +109,22 @@ void CJabberProto::OnIqResultCapsDiscoInfoSI(HXML, CJabberIqInfo *pInfo) if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT && query) { // XEP-0232 support HXML xform; - for (int i = 1; (xform = XmlGetNthChild(query, _T("x"), i)) != NULL; i++) { - TCHAR *szFormTypeValue = XPath(xform, _T("field[@var='FORM_TYPE']/value")); - if (szFormTypeValue && !mir_tstrcmp(szFormTypeValue, _T("urn:xmpp:dataforms:softwareinfo"))) { - TCHAR *szTmp = XPath(xform, _T("field[@var='os']/value")); + for (int i = 1; (xform = XmlGetNthChild(query, L"x", i)) != NULL; i++) { + TCHAR *szFormTypeValue = XPath(xform, L"field[@var='FORM_TYPE']/value"); + if (szFormTypeValue && !mir_tstrcmp(szFormTypeValue, L"urn:xmpp:dataforms:softwareinfo")) { + TCHAR *szTmp = XPath(xform, L"field[@var='os']/value"); if (szTmp) r->m_tszOs = mir_tstrdup(szTmp); - szTmp = XPath(xform, _T("field[@var='os_version']/value")); + szTmp = XPath(xform, L"field[@var='os_version']/value"); if (szTmp) r->m_tszOsVersion = mir_tstrdup(szTmp); - szTmp = XPath(xform, _T("field[@var='software']/value")); + szTmp = XPath(xform, L"field[@var='software']/value"); if (szTmp) r->m_tszSoftware = mir_tstrdup(szTmp); - szTmp = XPath(xform, _T("field[@var='software_version']/value")); + szTmp = XPath(xform, L"field[@var='software_version']/value"); if (szTmp) r->m_tszSoftwareVersion = mir_tstrdup(szTmp); - szTmp = XPath(xform, _T("field[@var='x-miranda-core-version']/value")); + szTmp = XPath(xform, L"field[@var='x-miranda-core-version']/value"); if (szTmp) r->m_tszXMirandaCoreVersion = mir_tstrdup(szTmp); @@ -142,8 +142,8 @@ void CJabberProto::OnIqResultCapsDiscoInfo(HXML, CJabberIqInfo *pInfo) if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT && query) { JabberCapsBits jcbCaps = 0; HXML feature; - for (int i = 1; (feature = XmlGetNthChild(query, _T("feature"), i)) != NULL; i++) { - const TCHAR *featureName = XmlGetAttrValue(feature, _T("var")); + for (int i = 1; (feature = XmlGetNthChild(query, L"feature", i)) != NULL; i++) { + const TCHAR *featureName = XmlGetAttrValue(feature, L"var"); if (!featureName) continue; @@ -201,7 +201,7 @@ JabberCapsBits CJabberProto::GetTotalJidCapabilites(const TCHAR *jid) if (item) { for (int i = 0; i < item->arResources.getCount(); i++) { TCHAR szFullJid[JABBER_MAX_JID_LEN]; - mir_sntprintf(szFullJid, _T("%s/%s"), szBareJid, item->arResources[i]->m_tszResourceName); + mir_sntprintf(szFullJid, L"%s/%s", szBareJid, item->arResources[i]->m_tszResourceName); JabberCapsBits jcb = GetResourceCapabilites(szFullJid, FALSE); if (!(jcb & JABBER_RESOURCE_CAPS_ERROR)) jcbToReturn |= jcb; @@ -240,8 +240,8 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen r->m_dwDiscoInfoRequestTime = pInfo->GetRequestTime(); TCHAR queryNode[512]; - mir_sntprintf(queryNode, _T("%s#%s"), r->m_tszCapsNode, r->m_tszCapsVer); - m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), queryNode)); + mir_sntprintf(queryNode, L"%s#%s", r->m_tszCapsNode, r->m_tszCapsVer); + m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", queryNode)); bRequestSent = TRUE; } @@ -253,7 +253,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen if (jcbMainCaps != JABBER_RESOURCE_CAPS_TIMEOUT && r->m_tszCapsExt) { TCHAR *caps = mir_tstrdup(r->m_tszCapsExt); - TCHAR *token = _tcstok(caps, _T(" ")); + TCHAR *token = _tcstok(caps, L" "); while (token) { switch (jcbExtCaps = m_clientCapsManager.GetClientCaps(r->m_tszCapsNode, token)) { case JABBER_RESOURCE_CAPS_ERROR: @@ -268,7 +268,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen m_clientCapsManager.SetClientCaps(r->m_tszCapsNode, token, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId()); m_ThreadInfo->send( - XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), CMString(FORMAT, _T("%s#%s"), r->m_tszCapsNode, token))); + XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", CMString(FORMAT, L"%s#%s", r->m_tszCapsNode, token))); bRequestSent = TRUE; } @@ -282,7 +282,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen jcbCaps |= jcbExtCaps; } - token = _tcstok(NULL, _T(" ")); + token = _tcstok(NULL, L" "); } mir_free(caps); @@ -349,17 +349,17 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen JabberCapsBits jcbMainCaps = m_clientCapsManager.GetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion); if (jcbMainCaps == JABBER_RESOURCE_CAPS_ERROR) { // Bombus hack: - if (!mir_tstrcmp(r->m_tszSoftware, _T("Bombus")) || !mir_tstrcmp(r->m_tszSoftware, _T("BombusMod"))) { + if (!mir_tstrcmp(r->m_tszSoftware, L"Bombus") || !mir_tstrcmp(r->m_tszSoftware, L"BombusMod")) { jcbMainCaps = JABBER_CAPS_SI | JABBER_CAPS_SI_FT | JABBER_CAPS_IBB | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY | JABBER_CAPS_DATA_FORMS | JABBER_CAPS_LAST_ACTIVITY | JABBER_CAPS_VERSION | JABBER_CAPS_COMMANDS | JABBER_CAPS_VCARD_TEMP; m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps); } // Neos hack: - else if (!mir_tstrcmp(r->m_tszSoftware, _T("neos"))) { + else if (!mir_tstrcmp(r->m_tszSoftware, L"neos")) { jcbMainCaps = JABBER_CAPS_OOB | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY | JABBER_CAPS_LAST_ACTIVITY | JABBER_CAPS_VERSION; m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps); } // sim hack: - else if (!mir_tstrcmp(r->m_tszSoftware, _T("sim"))) { + else if (!mir_tstrcmp(r->m_tszSoftware, L"sim")) { jcbMainCaps = JABBER_CAPS_OOB | JABBER_CAPS_VERSION | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY; m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps); } @@ -558,12 +558,12 @@ JabberCapsBits CJabberClientCapsManager::GetClientCaps(TCHAR *szNode, TCHAR *szV CJabberClientCaps *pClient = FindClient(szNode); if (!pClient) { lck.unlock(); - ppro->debugLog(_T("CAPS: get no caps for: %s, %s"), szNode, szVer); + ppro->debugLog(L"CAPS: get no caps for: %s, %s", szNode, szVer); return JABBER_RESOURCE_CAPS_UNINIT; } JabberCapsBits jcbCaps = pClient->GetPartialCaps(szVer); lck.unlock(); - ppro->debugLog(_T("CAPS: get caps %I64x for: %s, %s"), jcbCaps, szNode, szVer); + ppro->debugLog(L"CAPS: get caps %I64x for: %s, %s", jcbCaps, szNode, szVer); return jcbCaps; } @@ -581,7 +581,7 @@ BOOL CJabberClientCapsManager::SetClientCaps(const TCHAR *szNode, const TCHAR *s } BOOL bOk = pClient->SetPartialCaps(szVer, jcbCaps, nIqId); lck.unlock(); - ppro->debugLog(_T("CAPS: set caps %I64x for: %s, %s"), jcbCaps, szNode, szVer); + ppro->debugLog(L"CAPS: set caps %I64x for: %s, %s", jcbCaps, szNode, szVer); return bOk; } @@ -615,7 +615,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con continue; TCHAR szExtCap[ 512 ]; - mir_sntprintf(szExtCap, _T("%s#%s"), JABBER_CAPS_MIRANDA_NODE, g_JabberFeatCapPairsExt[i].szFeature); + mir_sntprintf(szExtCap, L"%s#%s", JABBER_CAPS_MIRANDA_NODE, g_JabberFeatCapPairsExt[i].szFeature); if (!mir_tstrcmp(szNode, szExtCap)) { jcb = g_JabberFeatCapPairsExt[i].jcbCap; break; @@ -625,7 +625,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con // check features registered through IJabberNetInterface::RegisterFeature() and IJabberNetInterface::AddFeatures() for (i=0; i < ppro->m_lstJabberFeatCapPairsDynamic.getCount(); i++) { TCHAR szExtCap[ 512 ]; - mir_sntprintf(szExtCap, _T("%s#%s"), JABBER_CAPS_MIRANDA_NODE, ppro->m_lstJabberFeatCapPairsDynamic[i]->szExt); + mir_sntprintf(szExtCap, L"%s#%s", JABBER_CAPS_MIRANDA_NODE, ppro->m_lstJabberFeatCapPairsDynamic[i]->szExt); if (!mir_tstrcmp(szNode, szExtCap)) { jcb = ppro->m_lstJabberFeatCapPairsDynamic[i]->jcbCap; break; @@ -645,22 +645,22 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con if (!ppro->m_options.AllowVersionRequests) jcb &= ~JABBER_CAPS_VERSION; - XmlNodeIq iq(_T("result"), pInfo); + XmlNodeIq iq(L"result", pInfo); HXML query = iq << XQUERY(JABBER_FEAT_DISCO_INFO); if (szNode) - query << XATTR(_T("node"), szNode); + query << XATTR(L"node", szNode); - query << XCHILD(_T("identity")) << XATTR(_T("category"), _T("client")) - << XATTR(_T("type"), _T("pc")) << XATTR(_T("name"), _T("Miranda")); + query << XCHILD(L"identity") << XATTR(L"category", L"client") + << XATTR(L"type", L"pc") << XATTR(L"name", L"Miranda"); for (i=0; g_JabberFeatCapPairs[i].szFeature; i++) if (jcb & g_JabberFeatCapPairs[i].jcbCap) - query << XCHILD(_T("feature")) << XATTR(_T("var"), g_JabberFeatCapPairs[i].szFeature); + query << XCHILD(L"feature") << XATTR(L"var", g_JabberFeatCapPairs[i].szFeature); for (i=0; i < ppro->m_lstJabberFeatCapPairsDynamic.getCount(); i++) if (jcb & ppro->m_lstJabberFeatCapPairsDynamic[i]->jcbCap) - query << XCHILD(_T("feature")) << XATTR(_T("var"), ppro->m_lstJabberFeatCapPairsDynamic[i]->szFeature); + query << XCHILD(L"feature") << XATTR(L"var", ppro->m_lstJabberFeatCapPairsDynamic[i]->szFeature); if (ppro->m_options.AllowVersionRequests && !szNode) { TCHAR szOsBuffer[256] = {0}; @@ -668,26 +668,26 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con if (ppro->m_options.ShowOSVersion) { if (!GetOSDisplayString(szOsBuffer, _countof(szOsBuffer))) - mir_tstrncpy(szOsBuffer, _T(""), _countof(szOsBuffer)); + mir_tstrncpy(szOsBuffer, L"", _countof(szOsBuffer)); else { - TCHAR *szOsWindows = _T("Microsoft Windows"); + TCHAR *szOsWindows = L"Microsoft Windows"; size_t nOsWindowsLength = mir_tstrlen(szOsWindows); if (!_tcsnicmp(szOsBuffer, szOsWindows, nOsWindowsLength)) os += nOsWindowsLength + 1; } } - HXML form = query << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("result")); - form << XCHILD(_T("field")) << XATTR(_T("var"), _T("FORM_TYPE")) << XATTR(_T("type"), _T("hidden")) - << XCHILD(_T("value"), _T("urn:xmpp:dataforms:softwareinfo")); + HXML form = query << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"result"); + form << XCHILD(L"field") << XATTR(L"var", L"FORM_TYPE") << XATTR(L"type", L"hidden") + << XCHILD(L"value", L"urn:xmpp:dataforms:softwareinfo"); if (ppro->m_options.ShowOSVersion) { - form << XCHILD(_T("field")) << XATTR(_T("var"), _T("os")) << XCHILD(_T("value"), _T("Microsoft Windows")); - form << XCHILD(_T("field")) << XATTR(_T("var"), _T("os_version")) << XCHILD(_T("value"), os); + form << XCHILD(L"field") << XATTR(L"var", L"os") << XCHILD(L"value", L"Microsoft Windows"); + form << XCHILD(L"field") << XATTR(L"var", L"os_version") << XCHILD(L"value", os); } - form << XCHILD(_T("field")) << XATTR(_T("var"), _T("software")) << XCHILD(_T("value"), _T("Miranda NG Jabber Protocol")); - form << XCHILD(_T("field")) << XATTR(_T("var"), _T("software_version")) << XCHILD(_T("value"), _T(__VERSION_STRING_DOTS)); - form << XCHILD(_T("field")) << XATTR(_T("var"), _T("x-miranda-core-version")) << XCHILD(_T("value"), szCoreVersion); + form << XCHILD(L"field") << XATTR(L"var", L"software") << XCHILD(L"value", L"Miranda NG Jabber Protocol"); + form << XCHILD(L"field") << XATTR(L"var", L"software_version") << XCHILD(L"value", _T(__VERSION_STRING_DOTS)); + form << XCHILD(L"field") << XATTR(L"var", L"x-miranda-core-version") << XCHILD(L"value", szCoreVersion); } ppro->m_ThreadInfo->send(iq); diff --git a/protocols/JabberG/src/jabber_caps.h b/protocols/JabberG/src/jabber_caps.h index 6546d9e0f6..d9ed0422c4 100644 --- a/protocols/JabberG/src/jabber_caps.h +++ b/protocols/JabberG/src/jabber_caps.h @@ -46,116 +46,116 @@ typedef unsigned __int64 JabberCapsBits; #define JABBER_RESOURCE_CAPS_NONE 0x0000000000000000 #endif -#define JABBER_FEAT_DISCO_INFO _T("http://jabber.org/protocol/disco#info") +#define JABBER_FEAT_DISCO_INFO L"http://jabber.org/protocol/disco#info" #define JABBER_CAPS_DISCO_INFO ((JabberCapsBits)1) -#define JABBER_FEAT_DISCO_ITEMS _T("http://jabber.org/protocol/disco#items") +#define JABBER_FEAT_DISCO_ITEMS L"http://jabber.org/protocol/disco#items" #define JABBER_CAPS_DISCO_ITEMS ((JabberCapsBits)1<<1) -#define JABBER_FEAT_ENTITY_CAPS _T("http://jabber.org/protocol/caps") +#define JABBER_FEAT_ENTITY_CAPS L"http://jabber.org/protocol/caps" #define JABBER_CAPS_ENTITY_CAPS ((JabberCapsBits)1<<2) -#define JABBER_FEAT_SI _T("http://jabber.org/protocol/si") +#define JABBER_FEAT_SI L"http://jabber.org/protocol/si" #define JABBER_CAPS_SI ((JabberCapsBits)1<<3) -#define JABBER_FEAT_SI_FT _T("http://jabber.org/protocol/si/profile/file-transfer") +#define JABBER_FEAT_SI_FT L"http://jabber.org/protocol/si/profile/file-transfer" #define JABBER_CAPS_SI_FT ((JabberCapsBits)1<<4) -#define JABBER_FEAT_BYTESTREAMS _T("http://jabber.org/protocol/bytestreams") +#define JABBER_FEAT_BYTESTREAMS L"http://jabber.org/protocol/bytestreams" #define JABBER_CAPS_BYTESTREAMS ((JabberCapsBits)1<<5) -#define JABBER_FEAT_IBB _T("http://jabber.org/protocol/ibb") +#define JABBER_FEAT_IBB L"http://jabber.org/protocol/ibb" #define JABBER_CAPS_IBB ((JabberCapsBits)1<<6) -#define JABBER_FEAT_OOB _T("jabber:iq:oob") -#define JABBER_FEAT_OOB2 _T("jabber:x:oob") +#define JABBER_FEAT_OOB L"jabber:iq:oob" +#define JABBER_FEAT_OOB2 L"jabber:x:oob" #define JABBER_CAPS_OOB ((JabberCapsBits)1<<7) -#define JABBER_FEAT_COMMANDS _T("http://jabber.org/protocol/commands") +#define JABBER_FEAT_COMMANDS L"http://jabber.org/protocol/commands" #define JABBER_CAPS_COMMANDS ((JabberCapsBits)1<<8) -#define JABBER_FEAT_REGISTER _T("jabber:iq:register") +#define JABBER_FEAT_REGISTER L"jabber:iq:register" #define JABBER_CAPS_REGISTER ((JabberCapsBits)1<<9) -#define JABBER_FEAT_MUC _T("http://jabber.org/protocol/muc") +#define JABBER_FEAT_MUC L"http://jabber.org/protocol/muc" #define JABBER_CAPS_MUC ((JabberCapsBits)1<<10) -#define JABBER_FEAT_CHATSTATES _T("http://jabber.org/protocol/chatstates") +#define JABBER_FEAT_CHATSTATES L"http://jabber.org/protocol/chatstates" #define JABBER_CAPS_CHATSTATES ((JabberCapsBits)1<<11) -#define JABBER_FEAT_LAST_ACTIVITY _T("jabber:iq:last") +#define JABBER_FEAT_LAST_ACTIVITY L"jabber:iq:last" #define JABBER_CAPS_LAST_ACTIVITY ((JabberCapsBits)1<<12) -#define JABBER_FEAT_VERSION _T("jabber:iq:version") +#define JABBER_FEAT_VERSION L"jabber:iq:version" #define JABBER_CAPS_VERSION ((JabberCapsBits)1<<13) -#define JABBER_FEAT_ENTITY_TIME _T("urn:xmpp:time") +#define JABBER_FEAT_ENTITY_TIME L"urn:xmpp:time" #define JABBER_CAPS_ENTITY_TIME ((JabberCapsBits)1<<14) -#define JABBER_FEAT_PING _T("urn:xmpp:ping") +#define JABBER_FEAT_PING L"urn:xmpp:ping" #define JABBER_CAPS_PING ((JabberCapsBits)1<<15) -#define JABBER_FEAT_DATA_FORMS _T("jabber:x:data") +#define JABBER_FEAT_DATA_FORMS L"jabber:x:data" #define JABBER_CAPS_DATA_FORMS ((JabberCapsBits)1<<16) -#define JABBER_FEAT_MESSAGE_EVENTS _T("jabber:x:event") +#define JABBER_FEAT_MESSAGE_EVENTS L"jabber:x:event" #define JABBER_CAPS_MESSAGE_EVENTS ((JabberCapsBits)1<<17) -#define JABBER_FEAT_VCARD_TEMP _T("vcard-temp") +#define JABBER_FEAT_VCARD_TEMP L"vcard-temp" #define JABBER_CAPS_VCARD_TEMP ((JabberCapsBits)1<<18) -#define JABBER_FEAT_AVATAR _T("jabber:iq:avatar") -#define JABBER_FEAT_SERVER_AVATAR _T("storage:client:avatar") +#define JABBER_FEAT_AVATAR L"jabber:iq:avatar" +#define JABBER_FEAT_SERVER_AVATAR L"storage:client:avatar" #define JABBER_CAPS_AVATAR ((JabberCapsBits)1<<19) -#define JABBER_FEAT_XHTML _T("http://jabber.org/protocol/xhtml-im") +#define JABBER_FEAT_XHTML L"http://jabber.org/protocol/xhtml-im" #define JABBER_CAPS_XHTML ((JabberCapsBits)1<<20) -#define JABBER_FEAT_AGENTS _T("jabber:iq:agents") +#define JABBER_FEAT_AGENTS L"jabber:iq:agents" #define JABBER_CAPS_AGENTS ((JabberCapsBits)1<<21) -#define JABBER_FEAT_BROWSE _T("jabber:iq:browse") +#define JABBER_FEAT_BROWSE L"jabber:iq:browse" #define JABBER_CAPS_BROWSE ((JabberCapsBits)1<<22) -#define JABBER_FEAT_FEATURE_NEG _T("http://jabber.org/protocol/feature-neg") +#define JABBER_FEAT_FEATURE_NEG L"http://jabber.org/protocol/feature-neg" #define JABBER_CAPS_FEATURE_NEG ((JabberCapsBits)1<<23) -#define JABBER_FEAT_AMP _T("http://jabber.org/protocol/amp") +#define JABBER_FEAT_AMP L"http://jabber.org/protocol/amp" #define JABBER_CAPS_AMP ((JabberCapsBits)1<<24) -#define JABBER_FEAT_USER_MOOD _T("http://jabber.org/protocol/mood") +#define JABBER_FEAT_USER_MOOD L"http://jabber.org/protocol/mood" #define JABBER_CAPS_USER_MOOD ((JabberCapsBits)1<<25) -#define JABBER_FEAT_USER_MOOD_NOTIFY _T("http://jabber.org/protocol/mood+notify") +#define JABBER_FEAT_USER_MOOD_NOTIFY L"http://jabber.org/protocol/mood+notify" #define JABBER_CAPS_USER_MOOD_NOTIFY ((JabberCapsBits)1<<26) -#define JABBER_FEAT_PUBSUB _T("http://jabber.org/protocol/pubsub") +#define JABBER_FEAT_PUBSUB L"http://jabber.org/protocol/pubsub" #define JABBER_CAPS_PUBSUB ((JabberCapsBits)1<<27) -#define JABBER_FEAT_SECUREIM _T("http://miranda-ng.org/caps/secureim") +#define JABBER_FEAT_SECUREIM L"http://miranda-ng.org/caps/secureim" #define JABBER_CAPS_SECUREIM ((JabberCapsBits)1<<28) -#define JABBER_FEAT_MIROTR _T("http://miranda-ng.org/caps/mirotr") +#define JABBER_FEAT_MIROTR L"http://miranda-ng.org/caps/mirotr" #define JABBER_CAPS_MIROTR ((JabberCapsBits)1<<42) -#define JABBER_FEAT_NEWGPG _T("http://miranda-ng.org/caps/new_gpg") +#define JABBER_FEAT_NEWGPG L"http://miranda-ng.org/caps/new_gpg" #define JABBER_CAPS_NEWGPG ((JabberCapsBits)1<<43) #define JABBER_CAPS_PLATFORMX86 ((JabberCapsBits)1<<44) #define JABBER_CAPS_PLATFORMX64 ((JabberCapsBits)1<<45) -#define JABBER_FEAT_PRIVACY_LISTS _T("jabber:iq:privacy") +#define JABBER_FEAT_PRIVACY_LISTS L"jabber:iq:privacy" #define JABBER_CAPS_PRIVACY_LISTS ((JabberCapsBits)1<<29) -#define JABBER_FEAT_MESSAGE_RECEIPTS _T("urn:xmpp:receipts") +#define JABBER_FEAT_MESSAGE_RECEIPTS L"urn:xmpp:receipts" #define JABBER_CAPS_MESSAGE_RECEIPTS ((JabberCapsBits)1<<30) -#define JABBER_FEAT_USER_TUNE _T("http://jabber.org/protocol/tune") +#define JABBER_FEAT_USER_TUNE L"http://jabber.org/protocol/tune" #define JABBER_CAPS_USER_TUNE ((JabberCapsBits)1<<31) -#define JABBER_FEAT_USER_TUNE_NOTIFY _T("http://jabber.org/protocol/tune+notify") +#define JABBER_FEAT_USER_TUNE_NOTIFY L"http://jabber.org/protocol/tune+notify" #define JABBER_CAPS_USER_TUNE_NOTIFY ((JabberCapsBits)1<<32) -#define JABBER_FEAT_PRIVATE_STORAGE _T("jabber:iq:private") +#define JABBER_FEAT_PRIVATE_STORAGE L"jabber:iq:private" #define JABBER_CAPS_PRIVATE_STORAGE ((JabberCapsBits)1<<33) -#define JABBER_FEAT_ARCHIVE _T("urn:xmpp:archive") -#define JABBER_FEAT_ARCHIVE_AUTO _T("urn:xmpp:archive:auto") +#define JABBER_FEAT_ARCHIVE L"urn:xmpp:archive" +#define JABBER_FEAT_ARCHIVE_AUTO L"urn:xmpp:archive:auto" #define JABBER_CAPS_ARCHIVE_AUTO ((JabberCapsBits)1<<34) -#define JABBER_FEAT_ARCHIVE_MANAGE _T("urn:xmpp:archive:manage") +#define JABBER_FEAT_ARCHIVE_MANAGE L"urn:xmpp:archive:manage" #define JABBER_CAPS_ARCHIVE_MANAGE ((JabberCapsBits)1<<35) -#define JABBER_FEAT_CAPTCHA _T("urn:xmpp:captcha") +#define JABBER_FEAT_CAPTCHA L"urn:xmpp:captcha" -#define JABBER_FEAT_ATTENTION _T("urn:xmpp:attention:0") +#define JABBER_FEAT_ATTENTION L"urn:xmpp:attention:0" #define JABBER_CAPS_ATTENTION ((JabberCapsBits)1<<36) // deferred -#define JABBER_FEAT_USER_ACTIVITY _T("http://jabber.org/protocol/activity") +#define JABBER_FEAT_USER_ACTIVITY L"http://jabber.org/protocol/activity" #define JABBER_CAPS_USER_ACTIVITY ((JabberCapsBits)1<<37) -#define JABBER_FEAT_USER_ACTIVITY_NOTIFY _T("http://jabber.org/protocol/activity+notify") +#define JABBER_FEAT_USER_ACTIVITY_NOTIFY L"http://jabber.org/protocol/activity+notify" #define JABBER_CAPS_USER_ACTIVITY_NOTIFY ((JabberCapsBits)1<<38) -#define JABBER_FEAT_MIRANDA_NOTES _T("http://miranda-ng.org/storage#notes") +#define JABBER_FEAT_MIRANDA_NOTES L"http://miranda-ng.org/storage#notes" #define JABBER_CAPS_MIRANDA_NOTES ((JabberCapsBits)1<<39) -#define JABBER_FEAT_JINGLE _T("urn:xmpp:jingle:1") +#define JABBER_FEAT_JINGLE L"urn:xmpp:jingle:1" #define JABBER_CAPS_JINGLE ((JabberCapsBits)1<<40) -#define JABBER_FEAT_ROSTER_EXCHANGE _T("http://jabber.org/protocol/rosterx") +#define JABBER_FEAT_ROSTER_EXCHANGE L"http://jabber.org/protocol/rosterx" #define JABBER_CAPS_ROSTER_EXCHANGE ((JabberCapsBits)1<<41) -#define JABBER_FEAT_DIRECT_MUC_INVITE _T("jabber:x:conference") +#define JABBER_FEAT_DIRECT_MUC_INVITE L"jabber:x:conference" #define JABBER_CAPS_DIRECT_MUC_INVITE ((JabberCapsBits)1<<42) -#define JABBER_FEAT_PUBSUB_EVENT _T("http://jabber.org/protocol/pubsub#event") -#define JABBER_FEAT_PUBSUB_NODE_CONFIG _T("http://jabber.org/protocol/pubsub#node_config") +#define JABBER_FEAT_PUBSUB_EVENT L"http://jabber.org/protocol/pubsub#event" +#define JABBER_FEAT_PUBSUB_NODE_CONFIG L"http://jabber.org/protocol/pubsub#node_config" #define JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY ((JabberCapsBits)1<<62) #define JABBER_CAPS_OTHER_SPECIAL (JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY|JABBER_RESOURCE_CAPS_ERROR) // must contain all the caps not listed in g_JabberFeatCapPairs, to prevent using these bits for features registered through IJabberNetInterface::RegisterFeature() -#define JABBER_CAPS_MIRANDA_NODE _T("http://miranda-ng.org/caps") +#define JABBER_CAPS_MIRANDA_NODE L"http://miranda-ng.org/caps" #define JABBER_CAPS_MIRANDA_PARTIAL (JABBER_CAPS_DISCO_INFO | JABBER_CAPS_DISCO_ITEMS | JABBER_CAPS_MUC | JABBER_CAPS_ENTITY_CAPS | JABBER_CAPS_SI | JABBER_CAPS_SI_FT | \ JABBER_CAPS_BYTESTREAMS | JABBER_CAPS_IBB | JABBER_CAPS_OOB | JABBER_CAPS_CHATSTATES | JABBER_CAPS_AGENTS | JABBER_CAPS_BROWSE | \ JABBER_CAPS_VERSION | JABBER_CAPS_LAST_ACTIVITY | JABBER_CAPS_DATA_FORMS | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_VCARD_TEMP | \ @@ -166,41 +166,41 @@ typedef unsigned __int64 JabberCapsBits; JABBER_CAPS_USER_MOOD_NOTIFY | JABBER_CAPS_USER_TUNE_NOTIFY | JABBER_CAPS_USER_ACTIVITY_NOTIFY | JABBER_CAPS_PLATFORMX86 | JABBER_CAPS_PLATFORMX64) -#define JABBER_EXT_SECUREIM _T("secureim") -#define JABBER_EXT_MIROTR _T("mirotr") -#define JABBER_EXT_JINGLE _T("jingle") -#define JABBER_EXT_NEWGPG _T("new_gpg") -#define JABBER_EXT_NUDGE _T("nudge") -#define JABBER_EXT_COMMANDS _T("cmds") -#define JABBER_EXT_USER_MOOD _T("mood") -#define JABBER_EXT_USER_TUNE _T("tune") -#define JABBER_EXT_USER_ACTIVITY _T("activity") -#define JABBER_EXT_MIR_NOTES _T("mir_notes") -#define JABBER_EXT_PLATFORMX86 _T("x86") -#define JABBER_EXT_PLATFORMX64 _T("x64") - -#define JABBER_FEAT_EXT_ADDRESSING _T("http://jabber.org/protocol/address") -#define JABBER_FEAT_NESTED_ROSTER_GROUPS _T("roster:delimiter") - -#define JABBER_FEAT_RC _T("http://jabber.org/protocol/rc") -#define JABBER_FEAT_RC_SET_STATUS _T("http://jabber.org/protocol/rc#set-status") -#define JABBER_FEAT_RC_SET_OPTIONS _T("http://jabber.org/protocol/rc#set-options") -#define JABBER_FEAT_RC_FORWARD _T("http://jabber.org/protocol/rc#forward") -#define JABBER_FEAT_RC_LEAVE_GROUPCHATS _T("http://jabber.org/protocol/rc#leave-groupchats") -#define JABBER_FEAT_RC_WS_LOCK _T("http://miranda-ng.org/rc#lock_workstation") -#define JABBER_FEAT_RC_QUIT_MIRANDA _T("http://miranda-ng.org/rc#quit") - -#define JABBER_FEAT_IQ_ROSTER _T("jabber:iq:roster") -#define JABBER_FEAT_DELAY _T("jabber:x:delay") -#define JABBER_FEAT_ENTITY_TIME_OLD _T("jabber:iq:time") - -#define JABBER_FEAT_MUC_ADMIN _T("http://jabber.org/protocol/muc#admin") -#define JABBER_FEAT_MUC_OWNER _T("http://jabber.org/protocol/muc#owner") -#define JABBER_FEAT_MUC_USER _T("http://jabber.org/protocol/muc#user") - -#define JABBER_FEAT_NICK _T("http://jabber.org/protocol/nick") - -#define JABBER_FEAT_HTTP_AUTH _T("http://jabber.org/protocol/http-auth") +#define JABBER_EXT_SECUREIM L"secureim" +#define JABBER_EXT_MIROTR L"mirotr" +#define JABBER_EXT_JINGLE L"jingle" +#define JABBER_EXT_NEWGPG L"new_gpg" +#define JABBER_EXT_NUDGE L"nudge" +#define JABBER_EXT_COMMANDS L"cmds" +#define JABBER_EXT_USER_MOOD L"mood" +#define JABBER_EXT_USER_TUNE L"tune" +#define JABBER_EXT_USER_ACTIVITY L"activity" +#define JABBER_EXT_MIR_NOTES L"mir_notes" +#define JABBER_EXT_PLATFORMX86 L"x86" +#define JABBER_EXT_PLATFORMX64 L"x64" + +#define JABBER_FEAT_EXT_ADDRESSING L"http://jabber.org/protocol/address" +#define JABBER_FEAT_NESTED_ROSTER_GROUPS L"roster:delimiter" + +#define JABBER_FEAT_RC L"http://jabber.org/protocol/rc" +#define JABBER_FEAT_RC_SET_STATUS L"http://jabber.org/protocol/rc#set-status" +#define JABBER_FEAT_RC_SET_OPTIONS L"http://jabber.org/protocol/rc#set-options" +#define JABBER_FEAT_RC_FORWARD L"http://jabber.org/protocol/rc#forward" +#define JABBER_FEAT_RC_LEAVE_GROUPCHATS L"http://jabber.org/protocol/rc#leave-groupchats" +#define JABBER_FEAT_RC_WS_LOCK L"http://miranda-ng.org/rc#lock_workstation" +#define JABBER_FEAT_RC_QUIT_MIRANDA L"http://miranda-ng.org/rc#quit" + +#define JABBER_FEAT_IQ_ROSTER L"jabber:iq:roster" +#define JABBER_FEAT_DELAY L"jabber:x:delay" +#define JABBER_FEAT_ENTITY_TIME_OLD L"jabber:iq:time" + +#define JABBER_FEAT_MUC_ADMIN L"http://jabber.org/protocol/muc#admin" +#define JABBER_FEAT_MUC_OWNER L"http://jabber.org/protocol/muc#owner" +#define JABBER_FEAT_MUC_USER L"http://jabber.org/protocol/muc#user" + +#define JABBER_FEAT_NICK L"http://jabber.org/protocol/nick" + +#define JABBER_FEAT_HTTP_AUTH L"http://jabber.org/protocol/http-auth" class CJabberClientPartialCaps diff --git a/protocols/JabberG/src/jabber_captcha.cpp b/protocols/JabberG/src/jabber_captcha.cpp index 5119579a86..53edb29bbf 100644 --- a/protocols/JabberG/src/jabber_captcha.cpp +++ b/protocols/JabberG/src/jabber_captcha.cpp @@ -115,7 +115,7 @@ bool CJabberProto::ProcessCaptcha(HXML node, HXML parentNode, ThreadData *info) if (x == NULL) return false; - HXML y = XmlGetChildByTag(x, _T("field"), _T("var"), _T("from")); + HXML y = XmlGetChildByTag(x, L"field", L"var", L"from"); if (y == NULL) return false; if ((y = XmlGetChild(y, "value")) == NULL) @@ -124,19 +124,19 @@ bool CJabberProto::ProcessCaptcha(HXML node, HXML parentNode, ThreadData *info) CAPTCHA_FORM_PARAMS param; param.fromjid = XmlGetText(y); - if ((y = XmlGetChildByTag(x, _T("field"), _T("var"), _T("sid"))) == NULL) + if ((y = XmlGetChildByTag(x, L"field", L"var", L"sid")) == NULL) return false; if ((y = XmlGetChild(y, "value")) == NULL) return false; param.sid = XmlGetText(y); - if ((y = XmlGetChildByTag(x, _T("field"), _T("var"), _T("ocr"))) == NULL) + if ((y = XmlGetChildByTag(x, L"field", L"var", L"ocr")) == NULL) return false; - param.hint = XmlGetAttrValue (y, _T("label")); + param.hint = XmlGetAttrValue (y, L"label"); - param.from = XmlGetAttrValue(parentNode, _T("from")); - param.to = XmlGetAttrValue(parentNode, _T("to")); - param.challenge = XmlGetAttrValue(parentNode, _T("id")); + param.from = XmlGetAttrValue(parentNode, L"from"); + param.to = XmlGetAttrValue(parentNode, L"to"); + param.challenge = XmlGetAttrValue(parentNode, L"id"); HXML o = XmlGetChild(parentNode, "data"); if (o == NULL || XmlGetText(o) == NULL) return false; @@ -158,7 +158,7 @@ bool CJabberProto::ProcessCaptcha(HXML node, HXML parentNode, ThreadData *info) param.w = bmp.bmWidth; param.h = bmp.bmHeight; int res = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_CAPTCHAFORM), NULL, JabberCaptchaFormDlgProc, (LPARAM)¶m); - if (mir_tstrcmp(param.Result, _T("")) == 0 || !res) + if (mir_tstrcmp(param.Result, L"") == 0 || !res) sendCaptchaError(info, param.from, param.to, param.challenge); else sendCaptchaResult(param.Result, info, param.from, param.challenge, param.fromjid, param.sid); @@ -167,21 +167,21 @@ bool CJabberProto::ProcessCaptcha(HXML node, HXML parentNode, ThreadData *info) void CJabberProto::sendCaptchaResult(TCHAR* buf, ThreadData *info, LPCTSTR from, LPCTSTR challenge, LPCTSTR fromjid, LPCTSTR sid) { - XmlNodeIq iq(_T("set"), SerialNext()); - HXML query= iq <<XATTR(_T("to"), from) << XCHILD(_T("captcha")) << XATTR(_T("xmlns"), _T("urn:xmpp:captcha")) << XCHILD (_T("x")) << XATTR(_T("xmlns"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("submit")); - query << XCHILD(_T("field")) << XATTR (_T("var"), _T("FORM_TYPE")) << XCHILD(_T("value"), _T("urn:xmpp:captcha")); - query << XCHILD(_T("field")) << XATTR (_T("var"), _T("from")) << XCHILD(_T("value"), fromjid); - query << XCHILD(_T("field")) << XATTR (_T("var"), _T("challenge")) << XCHILD(_T("value"), challenge); - query << XCHILD(_T("field")) << XATTR (_T("var"), _T("sid")) << XCHILD(_T("value"), sid); - query << XCHILD(_T("field")) << XATTR (_T("var"), _T("ocr")) << XCHILD(_T("value"), buf); + XmlNodeIq iq(L"set", SerialNext()); + HXML query= iq <<XATTR(L"to", from) << XCHILD(L"captcha") << XATTR(L"xmlns", L"urn:xmpp:captcha") << XCHILD (L"x") << XATTR(L"xmlns", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"submit"); + query << XCHILD(L"field") << XATTR (L"var", L"FORM_TYPE") << XCHILD(L"value", L"urn:xmpp:captcha"); + query << XCHILD(L"field") << XATTR (L"var", L"from") << XCHILD(L"value", fromjid); + query << XCHILD(L"field") << XATTR (L"var", L"challenge") << XCHILD(L"value", challenge); + query << XCHILD(L"field") << XATTR (L"var", L"sid") << XCHILD(L"value", sid); + query << XCHILD(L"field") << XATTR (L"var", L"ocr") << XCHILD(L"value", buf); info -> send (iq); } void CJabberProto::sendCaptchaError(ThreadData *info, LPCTSTR from, LPCTSTR to, LPCTSTR challenge) { - XmlNode message(_T("message")); - message << XATTR(_T("type"), _T("error")) << XATTR(_T("to"), from) << XATTR(_T("id"), challenge) << XATTR(_T("from"), to) - << XCHILD(_T("error")) << XATTR(_T("type"), _T("modify")) - << XCHILD(_T("not-acceptable")) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")); + XmlNode message(L"message"); + message << XATTR(L"type", L"error") << XATTR(L"to", from) << XATTR(L"id", challenge) << XATTR(L"from", to) + << XCHILD(L"error") << XATTR(L"type", L"modify") + << XCHILD(L"not-acceptable") << XATTR(L"xmlns", L"urn:ietf:params:xml:ns:xmpp-stanzas"); info->send(message); } diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 321bdd97f9..40cdb9168c 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -240,7 +240,7 @@ void CJabberProto::GcLogShowInformation(JABBER_LIST_ITEM *item, pResourceStatus } if (!buf.IsEmpty()) { - buf.Replace(_T("%"), _T("%%")); + buf.Replace(L"%", L"%%"); GCDEST gcd = { m_szModuleName, item->jid, GC_EVENT_INFORMATION }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -353,11 +353,11 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, HXML reason) if (m_bJabberOnline) { TCHAR szPresenceTo[JABBER_MAX_JID_LEN]; - mir_sntprintf(szPresenceTo, _T("%s/%s"), item->jid, item->nick); + mir_sntprintf(szPresenceTo, L"%s/%s", item->jid, item->nick); m_ThreadInfo->send( - XmlNode(_T("presence")) << XATTR(_T("to"), szPresenceTo) << XATTR(_T("type"), _T("unavailable")) - << XCHILD(_T("status"), szMessage)); + XmlNode(L"presence") << XATTR(L"to", szPresenceTo) << XATTR(L"type", L"unavailable") + << XCHILD(L"status", szMessage)); ListRemove(LIST_CHATROOM, item->jid); } @@ -535,8 +535,8 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) TCHAR *ptszStatusMsg = item->getTemp()->m_tszStatusMessage; if (ptszStatusMsg && *ptszStatusMsg) { TCHAR *bufPtr = url_buf; - for (TCHAR *p = _tcsstr(ptszStatusMsg, _T("http")); p && *p; p = _tcsstr(p + 1, _T("http"))) { - if (!_tcsncmp(p, _T("http://"), 7) || !_tcsncmp(p, _T("https://"), 8)) { + for (TCHAR *p = _tcsstr(ptszStatusMsg, L"http"); p && *p; p = _tcsstr(p + 1, L"http")) { + if (!_tcsncmp(p, L"http://", 7) || !_tcsncmp(p, L"https://", 8)) { mir_tstrncpy(bufPtr, p, _countof(url_buf) - (bufPtr - url_buf)); gc_item *pItem = sttFindGcMenuItem(gcmi, idx); pItem->pszDesc = bufPtr; @@ -690,12 +690,12 @@ class CGroupchatInviteDlg : public CJabberDlgBase void InviteUser(TCHAR *pUser, TCHAR *text) { - XmlNode msg(_T("message")); - HXML invite = msg << XATTR(_T("to"), m_room) << XATTRID(m_proto->SerialNext()) - << XCHILDNS(_T("x"), JABBER_FEAT_MUC_USER) - << XCHILD(_T("invite")) << XATTR(_T("to"), pUser); + XmlNode msg(L"message"); + HXML invite = msg << XATTR(L"to", m_room) << XATTRID(m_proto->SerialNext()) + << XCHILDNS(L"x", JABBER_FEAT_MUC_USER) + << XCHILD(L"invite") << XATTR(L"to", pUser); if (text) - invite << XCHILD(_T("reason"), text); + invite << XCHILD(L"reason", text); m_proto->m_ThreadInfo->send(msg); } @@ -807,18 +807,18 @@ public: void CJabberProto::AdminSet(const TCHAR *to, const TCHAR *ns, const TCHAR *szItem, const TCHAR *itemVal, const TCHAR *var, const TCHAR *varVal) { - m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext(), to) << XQUERY(ns) << XCHILD(_T("item")) << XATTR(szItem, itemVal) << XATTR(var, varVal)); + m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext(), to) << XQUERY(ns) << XCHILD(L"item") << XATTR(szItem, itemVal) << XATTR(var, varVal)); } void CJabberProto::AdminSetReason(const TCHAR *to, const TCHAR *ns, const TCHAR *szItem, const TCHAR *itemVal, const TCHAR *var, const TCHAR *varVal, const TCHAR *rsn) { - m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext(), to) << XQUERY(ns) << XCHILD(_T("item")) << XATTR(szItem, itemVal) << XATTR(var, varVal) << XCHILD(_T("reason"), rsn)); + m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext(), to) << XQUERY(ns) << XCHILD(L"item") << XATTR(szItem, itemVal) << XATTR(var, varVal) << XCHILD(L"reason", rsn)); } void CJabberProto::AdminGet(const TCHAR *to, const TCHAR *ns, const TCHAR *var, const TCHAR *varVal, JABBER_IQ_HANDLER foo) { m_ThreadInfo->send(XmlNodeIq(AddIQ(foo, JABBER_IQ_TYPE_GET, to)) - << XQUERY(ns) << XCHILD(_T("item")) << XATTR(var, varVal)); + << XQUERY(ns) << XCHILD(L"item") << XATTR(var, varVal)); } // Member info dialog @@ -919,27 +919,27 @@ static INT_PTR CALLBACK sttUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam switch (value) { case AFFILIATION_NONE: if (dat->him->m_tszRealJid) - dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("none")); + dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"none"); else - dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("affiliation"), _T("none")); + dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"affiliation", L"none"); break; case AFFILIATION_MEMBER: if (dat->him->m_tszRealJid) - dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("member")); + dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"member"); else - dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("affiliation"), _T("member")); + dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"affiliation", L"member"); break; case AFFILIATION_ADMIN: if (dat->him->m_tszRealJid) - dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("admin")); + dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"admin"); else - dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("affiliation"), _T("admin")); + dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"affiliation", L"admin"); break; case AFFILIATION_OWNER: if (dat->him->m_tszRealJid) - dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("owner")); + dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"owner"); else - dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("affiliation"), _T("owner")); + dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"affiliation", L"owner"); } break; @@ -959,13 +959,13 @@ static INT_PTR CALLBACK sttUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam switch (value) { case ROLE_VISITOR: - dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("role"), _T("visitor")); + dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"role", L"visitor"); break; case ROLE_PARTICIPANT: - dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("role"), _T("participant")); + dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"role", L"participant"); break; case ROLE_MODERATOR: - dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("role"), _T("moderator")); + dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"role", L"moderator"); break; } } @@ -1016,22 +1016,22 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* TCHAR buf[256]; // do not use snprintf to avoid possible problems with % symbol - if (TCHAR *p = _tcsstr(szMessage, _T("%s"))) { + if (TCHAR *p = _tcsstr(szMessage, L"%s")) { *p = 0; - mir_sntprintf(buf, _T("%s%s%s"), szMessage, him->m_tszResourceName, p + 2); + mir_sntprintf(buf, L"%s%s%s", szMessage, him->m_tszResourceName, p + 2); } else mir_tstrncpy(buf, szMessage, _countof(buf)); UnEscapeChatTags(buf); ppro->m_ThreadInfo->send( - XmlNode(_T("message")) << XATTR(_T("to"), item->jid) << XATTR(_T("type"), _T("groupchat")) - << XCHILD(_T("body"), buf)); + XmlNode(L"message") << XATTR(L"to", item->jid) << XATTR(L"type", L"groupchat") + << XCHILD(L"body", buf)); } break; case IDM_VCARD: { - CMString jid(FORMAT, _T("%s/%s"), item->jid, him->m_tszResourceName); + CMString jid(FORMAT, L"%s/%s", item->jid, him->m_tszResourceName); MCONTACT hContact = ppro->AddToListByJID(jid, PALF_TEMPORARY); ppro->setTString(hContact, "Nick", him->m_tszResourceName); @@ -1058,14 +1058,14 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* case IDM_KICK: if ((GetTickCount() - dwLastBanKickTime) > BAN_KICK_INTERVAL) { dwLastBanKickTime = GetTickCount(); - szBuffer.Format(_T("%s: "), me->m_tszResourceName); + szBuffer.Format(L"%s: ", me->m_tszResourceName); szTitle.Format(TranslateT("Reason to kick %s"), him->m_tszResourceName); TCHAR *resourceName_copy = mir_tstrdup(him->m_tszResourceName); // copy resource name to prevent possible crash if user list rebuilds if (ppro->EnterString(szBuffer, szTitle, ESF_MULTILINE, "gcReason_")) ppro->m_ThreadInfo->send( - XmlNodeIq(_T("set"), ppro->SerialNext(), item->jid) << XQUERY(JABBER_FEAT_MUC_ADMIN) - << XCHILD(_T("item")) << XATTR(_T("nick"), resourceName_copy) << XATTR(_T("role"), _T("none")) - << XCHILD(_T("reason"), szBuffer)); + XmlNodeIq(L"set", ppro->SerialNext(), item->jid) << XQUERY(JABBER_FEAT_MUC_ADMIN) + << XCHILD(L"item") << XATTR(L"nick", resourceName_copy) << XATTR(L"role", L"none") + << XCHILD(L"reason", szBuffer)); mir_free(resourceName_copy); } @@ -1074,17 +1074,17 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* case IDM_SET_VISITOR: if (him->m_role != ROLE_VISITOR) - ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("role"), _T("visitor")); + ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"role", L"visitor"); break; case IDM_SET_PARTICIPANT: if (him->m_role != ROLE_PARTICIPANT) - ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("role"), _T("participant")); + ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"role", L"participant"); break; case IDM_SET_MODERATOR: if (him->m_role != ROLE_MODERATOR) - ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("role"), _T("moderator")); + ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"role", L"moderator"); break; case IDM_SET_NONE: @@ -1092,9 +1092,9 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (him->m_tszRealJid) { TCHAR szBareJid[JABBER_MAX_JID_LEN]; JabberStripJid(him->m_tszRealJid, szBareJid, _countof(szBareJid)); - ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("none")); + ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"none"); } - else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("affiliation"), _T("none")); + else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"affiliation", L"none"); } break; @@ -1103,9 +1103,9 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (him->m_tszRealJid) { TCHAR szBareJid[JABBER_MAX_JID_LEN]; JabberStripJid(him->m_tszRealJid, szBareJid, _countof(szBareJid)); - ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("member")); + ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"member"); } - else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("affiliation"), _T("member")); + else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"affiliation", L"member"); } break; @@ -1114,9 +1114,9 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (him->m_tszRealJid) { TCHAR szBareJid[JABBER_MAX_JID_LEN]; JabberStripJid(him->m_tszRealJid, szBareJid, _countof(szBareJid)); - ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("admin")); + ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"admin"); } - else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("affiliation"), _T("admin")); + else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"affiliation", L"admin"); } break; @@ -1125,9 +1125,9 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (him->m_tszRealJid) { TCHAR szBareJid[JABBER_MAX_JID_LEN]; JabberStripJid(him->m_tszRealJid, szBareJid, _countof(szBareJid)); - ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("owner")); + ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"owner"); } - else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("affiliation"), _T("owner")); + else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"affiliation", L"owner"); } break; @@ -1137,14 +1137,14 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* TCHAR szVictimBareJid[JABBER_MAX_JID_LEN]; JabberStripJid(him->m_tszRealJid, szVictimBareJid, _countof(szVictimBareJid)); - szBuffer.Format(_T("%s: "), me->m_tszResourceName); + szBuffer.Format(L"%s: ", me->m_tszResourceName); szTitle.Format(TranslateT("Reason to ban %s"), him->m_tszResourceName); if (ppro->EnterString(szBuffer, szTitle, ESF_MULTILINE, "gcReason_")) ppro->m_ThreadInfo->send( - XmlNodeIq(_T("set"), ppro->SerialNext(), item->jid) << XQUERY(JABBER_FEAT_MUC_ADMIN) - << XCHILD(_T("item")) << XATTR(_T("jid"), szVictimBareJid) << XATTR(_T("affiliation"), _T("outcast")) - << XCHILD(_T("reason"), szBuffer)); + XmlNodeIq(L"set", ppro->SerialNext(), item->jid) << XQUERY(JABBER_FEAT_MUC_ADMIN) + << XCHILD(L"item") << XATTR(L"jid", szVictimBareJid) << XATTR(L"affiliation", L"outcast") + << XCHILD(L"reason", szBuffer)); } } dwLastBanKickTime = GetTickCount(); @@ -1174,12 +1174,12 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (!ppro->EnterString(szBuffer, szTitle, ESF_MULTILINE)) break; - szTitle.Format(_T("%s/%s"), item->jid, resourceName_copy); + szTitle.Format(L"%s/%s", item->jid, resourceName_copy); - XmlNode msg(_T("message")); - msg << XATTR(_T("to"), szTitle) << XATTRID(ppro->SerialNext()) - << XCHILD(_T("x"), szBuffer) << XATTR(_T("xmlns"), JABBER_FEAT_DIRECT_MUC_INVITE) << XATTR(_T("jid"), szInviteTo) - << XCHILD(_T("invite")) << XATTR(_T("from"), item->nick); + XmlNode msg(L"message"); + msg << XATTR(L"to", szTitle) << XATTRID(ppro->SerialNext()) + << XCHILD(L"x", szBuffer) << XATTR(L"xmlns", JABBER_FEAT_DIRECT_MUC_INVITE) << XATTR(L"jid", szInviteTo) + << XCHILD(L"invite") << XATTR(L"from", item->nick); ppro->m_ThreadInfo->send(msg); } dwLastBanKickTime = GetTickCount(); @@ -1195,7 +1195,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* break; case IDM_CPY_INROOMJID: - szBuffer.Format(_T("%s/%s"), item->jid, him->m_tszResourceName); + szBuffer.Format(L"%s/%s", item->jid, him->m_tszResourceName); JabberCopyText(pcli->hwndContactList, szBuffer); break; @@ -1239,37 +1239,37 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g switch (gch->dwData) { case IDM_LST_PARTICIPANT: - ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("role"), _T("participant"), &CJabberProto::OnIqResultMucGetVoiceList); + ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"role", L"participant", &CJabberProto::OnIqResultMucGetVoiceList); break; case IDM_LST_MEMBER: - ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("member"), &CJabberProto::OnIqResultMucGetMemberList); + ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"member", &CJabberProto::OnIqResultMucGetMemberList); break; case IDM_LST_MODERATOR: - ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("role"), _T("moderator"), &CJabberProto::OnIqResultMucGetModeratorList); + ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"role", L"moderator", &CJabberProto::OnIqResultMucGetModeratorList); break; case IDM_LST_BAN: - ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("outcast"), &CJabberProto::OnIqResultMucGetBanList); + ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"outcast", &CJabberProto::OnIqResultMucGetBanList); break; case IDM_LST_ADMIN: - ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("admin"), &CJabberProto::OnIqResultMucGetAdminList); + ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"admin", &CJabberProto::OnIqResultMucGetAdminList); break; case IDM_LST_OWNER: - ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("owner"), &CJabberProto::OnIqResultMucGetOwnerList); + ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"owner", &CJabberProto::OnIqResultMucGetOwnerList); break; case IDM_TOPIC: szTitle.Format(TranslateT("Set topic for %s"), gch->pDest->ptszID); szBuffer = item->getTemp()->m_tszStatusMessage; - szBuffer.Replace(_T("\n"), _T("\r\n")); + szBuffer.Replace(L"\n", L"\r\n"); if (ppro->EnterString(szBuffer, szTitle, ESF_RICHEDIT, "gcTopic_")) ppro->m_ThreadInfo->send( - XmlNode(_T("message")) << XATTR(_T("to"), gch->pDest->ptszID) << XATTR(_T("type"), _T("groupchat")) - << XCHILD(_T("subject"), szBuffer)); + XmlNode(L"message") << XATTR(L"to", gch->pDest->ptszID) << XATTR(L"type", L"groupchat") + << XCHILD(L"subject", szBuffer)); break; case IDM_NICK: @@ -1279,7 +1279,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g if (ppro->EnterString(szBuffer, szTitle, ESF_COMBO, "gcNick_")) { if (ppro->ListGetItemPtr(LIST_CHATROOM, gch->pDest->ptszID) != NULL) { TCHAR text[1024]; - mir_sntprintf(text, _T("%s/%s"), gch->pDest->ptszID, szBuffer); + mir_sntprintf(text, L"%s/%s", gch->pDest->ptszID, szBuffer); ppro->SendPresenceTo(ppro->m_iStatus == ID_STATUS_INVISIBLE ? ID_STATUS_ONLINE : ppro->m_iStatus, text, NULL); } } @@ -1300,7 +1300,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g if (item == NULL) { item = ppro->ListGetItemPtr(LIST_CHATROOM, gch->pDest->ptszID); if (item != NULL) { - item->type = _T("conference"); + item->type = L"conference"; MCONTACT hContact = ppro->HContactFromJID(item->jid); item->name = pcli->pfnGetContactDisplayName(hContact, 0); ppro->AddEditBookmark(item); @@ -1312,8 +1312,8 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g szTitle.Format(TranslateT("Reason to destroy %s"), gch->pDest->ptszID); if (ppro->EnterString(szBuffer, szTitle, ESF_MULTILINE, "gcReason_")) ppro->m_ThreadInfo->send( - XmlNodeIq(_T("set"), ppro->SerialNext(), gch->pDest->ptszID) << XQUERY(JABBER_FEAT_MUC_OWNER) - << XCHILD(_T("destroy")) << XCHILD(_T("reason"), szBuffer)); + XmlNodeIq(L"set", ppro->SerialNext(), gch->pDest->ptszID) << XQUERY(JABBER_FEAT_MUC_OWNER) + << XCHILD(L"destroy") << XCHILD(L"reason", szBuffer)); // fall through case IDM_LEAVE: @@ -1333,7 +1333,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g case IDM_LINK5: case IDM_LINK6: case IDM_LINK7: case IDM_LINK8: case IDM_LINK9: { int idx = IDM_LINK0; - for (TCHAR *p = _tcsstr(item->getTemp()->m_tszStatusMessage, _T("http://")); p && *p; p = _tcsstr(p + 1, _T("http://"))) { + for (TCHAR *p = _tcsstr(item->getTemp()->m_tszStatusMessage, L"http://"); p && *p; p = _tcsstr(p + 1, L"http://")) { if (idx == gch->dwData) { char *bufPtr, *url = mir_t2a(p); for (bufPtr = url; *bufPtr && !isspace(*bufPtr); ++bufPtr); @@ -1364,7 +1364,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g static void sttSendPrivateMessage(CJabberProto *ppro, JABBER_LIST_ITEM *item, const TCHAR *nick) { TCHAR szFullJid[JABBER_MAX_JID_LEN]; - mir_sntprintf(szFullJid, _T("%s/%s"), item->jid, nick); + mir_sntprintf(szFullJid, L"%s/%s", item->jid, nick); MCONTACT hContact = ppro->DBCreateContact(szFullJid, NULL, true, false); if (hContact != NULL) { pResourceStatus r(item->findResource(nick)); @@ -1406,8 +1406,8 @@ int CJabberProto::JabberGcEventHook(WPARAM, LPARAM lParam) TCHAR *buf = NEWTSTR_ALLOCA(gch->ptszText); UnEscapeChatTags(buf); m_ThreadInfo->send( - XmlNode(_T("message")) << XATTR(_T("id"), _i64tot(id, tszID, 36)) << XATTR(_T("to"), item->jid) << XATTR(_T("type"), _T("groupchat")) - << XCHILD(_T("body"), buf)); + XmlNode(L"message") << XATTR(L"id", _i64tot(id, tszID, 36)) << XATTR(L"to", item->jid) << XATTR(L"type", L"groupchat") + << XCHILD(L"body", buf)); } } break; @@ -1438,43 +1438,43 @@ int CJabberProto::JabberGcEventHook(WPARAM, LPARAM lParam) void CJabberProto::AddMucListItem(JABBER_MUC_JIDLIST_INFO* jidListInfo, const TCHAR* str, const TCHAR* rsn) { - const TCHAR *field = (jidListInfo->type == MUC_BANLIST || _tcschr(str, '@')) ? _T("jid") : _T("nick"); + const TCHAR *field = (jidListInfo->type == MUC_BANLIST || _tcschr(str, '@')) ? L"jid" : L"nick"; TCHAR *roomJid = jidListInfo->roomJid; if (jidListInfo->type == MUC_BANLIST) { - AdminSetReason(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("affiliation"), _T("outcast"), rsn); - AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("outcast"), &CJabberProto::OnIqResultMucGetBanList); + AdminSetReason(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"affiliation", L"outcast", rsn); + AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"outcast", &CJabberProto::OnIqResultMucGetBanList); } } void CJabberProto::AddMucListItem(JABBER_MUC_JIDLIST_INFO* jidListInfo, const TCHAR* str) { - const TCHAR *field = (jidListInfo->type == MUC_BANLIST || _tcschr(str, '@')) ? _T("jid") : _T("nick"); + const TCHAR *field = (jidListInfo->type == MUC_BANLIST || _tcschr(str, '@')) ? L"jid" : L"nick"; TCHAR *roomJid = jidListInfo->roomJid; switch (jidListInfo->type) { case MUC_VOICELIST: - AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("role"), _T("participant")); - AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("role"), _T("participant"), &CJabberProto::OnIqResultMucGetVoiceList); + AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"role", L"participant"); + AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"role", L"participant", &CJabberProto::OnIqResultMucGetVoiceList); break; case MUC_MEMBERLIST: - AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("affiliation"), _T("member")); - AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("member"), &CJabberProto::OnIqResultMucGetMemberList); + AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"affiliation", L"member"); + AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"member", &CJabberProto::OnIqResultMucGetMemberList); break; case MUC_MODERATORLIST: - AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("role"), _T("moderator")); - AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("role"), _T("moderator"), &CJabberProto::OnIqResultMucGetModeratorList); + AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"role", L"moderator"); + AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"role", L"moderator", &CJabberProto::OnIqResultMucGetModeratorList); break; case MUC_BANLIST: - AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("affiliation"), _T("outcast")); - AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("outcast"), &CJabberProto::OnIqResultMucGetBanList); + AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"affiliation", L"outcast"); + AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"outcast", &CJabberProto::OnIqResultMucGetBanList); break; case MUC_ADMINLIST: - AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("affiliation"), _T("admin")); - AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("admin"), &CJabberProto::OnIqResultMucGetAdminList); + AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"affiliation", L"admin"); + AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"admin", &CJabberProto::OnIqResultMucGetAdminList); break; case MUC_OWNERLIST: - AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("affiliation"), _T("owner")); - AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("owner"), &CJabberProto::OnIqResultMucGetOwnerList); + AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"affiliation", L"owner"); + AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"owner", &CJabberProto::OnIqResultMucGetOwnerList); break; } } @@ -1485,20 +1485,20 @@ void CJabberProto::DeleteMucListItem(JABBER_MUC_JIDLIST_INFO *jidListInfo, const switch (jidListInfo->type) { case MUC_VOICELIST: // change role to visitor (from participant) - AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("jid"), jid, _T("role"), _T("visitor")); + AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, L"jid", jid, L"role", L"visitor"); break; case MUC_BANLIST: // change affiliation to none (from outcast) case MUC_MEMBERLIST: // change affiliation to none (from member) - AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("jid"), jid, _T("affiliation"), _T("none")); + AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, L"jid", jid, L"affiliation", L"none"); break; case MUC_MODERATORLIST: // change role to participant (from moderator) - AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("jid"), jid, _T("role"), _T("participant")); + AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, L"jid", jid, L"role", L"participant"); break; case MUC_ADMINLIST: // change affiliation to member (from admin) - AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("jid"), jid, _T("affiliation"), _T("member")); + AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, L"jid", jid, L"affiliation", L"member"); break; case MUC_OWNERLIST: // change affiliation to admin (from owner) - AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("jid"), jid, _T("affiliation"), _T("admin")); + AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, L"jid", jid, L"affiliation", L"admin"); break; } } diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp index f0306b9ec4..2d1250eb88 100644 --- a/protocols/JabberG/src/jabber_console.cpp +++ b/protocols/JabberG/src/jabber_console.cpp @@ -116,9 +116,9 @@ bool CJabberProto::RecursiveCheckFilter(HXML node, DWORD flags) bool CJabberProto::FilterXml(HXML node, DWORD flags) { - if (!m_filterInfo.msg && !mir_tstrcmp(XmlGetName(node), _T("message"))) return false; - if (!m_filterInfo.presence && !mir_tstrcmp(XmlGetName(node), _T("presence"))) return false; - if (!m_filterInfo.iq && !mir_tstrcmp(XmlGetName(node), _T("iq"))) return false; + if (!m_filterInfo.msg && !mir_tstrcmp(XmlGetName(node), L"message")) return false; + if (!m_filterInfo.presence && !mir_tstrcmp(XmlGetName(node), L"presence")) return false; + if (!m_filterInfo.iq && !mir_tstrcmp(XmlGetName(node), L"iq")) return false; if (m_filterInfo.type == TFilterInfo::T_OFF) return true; mir_cslock lck(m_filterInfo.csPatternLock); @@ -126,14 +126,14 @@ bool CJabberProto::FilterXml(HXML node, DWORD flags) const TCHAR *attrValue; switch (m_filterInfo.type) { case TFilterInfo::T_JID: - attrValue = XmlGetAttrValue(node, (flags & JCPF_OUT) ? _T("to") : _T("from")); + attrValue = XmlGetAttrValue(node, (flags & JCPF_OUT) ? L"to" : L"from"); if (attrValue) return JabberStrIStr(attrValue, m_filterInfo.pattern) != NULL; break; case TFilterInfo::T_XMLNS: if (XmlGetChildCount(node)) { - attrValue = XmlGetAttrValue(XmlGetChild(node, 0), _T("xmlns")); + attrValue = XmlGetAttrValue(XmlGetChild(node, 0), L"xmlns"); if (attrValue) return JabberStrIStr(attrValue, m_filterInfo.pattern) != NULL; } @@ -305,10 +305,10 @@ struct } static filter_modes[] = { - { TFilterInfo::T_JID, _T("JID"), "main" }, - { TFilterInfo::T_XMLNS, _T("xmlns"), "xmlconsole" }, - { TFilterInfo::T_ANY, _T("all attributes"), "sd_filter_apply" }, - { TFilterInfo::T_OFF, _T("disabled"), "sd_filter_reset" }, + { TFilterInfo::T_JID, L"JID", "main" }, + { TFilterInfo::T_XMLNS, L"xmlns", "xmlconsole" }, + { TFilterInfo::T_ANY, L"all attributes", "sd_filter_apply" }, + { TFilterInfo::T_OFF, L"disabled", "sd_filter_reset" }, }; class CJabberDlgConsole: public CJabberDlgBase @@ -522,12 +522,12 @@ INT_PTR CJabberDlgConsole::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) mir_free(textToSend); - SetDlgItemText(m_hwnd, IDC_CONSOLEIN, _T("")); + SetDlgItemText(m_hwnd, IDC_CONSOLEIN, L""); } return TRUE; case IDC_RESET: - SetDlgItemText(m_hwnd, IDC_CONSOLE, _T("")); + SetDlgItemText(m_hwnd, IDC_CONSOLE, L""); break; case IDC_BTN_MSG: @@ -615,7 +615,7 @@ void __cdecl CJabberProto::ConsoleThread(void*) HMODULE hMsftedit; void CJabberProto::ConsoleInit() { - hMsftedit = LoadLibrary(_T("Msftedit.dll")); + hMsftedit = LoadLibrary(L"Msftedit.dll"); m_hThreadConsole = ForkThreadEx(&CJabberProto::ConsoleThread, 0, &m_dwConsoleThreadId); } diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index e5f6df0342..7d49935abc 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -63,104 +63,104 @@ static struct } sttNodeIcons[] = { // standard identities: http://www.xmpp.org/registrar/disco-categories.html#directory - // {NULL, _T("account"), _T("admin"), NULL, 0}, - // {NULL, _T("account"), _T("anonymous"), NULL, 0}, - // {NULL, _T("account"), _T("registered"), NULL, 0}, - {NULL, _T("account"), NULL, NULL, SKINICON_STATUS_ONLINE}, - - // {NULL, _T("auth"), _T("cert"), NULL, 0}, - // {NULL, _T("auth"), _T("generic"), NULL, 0}, - // {NULL, _T("auth"), _T("ldap"), NULL, 0}, - // {NULL, _T("auth"), _T("ntlm"), NULL, 0}, - // {NULL, _T("auth"), _T("pam"), NULL, 0}, - // {NULL, _T("auth"), _T("radius"), NULL, 0}, - {NULL, _T("auth"), NULL, "key", 0}, - - /// {NULL, _T("automation"), _T("command-list"), NULL, 0}, - /// {NULL, _T("automation"), _T("command-node"), NULL, 0}, - // {NULL, _T("automation"), _T("rpc"), NULL, 0}, - // {NULL, _T("automation"), _T("soap"), NULL, 0}, - {NULL, _T("automation"), NULL, "adhoc", 0}, - - // {NULL, _T("client"), _T("bot"), NULL, 0}, - // {NULL, _T("client"), _T("console"), NULL, 0}, - // {NULL, _T("client"), _T("handheld"), NULL, 0}, - // {NULL, _T("client"), _T("pc"), NULL, 0}, - // {NULL, _T("client"), _T("phone"), NULL, 0}, - // {NULL, _T("client"), _T("web"), NULL, 0}, - {NULL, _T("client"), NULL, NULL, SKINICON_STATUS_ONLINE}, - - // {NULL, _T("collaboration"), _T("whiteboard"), NULL, 0}, - {NULL, _T("collaboration"), NULL, "group", 0}, - - // {NULL, _T("component"), _T("archive"), NULL, 0}, - // {NULL, _T("component"), _T("c2s"), NULL, 0}, - // {NULL, _T("component"), _T("generic"), NULL, 0}, - // {NULL, _T("component"), _T("load"), NULL, 0}, - // {NULL, _T("component"), _T("log"), NULL, 0}, - // {NULL, _T("component"), _T("presence"), NULL, 0}, - // {NULL, _T("component"), _T("router"), NULL, 0}, - // {NULL, _T("component"), _T("s2s"), NULL, 0}, - // {NULL, _T("component"), _T("sm"), NULL, 0}, - // {NULL, _T("component"), _T("stats"), NULL, 0}, - - // {NULL, _T("conference"), _T("irc"), NULL, 0}, - // {NULL, _T("conference"), _T("text"), NULL, 0}, - {NULL, _T("conference"), NULL, "group", 0}, - - {NULL, _T("directory"), _T("chatroom"), "group", 0}, - {NULL, _T("directory"), _T("group"), "group", 0}, - {NULL, _T("directory"), _T("user"), NULL, SKINICON_OTHER_FINDUSER}, - // {NULL, _T("directory"), _T("waitinglist"), NULL, 0}, - {NULL, _T("directory"), NULL, NULL, SKINICON_OTHER_SEARCHALL}, - - {NULL, _T("gateway"), _T("aim"), "AIM", SKINICON_STATUS_ONLINE}, - {NULL, _T("gateway"), _T("gadu-gadu"), "GG", SKINICON_STATUS_ONLINE}, - // {NULL, _T("gateway"), _T("http-ws"), NUL, 0}, - {NULL, _T("gateway"), _T("icq"), "ICQ", SKINICON_STATUS_ONLINE}, - {NULL, _T("gateway"), _T("msn"), "MSN", SKINICON_STATUS_ONLINE}, - {NULL, _T("gateway"), _T("qq"), "QQ", SKINICON_STATUS_ONLINE}, - // {NULL, _T("gateway"), _T("sms"), NULL, 0}, - // {NULL, _T("gateway"), _T("smtp"), NULL, 0}, - {NULL, _T("gateway"), _T("tlen"), "TLEN", SKINICON_STATUS_ONLINE}, - {NULL, _T("gateway"), _T("yahoo"), "YAHOO", SKINICON_STATUS_ONLINE}, - {NULL, _T("gateway"), NULL, "Agents", 0}, - - // {NULL, _T("headline"), _T("newmail"), NULL, 0}, - {NULL, _T("headline"), _T("rss"), "node_rss", 0}, - {NULL, _T("headline"), _T("weather"), "node_weather", 0}, - - // {NULL, _T("hierarchy"), _T("branch"), NULL, 0}, - // {NULL, _T("hierarchy"), _T("leaf"), NULL, 0}, - - // {NULL, _T("proxy"), _T("bytestreams"), NULL, 0}, - {NULL, _T("proxy"), NULL, NULL, SKINICON_EVENT_FILE}, - - // {NULL, _T("pubsub"), _T("collection"), NULL, 0}, - // {NULL, _T("pubsub"), _T("leaf"), NULL, 0}, - // {NULL, _T("pubsub"), _T("pep"), NULL, 0}, - // {NULL, _T("pubsub"), _T("service"), NULL, 0}, - - // {NULL, _T("server"), _T("im"), NULL, 0}, - {NULL, _T("server"), NULL, "node_server", 0}, - - // {NULL, _T("store"), _T("berkeley"), NULL, 0}, - /// {NULL, _T("store"), _T("file"), NULL, 0}, - // {NULL, _T("store"), _T("generic"), NULL, 0}, - // {NULL, _T("store"), _T("ldap"), NULL, 0}, - // {NULL, _T("store"), _T("mysql"), NULL, 0}, - // {NULL, _T("store"), _T("oracle"), NULL, 0}, - // {NULL, _T("store"), _T("postgres"), NULL, 0}, - {NULL, _T("store"), NULL, "node_store", 0}, + // {NULL, L"account", L"admin", NULL, 0}, + // {NULL, L"account", L"anonymous", NULL, 0}, + // {NULL, L"account", L"registered", NULL, 0}, + {NULL, L"account", NULL, NULL, SKINICON_STATUS_ONLINE}, + + // {NULL, L"auth", L"cert", NULL, 0}, + // {NULL, L"auth", L"generic", NULL, 0}, + // {NULL, L"auth", L"ldap", NULL, 0}, + // {NULL, L"auth", L"ntlm", NULL, 0}, + // {NULL, L"auth", L"pam", NULL, 0}, + // {NULL, L"auth", L"radius", NULL, 0}, + {NULL, L"auth", NULL, "key", 0}, + + /// {NULL, L"automation", L"command-list", NULL, 0}, + /// {NULL, L"automation", L"command-node", NULL, 0}, + // {NULL, L"automation", L"rpc", NULL, 0}, + // {NULL, L"automation", L"soap", NULL, 0}, + {NULL, L"automation", NULL, "adhoc", 0}, + + // {NULL, L"client", L"bot", NULL, 0}, + // {NULL, L"client", L"console", NULL, 0}, + // {NULL, L"client", L"handheld", NULL, 0}, + // {NULL, L"client", L"pc", NULL, 0}, + // {NULL, L"client", L"phone", NULL, 0}, + // {NULL, L"client", L"web", NULL, 0}, + {NULL, L"client", NULL, NULL, SKINICON_STATUS_ONLINE}, + + // {NULL, L"collaboration", L"whiteboard", NULL, 0}, + {NULL, L"collaboration", NULL, "group", 0}, + + // {NULL, L"component", L"archive", NULL, 0}, + // {NULL, L"component", L"c2s", NULL, 0}, + // {NULL, L"component", L"generic", NULL, 0}, + // {NULL, L"component", L"load", NULL, 0}, + // {NULL, L"component", L"log", NULL, 0}, + // {NULL, L"component", L"presence", NULL, 0}, + // {NULL, L"component", L"router", NULL, 0}, + // {NULL, L"component", L"s2s", NULL, 0}, + // {NULL, L"component", L"sm", NULL, 0}, + // {NULL, L"component", L"stats", NULL, 0}, + + // {NULL, L"conference", L"irc", NULL, 0}, + // {NULL, L"conference", L"text", NULL, 0}, + {NULL, L"conference", NULL, "group", 0}, + + {NULL, L"directory", L"chatroom", "group", 0}, + {NULL, L"directory", L"group", "group", 0}, + {NULL, L"directory", L"user", NULL, SKINICON_OTHER_FINDUSER}, + // {NULL, L"directory", L"waitinglist", NULL, 0}, + {NULL, L"directory", NULL, NULL, SKINICON_OTHER_SEARCHALL}, + + {NULL, L"gateway", L"aim", "AIM", SKINICON_STATUS_ONLINE}, + {NULL, L"gateway", L"gadu-gadu", "GG", SKINICON_STATUS_ONLINE}, + // {NULL, L"gateway", L"http-ws", NUL, 0}, + {NULL, L"gateway", L"icq", "ICQ", SKINICON_STATUS_ONLINE}, + {NULL, L"gateway", L"msn", "MSN", SKINICON_STATUS_ONLINE}, + {NULL, L"gateway", L"qq", "QQ", SKINICON_STATUS_ONLINE}, + // {NULL, L"gateway", L"sms", NULL, 0}, + // {NULL, L"gateway", L"smtp", NULL, 0}, + {NULL, L"gateway", L"tlen", "TLEN", SKINICON_STATUS_ONLINE}, + {NULL, L"gateway", L"yahoo", "YAHOO", SKINICON_STATUS_ONLINE}, + {NULL, L"gateway", NULL, "Agents", 0}, + + // {NULL, L"headline", L"newmail", NULL, 0}, + {NULL, L"headline", L"rss", "node_rss", 0}, + {NULL, L"headline", L"weather", "node_weather", 0}, + + // {NULL, L"hierarchy", L"branch", NULL, 0}, + // {NULL, L"hierarchy", L"leaf", NULL, 0}, + + // {NULL, L"proxy", L"bytestreams", NULL, 0}, + {NULL, L"proxy", NULL, NULL, SKINICON_EVENT_FILE}, + + // {NULL, L"pubsub", L"collection", NULL, 0}, + // {NULL, L"pubsub", L"leaf", NULL, 0}, + // {NULL, L"pubsub", L"pep", NULL, 0}, + // {NULL, L"pubsub", L"service", NULL, 0}, + + // {NULL, L"server", L"im", NULL, 0}, + {NULL, L"server", NULL, "node_server", 0}, + + // {NULL, L"store", L"berkeley", NULL, 0}, + /// {NULL, L"store", L"file", NULL, 0}, + // {NULL, L"store", L"generic", NULL, 0}, + // {NULL, L"store", L"ldap", NULL, 0}, + // {NULL, L"store", L"mysql", NULL, 0}, + // {NULL, L"store", L"oracle", NULL, 0}, + // {NULL, L"store", L"postgres", NULL, 0}, + {NULL, L"store", NULL, "node_store", 0}, // icons for non-standard identities - {NULL, _T("x-service"), _T("x-rss"), "node_rss", 0}, - {NULL, _T("application"), _T("x-weather"), "node_weather", 0}, - {NULL, _T("user"), NULL, NULL, SKINICON_STATUS_ONLINE}, + {NULL, L"x-service", L"x-rss", "node_rss", 0}, + {NULL, L"application", L"x-weather", "node_weather", 0}, + {NULL, L"user", NULL, NULL, SKINICON_STATUS_ONLINE}, // icon suggestions based on supported features - {_T("jabber:iq:gateway"), NULL, NULL, "Agents", 0}, - {_T("jabber:iq:search"), NULL, NULL, NULL, SKINICON_OTHER_FINDUSER}, + {L"jabber:iq:gateway", NULL, NULL, "Agents", 0}, + {L"jabber:iq:search", NULL, NULL, NULL, SKINICON_OTHER_FINDUSER}, { JABBER_FEAT_COMMANDS, NULL, NULL, "adhoc", 0}, { JABBER_FEAT_REGISTER, NULL, NULL, "key", 0}, }; @@ -181,11 +181,11 @@ void CJabberProto::OnIqResultServiceDiscoveryInfo(HXML iqNode, CJabberIqInfo *pI else { HXML feature; int i; - for (i = 1; (feature = XmlGetNthChild(query, _T("feature"), i)) != NULL; i++) - pNode->AddFeature(XmlGetAttrValue(feature, _T("var"))); + for (i = 1; (feature = XmlGetNthChild(query, L"feature", i)) != NULL; i++) + pNode->AddFeature(XmlGetAttrValue(feature, L"var")); HXML identity; - for (i = 1; (identity = XmlGetNthChild(query, _T("identity"), i)) != NULL; i++) - pNode->AddIdentity(XmlGetAttrValue(identity, _T("category")), XmlGetAttrValue(identity, _T("type")), XmlGetAttrValue(identity, _T("name"))); + for (i = 1; (identity = XmlGetNthChild(query, L"identity", i)) != NULL; i++) + pNode->AddIdentity(XmlGetAttrValue(identity, L"category"), XmlGetAttrValue(identity, L"type"), XmlGetAttrValue(identity, L"name")); pNode->SetInfoRequestId(JABBER_DISCO_RESULT_OK); pNode->SetInfoRequestErrorText(NULL); @@ -224,8 +224,8 @@ void CJabberProto::OnIqResultServiceDiscoveryItems(HXML iqNode, CJabberIqInfo *p pNode->SetItemsRequestId(JABBER_DISCO_RESULT_ERROR); else { HXML item; - for (int i = 1; (item = XmlGetNthChild(query, _T("item"), i)) != NULL; i++) - pNode->AddChildNode(XmlGetAttrValue(item, _T("jid")), XmlGetAttrValue(item, _T("node")), XmlGetAttrValue(item, _T("name"))); + for (int i = 1; (item = XmlGetNthChild(query, L"item", i)) != NULL; i++) + pNode->AddChildNode(XmlGetAttrValue(item, L"jid"), XmlGetAttrValue(item, L"node"), XmlGetAttrValue(item, L"name")); pNode->SetItemsRequestId(JABBER_DISCO_RESULT_OK); pNode->SetItemsRequestErrorText(NULL); @@ -239,7 +239,7 @@ void CJabberProto::OnIqResultServiceDiscoveryItems(HXML iqNode, CJabberIqInfo *p mir_free(str); } else { - pNode->SetItemsRequestErrorText(_T("request timeout.")); + pNode->SetItemsRequestErrorText(L"request timeout."); } pNode->SetItemsRequestId(JABBER_DISCO_RESULT_ERROR); } @@ -261,9 +261,9 @@ void CJabberProto::OnIqResultServiceDiscoveryRootInfo(HXML iqNode, CJabberIqInfo HXML query = XmlGetChild(iqNode, "query"); if (query) { HXML feature; - for (int i = 1; (feature = XmlGetNthChild(query, _T("feature"), i)) != NULL; i++) { - if (!mir_tstrcmp(XmlGetAttrValue(feature, _T("var")), (TCHAR *)pInfo->m_pUserData)) { - CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(pInfo->GetReceiver(), XmlGetAttrValue(iqNode, _T("node")), NULL); + for (int i = 1; (feature = XmlGetNthChild(query, L"feature", i)) != NULL; i++) { + if (!mir_tstrcmp(XmlGetAttrValue(feature, L"var"), (TCHAR *)pInfo->m_pUserData)) { + CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(pInfo->GetReceiver(), XmlGetAttrValue(iqNode, L"node"), NULL); SendBothRequests(pNode, NULL); break; } @@ -286,15 +286,15 @@ void CJabberProto::OnIqResultServiceDiscoveryRootItems(HXML iqNode, CJabberIqInf HXML query = XmlGetChild(iqNode, "query"); if (query) { HXML item; - for (int i = 1; (item = XmlGetNthChild(query, _T("item"), i)) != NULL; i++) { - const TCHAR *szJid = XmlGetAttrValue(item, _T("jid")); - const TCHAR *szNode = XmlGetAttrValue(item, _T("node")); + for (int i = 1; (item = XmlGetNthChild(query, L"item", i)) != NULL; i++) { + const TCHAR *szJid = XmlGetAttrValue(item, L"jid"); + const TCHAR *szNode = XmlGetAttrValue(item, L"node"); CJabberIqInfo *pNewInfo = AddIQ(&CJabberProto::OnIqResultServiceDiscoveryRootInfo, JABBER_IQ_TYPE_GET, szJid); pNewInfo->m_pUserData = pInfo->m_pUserData; pNewInfo->SetTimeout(30000); XmlNodeIq iq(pNewInfo); - iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), szNode); + iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", szNode); XmlAddChild(packet, iq); } } @@ -319,7 +319,7 @@ BOOL CJabberProto::SendInfoRequest(CJabberSDNode *pNode, HXML parent) XmlNodeIq iq(pInfo); HXML query = iq << XQUERY(JABBER_FEAT_DISCO_INFO); if (pNode->GetNode()) - XmlAddAttr(query, _T("node"), pNode->GetNode()); + XmlAddAttr(query, L"node", pNode->GetNode()); if (parent) XmlAddChild(parent, iq); @@ -349,7 +349,7 @@ BOOL CJabberProto::SendBothRequests(CJabberSDNode *pNode, HXML parent) XmlNodeIq iq(pInfo); HXML query = iq << XQUERY(JABBER_FEAT_DISCO_INFO); if (pNode->GetNode()) - XmlAddAttr(query, _T("node"), pNode->GetNode()); + XmlAddAttr(query, L"node", pNode->GetNode()); if (parent) XmlAddChild(parent, iq); @@ -366,7 +366,7 @@ BOOL CJabberProto::SendBothRequests(CJabberSDNode *pNode, HXML parent) XmlNodeIq iq(pInfo); HXML query = iq << XQUERY(JABBER_FEAT_DISCO_ITEMS); if (pNode->GetNode()) - XmlAddAttr(query, _T("node"), pNode->GetNode()); + XmlAddAttr(query, L"node", pNode->GetNode()); if (parent) XmlAddChild(parent, iq); @@ -437,7 +437,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) sttBrowseMode = SD_BROWSE_AGENTS; TCHAR *szServerJid = mir_a2t(m_ThreadInfo->conn.server); CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultServiceDiscoveryRootItems, JABBER_IQ_TYPE_GET, szServerJid); - pInfo->m_pUserData = (void*)_T("jabber:iq:gateway"); + pInfo->m_pUserData = (void*)L"jabber:iq:gateway"; pInfo->SetTimeout(30000); XmlNodeIq iq(pInfo); iq << XQUERY(JABBER_FEAT_DISCO_ITEMS); @@ -635,12 +635,12 @@ void CJabberDlgDiscovery::OnInitDialog() if (m_jid) { SetDlgItemText(m_hwnd, IDC_COMBO_JID, m_jid); - SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T("")); + SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L""); m_focusEditAfterBrowse = false; } else { SetDlgItemTextA(m_hwnd, IDC_COMBO_JID, m_proto->m_ThreadInfo->conn.server); - SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T("")); + SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L""); m_focusEditAfterBrowse = true; } @@ -668,7 +668,7 @@ void CJabberDlgDiscovery::OnInitDialog() ListView_InsertColumn(hwndList, 0, &lvc); lvc.cx = m_proto->getWord("discoWnd_cx1", 200); lvc.iSubItem = 1; - lvc.pszText = _T("JID"); + lvc.pszText = L"JID"; ListView_InsertColumn(hwndList, 1, &lvc); lvc.cx = m_proto->getWord("discoWnd_cx2", 200); lvc.iSubItem = 2; @@ -790,7 +790,7 @@ void CJabberDlgDiscovery::btnViewAsList_OnClick(CCtrlButton *) void CJabberDlgDiscovery::btnGoHome_OnClick(CCtrlButton *) { SetDlgItemTextA(m_hwnd, IDC_COMBO_JID, m_proto->m_ThreadInfo->conn.server); - SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T("")); + SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L""); PostMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(IDC_BUTTON_BROWSE, 0), 0); } @@ -846,8 +846,8 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *) else { res /= 10; - SetDlgItemText(m_hwnd, IDC_COMBO_JID, _T("")); - SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T("")); + SetDlgItemText(m_hwnd, IDC_COMBO_JID, L""); + SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L""); char setting[MAXMODULELABELLENGTH]; mir_snprintf(setting, "discoWnd_favJID_%d", res); @@ -889,7 +889,7 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *) SetDlgItemText(m_hwnd, IDC_COMBO_JID, _T(SD_FAKEJID_CONFERENCES)); break; } - SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T("")); + SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L""); PostMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(IDC_BUTTON_BROWSE, 0), 0); } @@ -948,7 +948,7 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) case WM_JABBER_TRANSPORT_REFRESH: if (m_proto->m_nSDBrowseMode == SD_BROWSE_MYAGENTS) { SetDlgItemText(m_hwnd, IDC_COMBO_JID, _T(SD_FAKEJID_MYAGENTS)); - SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T("")); + SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L""); PostMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(IDC_BUTTON_BROWSE, 0), 0); } break; @@ -1189,15 +1189,15 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM { NULL, LPGENT("Add to favorites"), SD_ACT_FAVORITE}, { NULL, LPGENT("Add to roster"), SD_ACT_ROSTER, SD_FLG_NONODE | SD_FLG_NOTONROSTER}, { JABBER_FEAT_MUC, LPGENT("Bookmark chatroom"), SD_ACT_BOOKMARK, SD_FLG_NORESOURCE | SD_FLG_HASUSER}, - { _T("jabber:iq:search"), LPGENT("Add search directory"), SD_ACT_ADDDIRECTORY}, + { L"jabber:iq:search", LPGENT("Add search directory"), SD_ACT_ADDDIRECTORY}, { JABBER_FEAT_BYTESTREAMS, LPGENT("Use this proxy"), SD_ACT_PROXY}, {0}, { JABBER_FEAT_REGISTER, LPGENT("Register"), SD_ACT_REGISTER}, - { _T("jabber:iq:gateway"), LPGENT("Unregister"), SD_ACT_UNREGISTER, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED}, + { L"jabber:iq:gateway", LPGENT("Unregister"), SD_ACT_UNREGISTER, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED}, { JABBER_FEAT_COMMANDS, LPGENT("Commands..."), SD_ACT_ADHOC}, {0}, - { _T("jabber:iq:gateway"), LPGENT("Logon"), SD_ACT_LOGON, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED | SD_FLG_ONLINE}, - { _T("jabber:iq:gateway"), LPGENT("Logoff"), SD_ACT_LOGOFF, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED | SD_FLG_NOTONLINE}, + { L"jabber:iq:gateway", LPGENT("Logon"), SD_ACT_LOGON, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED | SD_FLG_ONLINE}, + { L"jabber:iq:gateway", LPGENT("Logoff"), SD_ACT_LOGOFF, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED | SD_FLG_NOTONLINE}, {0}, { NULL, LPGENT("Copy JID"), SD_ACT_COPYJID}, { NULL, LPGENT("Copy node name"), SD_ACT_COPYNODE}, @@ -1345,7 +1345,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM mir_snprintf(setting, "discoWnd_favJID_%d", count); setTString(setting, pNode->GetJid()); mir_snprintf(setting, "discoWnd_favNode_%d", count); - setTString(setting, pNode->GetNode() ? pNode->GetNode() : _T("")); + setTString(setting, pNode->GetNode() ? pNode->GetNode() : L""); setDword("discoWnd_favCount", ++count); } break; @@ -1384,7 +1384,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM item->name = mir_tstrdup(pNode->GetName()); } - item->type = _T("conference"); + item->type = L"conference"; AddEditBookmark(item); } } @@ -1433,14 +1433,14 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM case SD_ACT_LOGON: case SD_ACT_LOGOFF: - m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), pNode->GetJid()) << XATTR(_T("type"), (res != SD_ACT_LOGON) ? _T("unavailable") : NULL)); + m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", pNode->GetJid()) << XATTR(L"type", (res != SD_ACT_LOGON) ? L"unavailable" : NULL)); break; case SD_ACT_UNREGISTER: - m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext(), pNode->GetJid()) << XQUERY(JABBER_FEAT_REGISTER) << XCHILD(_T("remove"))); + m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext(), pNode->GetJid()) << XQUERY(JABBER_FEAT_REGISTER) << XCHILD(L"remove")); - m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext()) << XQUERY(JABBER_FEAT_IQ_ROSTER) - << XCHILD(_T("item")) << XATTR(_T("jid"), pNode->GetJid()) << XATTR(_T("subscription"), _T("remove"))); + m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext()) << XQUERY(JABBER_FEAT_IQ_ROSTER) + << XCHILD(L"item") << XATTR(L"jid", pNode->GetJid()) << XATTR(L"subscription", L"remove")); break; default: diff --git a/protocols/JabberG/src/jabber_disco.h b/protocols/JabberG/src/jabber_disco.h index 55422f9358..9c327a60f4 100644 --- a/protocols/JabberG/src/jabber_disco.h +++ b/protocols/JabberG/src/jabber_disco.h @@ -349,23 +349,23 @@ public: { CMString tszTmp; - tszTmp.AppendFormat(_T("Jid: %s\r\n"), m_szJid); + tszTmp.AppendFormat(L"Jid: %s\r\n", m_szJid); if (m_szNode) - tszTmp.AppendFormat(_T("%s: %s\r\n"), TranslateT("Node"), m_szNode); + tszTmp.AppendFormat(L"%s: %s\r\n", TranslateT("Node"), m_szNode); if (m_pIdentities) { - tszTmp.AppendFormat(_T("\r\n%s:\r\n"), TranslateT("Identities")); + tszTmp.AppendFormat(L"\r\n%s:\r\n", TranslateT("Identities")); CJabberSDIdentity *pIdentity = m_pIdentities; while (pIdentity) { if (pIdentity->GetName()) - tszTmp.AppendFormat(_T(" %c %s (%s: %s, %s: %s)\r\n"), + tszTmp.AppendFormat(L" %c %s (%s: %s, %s: %s)\r\n", CHR_BULLET, pIdentity->GetName(), TranslateT("category"), pIdentity->GetCategory(), TranslateT("type"), pIdentity->GetType()); else - tszTmp.AppendFormat(_T(" %c %s: %s, %s: %s\r\n"), + tszTmp.AppendFormat(L" %c %s: %s, %s: %s\r\n", CHR_BULLET, TranslateT("Category"), pIdentity->GetCategory(), TranslateT("Type"), pIdentity->GetType()); @@ -375,17 +375,17 @@ public: } if (m_pFeatures) { - tszTmp.AppendFormat(_T("\r\n%s:\r\n"), TranslateT("Supported features")); + tszTmp.AppendFormat(L"\r\n%s:\r\n", TranslateT("Supported features")); for (CJabberSDFeature *pFeature = m_pFeatures; pFeature; pFeature = pFeature->GetNext()) - tszTmp.AppendFormat(_T(" %c %s\r\n"), CHR_BULLET, pFeature->GetVar()); + tszTmp.AppendFormat(L" %c %s\r\n", CHR_BULLET, pFeature->GetVar()); } if (m_szInfoError) - tszTmp.AppendFormat(_T("\r\n%s: %s\r\n"), TranslateT("Info request error"), m_szInfoError); + tszTmp.AppendFormat(L"\r\n%s: %s\r\n", TranslateT("Info request error"), m_szInfoError); if (m_szItemsError) - tszTmp.AppendFormat(_T("\r\n%s: %s\r\n"), TranslateT("Items request error"), m_szItemsError); + tszTmp.AppendFormat(L"\r\n%s: %s\r\n", TranslateT("Items request error"), m_szItemsError); tszTmp.TrimRight(); _tcsncpy_s(szText, nMaxLength, tszTmp, _TRUNCATE); diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index 5c293e4f79..b78c31f4c0 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -46,12 +46,12 @@ int CJabberProto::OnContactDeleted(WPARAM hContact, LPARAM) JabberStripJid(m_ThreadInfo->fullJID, szStrippedJid, _countof(szStrippedJid)); TCHAR *szDog = _tcschr(szStrippedJid, _T('@')); if (szDog && mir_tstrcmpi(szDog + 1, jid)) - m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext(), jid) << XQUERY(JABBER_FEAT_REGISTER) << XCHILD(_T("remove"))); + m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext(), jid) << XQUERY(JABBER_FEAT_REGISTER) << XCHILD(L"remove")); } // Remove from roster, server also handles the presence unsubscription process. - m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext()) << XQUERY(JABBER_FEAT_IQ_ROSTER) - << XCHILD(_T("item")) << XATTR(_T("jid"), jid) << XATTR(_T("subscription"), _T("remove"))); + m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext()) << XQUERY(JABBER_FEAT_IQ_ROSTER) + << XCHILD(L"item") << XATTR(L"jid", jid) << XATTR(L"subscription", L"remove")); } return 0; } @@ -97,7 +97,7 @@ void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, MCONTACT hC else { TCHAR *p = sttSettingToTchar(cws); if (cws->value.pszVal != NULL && mir_tstrcmp(p, item->group)) { - debugLog(_T("Group set to %s"), p); + debugLog(L"Group set to %s", p); if (p) AddContactToRoster(item->jid, tszNick, p); } @@ -120,7 +120,7 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT ptrT newNick( sttSettingToTchar(cws)); if (newNick && mir_tstrcmp(item->nick, newNick)) { - debugLog(_T("Renaming contact %s: %s -> %s"), item->jid, item->nick, newNick); + debugLog(L"Renaming contact %s: %s -> %s", item->jid, item->nick, newNick); AddContactToRoster(item->jid, newNick, item->group); } } @@ -134,7 +134,7 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONT if (jid == NULL) return; - debugLog(_T("Add %s permanently to list"), jid); + debugLog(L"Add %s permanently to list", jid); ptrT nick(db_get_tsa(hContact, "CList", "MyHandle")); if (nick == NULL) nick = getTStringA(hContact, "Nick"); @@ -145,10 +145,10 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONT AddContactToRoster(jid, nick, ptrT(db_get_tsa(hContact, "CList", "Group"))); - XmlNode xPresence(_T("presence")); xPresence << XATTR(_T("to"), LPCTSTR(jid)) << XATTR(_T("type"), _T("subscribe")); + XmlNode xPresence(L"presence"); xPresence << XATTR(L"to", LPCTSTR(jid)) << XATTR(L"type", L"subscribe"); ptrT myNick(getTStringA(NULL, "Nick")); if (myNick != NULL) - xPresence << XCHILD(_T("nick"), LPCTSTR(myNick)) << XATTR(_T("xmlns"), JABBER_FEAT_NICK); + xPresence << XCHILD(L"nick", LPCTSTR(myNick)) << XATTR(L"xmlns", JABBER_FEAT_NICK); m_ThreadInfo->send(xPresence); SendGetVcard(jid); diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 69951806b0..aef5167c73 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -179,7 +179,7 @@ void JabberFileServerConnection(JABBER_SOCKET hConnection, DWORD /*dwRemoteIP*/, CallService(MS_NETLIB_GETCONNECTIONINFO, (WPARAM)hConnection, (LPARAM)&connInfo); TCHAR szPort[10]; - mir_sntprintf(szPort, _T("%d"), connInfo.wPort); + mir_sntprintf(szPort, L"%d", connInfo.wPort); ppro->debugLogA("File server incoming connection accepted: %s", connInfo.szIpPort); JABBER_LIST_ITEM *item = ppro->ListGetItemPtr(LIST_FILE, szPort); @@ -260,7 +260,7 @@ void __cdecl CJabberProto::FileServerThread(filetransfer *ft) ft->hFileEvent = hEvent; TCHAR szPort[20]; - mir_sntprintf(szPort, _T("%d"), nlb.wPort); + mir_sntprintf(szPort, L"%d", nlb.wPort); JABBER_LIST_ITEM *item = ListAdd(LIST_FILE, szPort); item->ft = ft; @@ -294,12 +294,12 @@ void __cdecl CJabberProto::FileServerThread(filetransfer *ft) size_t len = mir_tstrlen(ptszResource) + mir_tstrlen(ft->jid) + 2; TCHAR *fulljid = (TCHAR *)alloca(sizeof(TCHAR) * len); - mir_sntprintf(fulljid, len, _T("%s/%s"), ft->jid, ptszResource); + mir_sntprintf(fulljid, len, L"%s/%s", ft->jid, ptszResource); - XmlNodeIq iq(_T("set"), ft->szId, fulljid); + XmlNodeIq iq(L"set", ft->szId, fulljid); HXML query = iq << XQUERY(JABBER_FEAT_OOB); - query << XCHILD(_T("url"), _A2T(szAddr)); - query << XCHILD(_T("desc"), ft->szDescription); + query << XCHILD(L"url", _A2T(szAddr)); + query << XCHILD(L"desc", ft->szDescription); m_ThreadInfo->send(iq); debugLogA("Waiting for the file to be sent..."); @@ -390,11 +390,11 @@ int CJabberProto::FileSendParse(JABBER_SOCKET s, filetransfer *ft, char* buffer, if (ft->httpPath == NULL) debugLogA("Requested file name does not matched (httpPath == NULL)"); else - debugLog(_T("Requested file name does not matched ('%s' vs. '%s')"), ft->httpPath, t); + debugLog(L"Requested file name does not matched ('%s' vs. '%s')", ft->httpPath, t); ft->state = FT_ERROR; break; } - debugLog(_T("Sending [%s]"), ft->std.ptszFiles[currentFile]); + debugLog(L"Sending [%s]", ft->std.ptszFiles[currentFile]); _tstati64(ft->std.ptszFiles[currentFile], &statbuf); // file size in statbuf.st_size if ((fileId = _topen(ft->std.ptszFiles[currentFile], _O_BINARY | _O_RDONLY)) < 0) { debugLogA("File cannot be opened"); @@ -501,7 +501,7 @@ int filetransfer::create() return fileId; TCHAR filefull[MAX_PATH]; - mir_sntprintf(filefull, _T("%s\\%s"), std.tszWorkingDir, std.tszCurrentFile); + mir_sntprintf(filefull, L"%s\\%s", std.tszWorkingDir, std.tszCurrentFile); replaceStrT(std.tszCurrentFile, filefull); if (hWaitEvent != INVALID_HANDLE_VALUE) @@ -512,12 +512,12 @@ int filetransfer::create() WaitForSingleObject(hWaitEvent, INFINITE); if (fileId == -1) { - ppro->debugLog(_T("Saving to [%s]"), std.tszCurrentFile); + ppro->debugLog(L"Saving to [%s]", std.tszCurrentFile); fileId = _topen(std.tszCurrentFile, _O_BINARY | _O_CREAT | _O_TRUNC | _O_WRONLY, _S_IREAD | _S_IWRITE); } if (fileId == -1) - ppro->debugLog(_T("Cannot create file '%s' during a file transfer"), filefull); + ppro->debugLog(L"Cannot create file '%s' during a file transfer", filefull); else if (std.currentFileSize != 0) _chsize(fileId, std.currentFileSize); diff --git a/protocols/JabberG/src/jabber_filterlist.cpp b/protocols/JabberG/src/jabber_filterlist.cpp index ad79a42e9a..f03bf49ee1 100644 --- a/protocols/JabberG/src/jabber_filterlist.cpp +++ b/protocols/JabberG/src/jabber_filterlist.cpp @@ -180,7 +180,7 @@ LRESULT CCtrlFilterListView::CustomWndProc(UINT msg, WPARAM wParam, LPARAM lPara case 2: fdat->m_hwndOwner = m_hwnd; - fdat->m_hwndEditBox = CreateWindow(_T("edit"), fdat->m_filterText, + fdat->m_hwndEditBox = CreateWindow(L"edit", fdat->m_filterText, WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_LEFT|ES_AUTOHSCROLL, 0, 0, 0, 0, ::GetParent(m_hwnd), (HMENU)-1, hInst, NULL); diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp index c8ad8a03b7..6965e989da 100644 --- a/protocols/JabberG/src/jabber_form.cpp +++ b/protocols/JabberG/src/jabber_form.cpp @@ -108,7 +108,7 @@ void JabberFormCenterContent(HWND hwndStatic) void JabberFormSetInstruction(HWND hwndForm, const TCHAR *text) { - if (!text) text = _T(""); + if (!text) text = L""; size_t len = mir_tstrlen(text); size_t fixedLen = len; @@ -205,19 +205,19 @@ void JabberFormSetInstruction(HWND hwndForm, const TCHAR *text) static TJabberFormControlType JabberFormTypeNameToId(const TCHAR *type) { - if (!mir_tstrcmp(type, _T("text-private"))) + if (!mir_tstrcmp(type, L"text-private")) return JFORM_CTYPE_TEXT_PRIVATE; - if (!mir_tstrcmp(type, _T("text-multi")) || !mir_tstrcmp(type, _T("jid-multi"))) + if (!mir_tstrcmp(type, L"text-multi") || !mir_tstrcmp(type, L"jid-multi")) return JFORM_CTYPE_TEXT_MULTI; - if (!mir_tstrcmp(type, _T("boolean"))) + if (!mir_tstrcmp(type, L"boolean")) return JFORM_CTYPE_BOOLEAN; - if (!mir_tstrcmp(type, _T("list-single"))) + if (!mir_tstrcmp(type, L"list-single")) return JFORM_CTYPE_LIST_SINGLE; - if (!mir_tstrcmp(type, _T("list-multi"))) + if (!mir_tstrcmp(type, L"list-multi")) return JFORM_CTYPE_LIST_MULTI; - if (!mir_tstrcmp(type, _T("fixed"))) + if (!mir_tstrcmp(type, L"fixed")) return JFORM_CTYPE_FIXED; - if (!mir_tstrcmp(type, _T("hidden"))) + if (!mir_tstrcmp(type, L"hidden")) return JFORM_CTYPE_HIDDEN; return JFORM_CTYPE_TEXT_SINGLE; @@ -283,7 +283,7 @@ void JabberFormLayoutSingleControl(TJabberFormControlInfo *item, TJabberFormLayo } #define JabberFormCreateLabel() \ - CreateWindow(_T("static"), labelStr, WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE, \ + CreateWindow(L"static", labelStr, WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE, \ 0, 0, 0, 0, hwndStatic, (HMENU)-1, hInst, NULL) TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayoutInfo *layout_info, TJabberFormControlType type, const TCHAR *labelStr, const TCHAR *valueStr) @@ -301,7 +301,7 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo switch (type) { case JFORM_CTYPE_TEXT_PRIVATE: item->hLabel = JabberFormCreateLabel(); - item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, _T("edit"), valueStr, + item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, L"edit", valueStr, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_LEFT | ES_AUTOHSCROLL | ES_PASSWORD, 0, 0, 0, 0, hwndStatic, (HMENU)layout_info->id, hInst, NULL); @@ -310,7 +310,7 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo case JFORM_CTYPE_TEXT_MULTI: item->hLabel = JabberFormCreateLabel(); - item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, _T("edit"), valueStr, + item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, L"edit", valueStr, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN, 0, 0, 0, 0, hwndStatic, (HMENU)layout_info->id, hInst, NULL); @@ -319,11 +319,11 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo break; case JFORM_CTYPE_BOOLEAN: - item->hCtrl = CreateWindowEx(0, _T("button"), labelStr, + item->hCtrl = CreateWindowEx(0, L"button", labelStr, WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTOCHECKBOX | BS_MULTILINE, 0, 0, 0, 0, hwndStatic, (HMENU)layout_info->id, hInst, NULL); - if (valueStr && !mir_tstrcmp(valueStr, _T("1"))) + if (valueStr && !mir_tstrcmp(valueStr, L"1")) SendMessage(item->hCtrl, BM_SETCHECK, 1, 0); ++layout_info->id; break; @@ -347,7 +347,7 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo break; case JFORM_CTYPE_FIXED: - item->hCtrl = CreateWindow(_T("edit"), valueStr, + item->hCtrl = CreateWindow(L"edit", valueStr, WS_CHILD | WS_VISIBLE | ES_MULTILINE | ES_READONLY | ES_AUTOHSCROLL, 0, 0, 0, 0, hwndStatic, (HMENU)-1, hInst, NULL); @@ -358,7 +358,7 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo case JFORM_CTYPE_TEXT_SINGLE: item->hLabel = labelStr ? (JabberFormCreateLabel()) : NULL; - item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, _T("edit"), valueStr, + item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, L"edit", valueStr, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_LEFT | ES_AUTOHSCROLL, 0, 0, 0, 0, hwndStatic, (HMENU)layout_info->id, hInst, NULL); @@ -440,7 +440,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp TCHAR *labelStr, *valueStr; RECT frameRect; - if (xNode == NULL || XmlGetName(xNode) == NULL || mir_tstrcmp(XmlGetName(xNode), _T("x")) || hwndStatic == NULL) + if (xNode == NULL || XmlGetName(xNode) == NULL || mir_tstrcmp(XmlGetName(xNode), L"x") || hwndStatic == NULL) return; GetClientRect(hwndStatic, &frameRect); @@ -460,14 +460,14 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp if (!n) break; - if (mir_tstrcmp(XmlGetName(n), _T("field"))) + if (mir_tstrcmp(XmlGetName(n), L"field")) continue; - varStr = XmlGetAttrValue(n, _T("var")); - if ((typeName = XmlGetAttrValue(n, _T("type"))) == NULL) + varStr = XmlGetAttrValue(n, L"var"); + if ((typeName = XmlGetAttrValue(n, L"type")) == NULL) continue; - if ((label = XmlGetAttrValue(n, _T("label"))) != NULL) + if ((label = XmlGetAttrValue(n, L"label")) != NULL) labelStr = mir_tstrdup(label); else labelStr = mir_tstrdup(varStr); @@ -484,7 +484,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp v = XmlGetChild(n, j); if (!v) break; - if (XmlGetName(v) && !mir_tstrcmp(XmlGetName(v), _T("value")) && XmlGetText(v)) + if (XmlGetName(v) && !mir_tstrcmp(XmlGetName(v), L"value") && XmlGetText(v)) size += mir_tstrlen(XmlGetText(v)) + 2; } valueStr = (TCHAR*)mir_alloc(sizeof(TCHAR)*size); @@ -493,9 +493,9 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp v = XmlGetChild(n, j); if (!v) break; - if (XmlGetName(v) && !mir_tstrcmp(XmlGetName(v), _T("value")) && XmlGetText(v)) { + if (XmlGetName(v) && !mir_tstrcmp(XmlGetName(v), L"value") && XmlGetText(v)) { if (valueStr[0]) - mir_tstrcat(valueStr, _T("\r\n")); + mir_tstrcat(valueStr, L"\r\n"); mir_tstrcat(valueStr, XmlGetText(v)); } } @@ -514,11 +514,11 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp if (o == NULL) break; - if (mir_tstrcmp(XmlGetName(o), _T("option"))) + if (mir_tstrcmp(XmlGetName(o), L"option")) continue; if ((v = XmlGetChild(o, "value")) == NULL || XmlGetText(v) == NULL) continue; - if ((str = XmlGetAttrValue(o, _T("label"))) == NULL) + if ((str = XmlGetAttrValue(o, L"label")) == NULL) str = XmlGetText(v); if (str == NULL) continue; @@ -533,11 +533,11 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp if (o == NULL) break; - if (mir_tstrcmp(XmlGetName(o), _T("option"))) + if (mir_tstrcmp(XmlGetName(o), L"option")) continue; if ((v = XmlGetChild(o, "value")) == NULL || XmlGetText(v) == NULL) continue; - if ((str = XmlGetAttrValue(o, _T("label"))) == NULL) + if ((str = XmlGetAttrValue(o, L"label")) == NULL) str = XmlGetText(v); if (str == NULL) continue; @@ -547,7 +547,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp vs = XmlGetChild(n, k); if (!vs) break; - if (!mir_tstrcmp(XmlGetName(vs), _T("value")) && !mir_tstrcmp(XmlGetText(vs), XmlGetText(v))) { + if (!mir_tstrcmp(XmlGetName(vs), L"value") && !mir_tstrcmp(XmlGetText(vs), XmlGetText(v))) { selected = true; break; } @@ -579,13 +579,13 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) const TCHAR *varName, *type, *fieldStr, *labelText, *str2; TCHAR *p, *q, *str; - if (xNode == NULL || XmlGetName(xNode) == NULL || mir_tstrcmp(XmlGetName(xNode), _T("x")) || hwndStatic == NULL) + if (xNode == NULL || XmlGetName(xNode) == NULL || mir_tstrcmp(XmlGetName(xNode), L"x") || hwndStatic == NULL) return NULL; hFrame = hwndStatic; id = 0; - XmlNode x(_T("x")); - x << XATTR(_T("xmlns"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("submit")); + XmlNode x(L"x"); + x << XATTR(L"xmlns", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"submit"); for (int i = 0;; i++) { n = XmlGetChild(xNode, i); @@ -593,36 +593,36 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) break; fieldStr = NULL; - if (mir_tstrcmp(XmlGetName(n), _T("field"))) + if (mir_tstrcmp(XmlGetName(n), L"field")) continue; - if ((varName = XmlGetAttrValue(n, _T("var"))) == NULL || (type = XmlGetAttrValue(n, _T("type"))) == NULL) + if ((varName = XmlGetAttrValue(n, L"var")) == NULL || (type = XmlGetAttrValue(n, L"type")) == NULL) continue; hCtrl = GetDlgItem(hFrame, id); - HXML field = x << XCHILD(_T("field")) << XATTR(_T("var"), varName); + HXML field = x << XCHILD(L"field") << XATTR(L"var", varName); - if (!mir_tstrcmp(type, _T("text-multi")) || !mir_tstrcmp(type, _T("jid-multi"))) { + if (!mir_tstrcmp(type, L"text-multi") || !mir_tstrcmp(type, L"jid-multi")) { len = GetWindowTextLength(GetDlgItem(hFrame, id)); str = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1)); GetDlgItemText(hFrame, id, str, len + 1); p = str; while (p != NULL) { - if ((q = _tcsstr(p, _T("\r\n"))) != NULL) + if ((q = _tcsstr(p, L"\r\n")) != NULL) *q = '\0'; - field << XCHILD(_T("value"), p); + field << XCHILD(L"value", p); p = q ? q + 2 : NULL; } mir_free(str); id++; } - else if (!mir_tstrcmp(type, _T("boolean"))) { + else if (!mir_tstrcmp(type, L"boolean")) { TCHAR buf[10]; _itot(IsDlgButtonChecked(hFrame, id) == BST_CHECKED ? 1 : 0, buf, 10); - field << XCHILD(_T("value"), buf); + field << XCHILD(L"value", buf); id++; } - else if (!mir_tstrcmp(type, _T("list-single"))) { + else if (!mir_tstrcmp(type, L"list-single")) { len = GetWindowTextLength(GetDlgItem(hFrame, id)); str = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1)); GetDlgItemText(hFrame, id, str, len + 1); @@ -632,9 +632,9 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) if (!o) break; - if (!mir_tstrcmp(XmlGetName(o), _T("option"))) { + if (!mir_tstrcmp(XmlGetName(o), L"option")) { if ((v = XmlGetChild(o, "value")) != NULL && XmlGetText(v)) { - if ((str2 = XmlGetAttrValue(o, _T("label"))) == NULL) + if ((str2 = XmlGetAttrValue(o, L"label")) == NULL) str2 = XmlGetText(v); if (!mir_tstrcmp(str2, str)) break; @@ -643,12 +643,12 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) } if (o) - field << XCHILD(_T("value"), XmlGetText(v)); + field << XCHILD(L"value", XmlGetText(v)); mir_free(str); id++; } - else if (!mir_tstrcmp(type, _T("list-multi"))) { + else if (!mir_tstrcmp(type, L"list-multi")) { int count = SendMessage(hCtrl, LB_GETCOUNT, 0, 0); for (j = 0; j < count; j++) { if (SendMessage(hCtrl, LB_GETSEL, j, 0) > 0) { @@ -661,13 +661,13 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) if (!o) break; - if (XmlGetName(o) && !mir_tstrcmp(XmlGetName(o), _T("option"))) { + if (XmlGetName(o) && !mir_tstrcmp(XmlGetName(o), L"option")) { if ((v = XmlGetChild(o, "value")) != NULL && XmlGetText(v)) { - if ((labelText = XmlGetAttrValue(o, _T("label"))) == NULL) + if ((labelText = XmlGetAttrValue(o, L"label")) == NULL) labelText = XmlGetText(v); if (!mir_tstrcmp(labelText, str)) - field << XCHILD(_T("value"), XmlGetText(v)); + field << XCHILD(L"value", XmlGetText(v)); } } } @@ -677,16 +677,16 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) } id++; } - else if (!mir_tstrcmp(type, _T("fixed")) || !mir_tstrcmp(type, _T("hidden"))) { + else if (!mir_tstrcmp(type, L"fixed") || !mir_tstrcmp(type, L"hidden")) { v = XmlGetChild(n, "value"); if (v != NULL && XmlGetText(v) != NULL) - field << XCHILD(_T("value"), XmlGetText(v)); + field << XCHILD(L"value", XmlGetText(v)); } else { // everything else is considered "text-single" or "text-private" len = GetWindowTextLength(GetDlgItem(hFrame, id)); str = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1)); GetDlgItemText(hFrame, id, str, len + 1); - field << XCHILD(_T("value"), str); + field << XCHILD(L"value", str); mir_free(str); id++; } @@ -724,16 +724,16 @@ static INT_PTR CALLBACK JabberFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, HXML n; LONG frameExStyle; // Set dialog title - if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, _T("title"))) != NULL && XmlGetText(n) != NULL) + if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, L"title")) != NULL && XmlGetText(n) != NULL) SetWindowText(hwndDlg, XmlGetText(n)); else SetWindowText(hwndDlg, TranslateTS(jfi->defTitle)); // Set instruction field - if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, _T("instructions"))) != NULL && XmlGetText(n) != NULL) + if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, L"instructions")) != NULL && XmlGetText(n) != NULL) JabberFormSetInstruction(hwndDlg, XmlGetText(n)); else { - if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, _T("title"))) != NULL && XmlGetText(n) != NULL) + if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, L"title")) != NULL && XmlGetText(n) != NULL) JabberFormSetInstruction(hwndDlg, XmlGetText(n)); else JabberFormSetInstruction(hwndDlg, TranslateTS(jfi->defTitle)); diff --git a/protocols/JabberG/src/jabber_frame.cpp b/protocols/JabberG/src/jabber_frame.cpp index d6bf5afce7..86faff30b5 100644 --- a/protocols/JabberG/src/jabber_frame.cpp +++ b/protocols/JabberG/src/jabber_frame.cpp @@ -79,7 +79,7 @@ CJabberInfoFrame::CJabberInfoFrame(CJabberProto *proto): CLISTFrame frame = { sizeof(frame) }; HWND hwndClist = pcli->hwndContactList; - frame.hWnd = CreateWindowEx(0, _T("JabberInfoFrameClass"), NULL, WS_CHILD|WS_VISIBLE, 0, 0, 100, 100, hwndClist, NULL, hInst, this); + frame.hWnd = CreateWindowEx(0, L"JabberInfoFrameClass", NULL, WS_CHILD|WS_VISIBLE, 0, 0, 100, 100, hwndClist, NULL, hInst, this); frame.align = alBottom; frame.height = 2 * SZ_FRAMEPADDING + GetSystemMetrics(SM_CYSMICON) + SZ_LINEPADDING; // compact height by default frame.Flags = F_VISIBLE|F_LOCKED|F_NOBORDER|F_TCHAR; @@ -105,7 +105,7 @@ CJabberInfoFrame::CJabberInfoFrame(CJabberProto *proto): UpdateInfoItem("$", proto->GetIconHandle(IDI_JABBER), proto->m_tszUserName); CreateInfoItem("$/JID", true); - UpdateInfoItem("$/JID", Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS), _T("Offline")); + UpdateInfoItem("$/JID", Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS), L"Offline"); SetInfoItemCallback("$/JID", &CJabberProto::InfoFrame_OnSetup); } @@ -137,7 +137,7 @@ void CJabberInfoFrame::InitClass() wcx.style = CS_DBLCLKS|CS_HREDRAW|CS_VREDRAW; wcx.lpfnWndProc = GlobalWndProc; wcx.hInstance = hInst; - wcx.lpszClassName = _T("JabberInfoFrameClass"); + wcx.lpszClassName = L"JabberInfoFrameClass"; wcx.hCursor = LoadCursor(NULL, IDC_ARROW); RegisterClassEx(&wcx); bClassRegistered = true; @@ -242,21 +242,21 @@ void CJabberInfoFrame::ReloadFonts() FontIDT fontid = {0}; fontid.cbSize = sizeof(fontid); - _tcsncpy_s(fontid.group, _T("Jabber"), _TRUNCATE); - _tcsncpy_s(fontid.name, _T("Frame title"), _TRUNCATE); + _tcsncpy_s(fontid.group, L"Jabber", _TRUNCATE); + _tcsncpy_s(fontid.name, L"Frame title", _TRUNCATE); m_clTitle = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lfFont); DeleteObject(m_hfntTitle); m_hfntTitle = CreateFontIndirect(&lfFont); - _tcsncpy_s(fontid.name, _T("Frame text"), _TRUNCATE); + _tcsncpy_s(fontid.name, L"Frame text", _TRUNCATE); m_clText = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lfFont); DeleteObject(m_hfntText); m_hfntText = CreateFontIndirect(&lfFont); ColourIDT colourid = {0}; colourid.cbSize = sizeof(colourid); - _tcsncpy_s(colourid.group, _T("Jabber"), _TRUNCATE); - _tcsncpy_s(colourid.name, _T("Background"), _TRUNCATE); + _tcsncpy_s(colourid.group, L"Jabber", _TRUNCATE); + _tcsncpy_s(colourid.name, L"Background", _TRUNCATE); m_clBack = CallService(MS_COLOUR_GETT, (WPARAM)&colourid, 0); UpdateSize(); diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index e6e270159f..0666d4d96c 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -100,26 +100,26 @@ void CJabberProto::FtInitiate(TCHAR* jid, filetransfer *ft) filename = p + 1; TCHAR tszJid[512]; - mir_sntprintf(tszJid, _T("%s/%s"), jid, rs); + mir_sntprintf(tszJid, L"%s/%s", jid, rs); XmlNodeIq iq(AddIQ(&CJabberProto::OnFtSiResult, JABBER_IQ_TYPE_SET, tszJid, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO, -1, ft)); - HXML si = iq << XCHILDNS(_T("si"), JABBER_FEAT_SI) << XATTR(_T("id"), sid) - << XATTR(_T("mime-type"), _T("binary/octet-stream")) << XATTR(_T("profile"), JABBER_FEAT_SI_FT); - si << XCHILDNS(_T("file"), JABBER_FEAT_SI_FT) << XATTR(_T("name"), filename) - << XATTRI64(_T("size"), ft->fileSize[ft->std.currentFileNumber]) << XCHILD(_T("desc"), ft->szDescription); + HXML si = iq << XCHILDNS(L"si", JABBER_FEAT_SI) << XATTR(L"id", sid) + << XATTR(L"mime-type", L"binary/octet-stream") << XATTR(L"profile", JABBER_FEAT_SI_FT); + si << XCHILDNS(L"file", JABBER_FEAT_SI_FT) << XATTR(L"name", filename) + << XATTRI64(L"size", ft->fileSize[ft->std.currentFileNumber]) << XCHILD(L"desc", ft->szDescription); - HXML field = si << XCHILDNS(_T("feature"), JABBER_FEAT_FEATURE_NEG) - << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form")) - << XCHILD(_T("field")) << XATTR(_T("var"), _T("stream-method")) << XATTR(_T("type"), _T("list-single")); + HXML field = si << XCHILDNS(L"feature", JABBER_FEAT_FEATURE_NEG) + << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form") + << XCHILD(L"field") << XATTR(L"var", L"stream-method") << XATTR(L"type", L"list-single"); BOOL bDirect = m_options.BsDirect; BOOL bProxy = m_options.BsProxyManual; // bytestreams support? if (bDirect || bProxy) - field << XCHILD(_T("option")) << XCHILD(_T("value"), JABBER_FEAT_BYTESTREAMS); + field << XCHILD(L"option") << XCHILD(L"value", JABBER_FEAT_BYTESTREAMS); - field << XCHILD(_T("option")) << XCHILD(_T("value"), JABBER_FEAT_IBB); + field << XCHILD(L"option") << XCHILD(L"value", JABBER_FEAT_IBB); m_ThreadInfo->send(iq); } @@ -138,7 +138,7 @@ void CJabberProto::OnFtSiResult(HXML iqNode, CJabberIqInfo *pInfo) if ((featureNode = XmlGetChild(siNode, "feature")) != NULL) { if ((xNode = XmlGetChildByTag(featureNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS)) != NULL) { - if ((fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("stream-method"))) != NULL) { + if ((fieldNode = XmlGetChildByTag(xNode, "field", "var", L"stream-method")) != NULL) { if ((valueNode = XmlGetChild(fieldNode, "value")) != NULL && XmlGetText(valueNode) != NULL) { if ((bDirect || bProxy) && !mir_tstrcmp(XmlGetText(valueNode), JABBER_FEAT_BYTESTREAMS)) { // Start Bytestream session @@ -187,10 +187,10 @@ BOOL CJabberProto::FtSend(HANDLE hConn, filetransfer *ft) char* buffer; int numRead; - debugLog(_T("Sending [%s]"), ft->std.ptszFiles[ft->std.currentFileNumber]); + debugLog(L"Sending [%s]", ft->std.ptszFiles[ft->std.currentFileNumber]); _tstati64(ft->std.ptszFiles[ft->std.currentFileNumber], &statbuf); // file size in statbuf.st_size if ((fd = _topen(ft->std.ptszFiles[ft->std.currentFileNumber], _O_BINARY | _O_RDONLY)) < 0) { - debugLog(_T("File cannot be opened")); + debugLog(L"File cannot be opened"); return FALSE; } @@ -217,7 +217,7 @@ BOOL CJabberProto::FtSend(HANDLE hConn, filetransfer *ft) BOOL CJabberProto::FtIbbSend(int blocksize, filetransfer *ft) { - debugLog(_T("Sending [%s]"), ft->std.ptszFiles[ft->std.currentFileNumber]); + debugLog(L"Sending [%s]", ft->std.ptszFiles[ft->std.currentFileNumber]); struct _stati64 statbuf; _tstati64(ft->std.ptszFiles[ft->std.currentFileNumber], &statbuf); // file size in statbuf.st_size @@ -237,8 +237,8 @@ BOOL CJabberProto::FtIbbSend(int blocksize, filetransfer *ft) int numRead; while ((numRead = _read(fd, buffer, blocksize)) > 0) { int iqId = SerialNext(); - XmlNode msg(_T("message")); - XmlAddAttr(msg, _T("to"), ft->jibb->dstJID); + XmlNode msg(L"message"); + XmlAddAttr(msg, L"to", ft->jibb->dstJID); msg << XATTRID(iqId); // let others send data too @@ -246,14 +246,14 @@ BOOL CJabberProto::FtIbbSend(int blocksize, filetransfer *ft) char *encoded = mir_base64_encode((PBYTE)(char*)buffer, numRead); - msg << XCHILD(_T("data"), _A2T(encoded)) << XATTR(_T("xmlns"), JABBER_FEAT_IBB) - << XATTR(_T("sid"), ft->jibb->sid) << XATTRI(_T("seq"), ft->jibb->wPacketId); + msg << XCHILD(L"data", _A2T(encoded)) << XATTR(L"xmlns", JABBER_FEAT_IBB) + << XATTR(L"sid", ft->jibb->sid) << XATTRI(L"seq", ft->jibb->wPacketId); - HXML ampNode = msg << XCHILDNS(_T("amp"), JABBER_FEAT_AMP); - ampNode << XCHILD(_T("rule")) << XATTR(_T("condition"), _T("deliver-at")) - << XATTR(_T("value"), _T("stored")) << XATTR(_T("action"), _T("error")); - ampNode << XCHILD(_T("rule")) << XATTR(_T("condition"), _T("match-resource")) - << XATTR(_T("value"), _T("exact")) << XATTR(_T("action"), _T("error")); + HXML ampNode = msg << XCHILDNS(L"amp", JABBER_FEAT_AMP); + ampNode << XCHILD(L"rule") << XATTR(L"condition", L"deliver-at") + << XATTR(L"value", L"stored") << XATTR(L"action", L"error"); + ampNode << XCHILD(L"rule") << XATTR(L"condition", L"match-resource") + << XATTR(L"value", L"exact") << XATTR(L"action", L"error"); ft->jibb->wPacketId++; mir_free(encoded); @@ -306,21 +306,21 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) unsigned __int64 filesize; if (!iqNode || - (from = XmlGetAttrValue(iqNode, _T("from"))) == NULL || - (str = XmlGetAttrValue(iqNode, _T("type"))) == NULL || mir_tstrcmp(str, _T("set")) || + (from = XmlGetAttrValue(iqNode, L"from")) == NULL || + (str = XmlGetAttrValue(iqNode, L"type")) == NULL || mir_tstrcmp(str, L"set") || (siNode = XmlGetChildByTag(iqNode, "si", "xmlns", JABBER_FEAT_SI)) == NULL) return; - szId = XmlGetAttrValue(iqNode, _T("id")); - if ((sid = XmlGetAttrValue(siNode, _T("id"))) != NULL && + szId = XmlGetAttrValue(iqNode, L"id"); + if ((sid = XmlGetAttrValue(siNode, L"id")) != NULL && (fileNode = XmlGetChildByTag(siNode, "file", "xmlns", JABBER_FEAT_SI_FT)) != NULL && - (filename = XmlGetAttrValue(fileNode, _T("name"))) != NULL && - (str = XmlGetAttrValue(fileNode, _T("size"))) != NULL) { + (filename = XmlGetAttrValue(fileNode, L"name")) != NULL && + (str = XmlGetAttrValue(fileNode, L"size")) != NULL) { filesize = _ttoi64(str); if ((featureNode = XmlGetChildByTag(siNode, "feature", "xmlns", JABBER_FEAT_FEATURE_NEG)) != NULL && (xNode = XmlGetChildByTag(featureNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS)) != NULL && - (fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("stream-method"))) != NULL) { + (fieldNode = XmlGetChildByTag(xNode, "field", "var", L"stream-method")) != NULL) { BOOL bIbbOnly = m_options.BsOnlyIBB; HXML optionNode = NULL; @@ -332,7 +332,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) if (!optionNode) break; - if (!mir_tstrcmp(XmlGetName(optionNode), _T("option"))) { + if (!mir_tstrcmp(XmlGetName(optionNode), L"option")) { if ((n = XmlGetChild(optionNode, "value")) != NULL && XmlGetText(n)) { if (!mir_tstrcmp(XmlGetText(n), JABBER_FEAT_BYTESTREAMS)) { ftType = FT_BYTESTREAM; @@ -350,7 +350,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) if (!optionNode) break; - if (!mir_tstrcmp(XmlGetName(optionNode), _T("option"))) { + if (!mir_tstrcmp(XmlGetName(optionNode), L"option")) { if ((n = XmlGetChild(optionNode, "value")) != NULL && XmlGetText(n)) { if (!mir_tstrcmp(XmlGetText(n), JABBER_FEAT_IBB)) { ftType = FT_IBB; @@ -388,10 +388,10 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) } else { // Unknown stream mechanism - XmlNodeIq iq(_T("error"), szId, from); - HXML e = iq << XCHILD(_T("error")) << XATTRI(_T("code"), 400) << XATTR(_T("type"), _T("cancel")); - e << XCHILDNS(_T("bad-request"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")); - e << XCHILDNS(_T("no-valid-streams"), JABBER_FEAT_SI); + XmlNodeIq iq(L"error", szId, from); + HXML e = iq << XCHILD(L"error") << XATTRI(L"code", 400) << XATTR(L"type", L"cancel"); + e << XCHILDNS(L"bad-request", L"urn:ietf:params:xml:ns:xmpp-stanzas"); + e << XCHILDNS(L"no-valid-streams", JABBER_FEAT_SI); m_ThreadInfo->send(iq); return; } @@ -399,10 +399,10 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) } // Bad stream initiation, reply with bad-profile - XmlNodeIq iq(_T("error"), szId, from); - HXML e = iq << XCHILD(_T("error")) << XATTRI(_T("code"), 400) << XATTR(_T("type"), _T("cancel")); - e << XCHILDNS(_T("bad-request"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")); - e << XCHILDNS(_T("bad-profile"), JABBER_FEAT_SI); + XmlNodeIq iq(L"error", szId, from); + HXML e = iq << XCHILD(L"error") << XATTRI(L"code", 400) << XATTR(L"type", L"cancel"); + e << XCHILDNS(L"bad-request", L"urn:ietf:params:xml:ns:xmpp-stanzas"); + e << XCHILDNS(L"bad-profile", JABBER_FEAT_SI); m_ThreadInfo->send(iq); } @@ -415,12 +415,12 @@ void CJabberProto::FtAcceptSiRequest(filetransfer *ft) item->ft = ft; m_ThreadInfo->send( - XmlNodeIq(_T("result"), ft->szId, ft->jid) - << XCHILDNS(_T("si"), JABBER_FEAT_SI) - << XCHILDNS(_T("feature"), JABBER_FEAT_FEATURE_NEG) - << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("submit")) - << XCHILD(_T("field")) << XATTR(_T("var"), _T("stream-method")) - << XCHILD(_T("value"), JABBER_FEAT_BYTESTREAMS)); + XmlNodeIq(L"result", ft->szId, ft->jid) + << XCHILDNS(L"si", JABBER_FEAT_SI) + << XCHILDNS(L"feature", JABBER_FEAT_FEATURE_NEG) + << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"submit") + << XCHILD(L"field") << XATTR(L"var", L"stream-method") + << XCHILD(L"value", JABBER_FEAT_BYTESTREAMS)); } } @@ -433,12 +433,12 @@ void CJabberProto::FtAcceptIbbRequest(filetransfer *ft) item->ft = ft; m_ThreadInfo->send( - XmlNodeIq(_T("result"), ft->szId, ft->jid) - << XCHILDNS(_T("si"), JABBER_FEAT_SI) - << XCHILDNS(_T("feature"), JABBER_FEAT_FEATURE_NEG) - << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("submit")) - << XCHILD(_T("field")) << XATTR(_T("var"), _T("stream-method")) - << XCHILD(_T("value"), JABBER_FEAT_IBB)); + XmlNodeIq(L"result", ft->szId, ft->jid) + << XCHILDNS(L"si", JABBER_FEAT_SI) + << XCHILDNS(L"feature", JABBER_FEAT_FEATURE_NEG) + << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"submit") + << XCHILD(L"field") << XATTR(L"var", L"stream-method") + << XCHILD(L"value", JABBER_FEAT_IBB)); } } @@ -449,7 +449,7 @@ BOOL CJabberProto::FtHandleBytestreamRequest(HXML iqNode, CJabberIqInfo *pInfo) const TCHAR *sid; JABBER_LIST_ITEM *item; - if ((sid = XmlGetAttrValue(queryNode, _T("sid"))) != NULL && (item = ListGetItemPtr(LIST_FTRECV, sid)) != NULL) { + if ((sid = XmlGetAttrValue(queryNode, L"sid")) != NULL && (item = ListGetItemPtr(LIST_FTRECV, sid)) != NULL) { // Start Bytestream session JABBER_BYTE_TRANSFER *jbt = new JABBER_BYTE_TRANSFER; memset(jbt, 0, sizeof(JABBER_BYTE_TRANSFER)); @@ -471,24 +471,24 @@ BOOL CJabberProto::FtHandleIbbRequest(HXML iqNode, BOOL bOpen) { if (iqNode == NULL) return FALSE; - const TCHAR *id = XmlGetAttrValue(iqNode, _T("id")); - const TCHAR *from = XmlGetAttrValue(iqNode, _T("from")); - const TCHAR *to = XmlGetAttrValue(iqNode, _T("to")); + const TCHAR *id = XmlGetAttrValue(iqNode, L"id"); + const TCHAR *from = XmlGetAttrValue(iqNode, L"from"); + const TCHAR *to = XmlGetAttrValue(iqNode, L"to"); if (!id || !from || !to) return FALSE; HXML ibbNode = XmlGetChildByTag(iqNode, bOpen ? "open" : "close", "xmlns", JABBER_FEAT_IBB); if (!ibbNode) return FALSE; - const TCHAR *sid = XmlGetAttrValue(ibbNode, _T("sid")); + const TCHAR *sid = XmlGetAttrValue(ibbNode, L"sid"); if (!sid) return FALSE; // already closed? JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_FTRECV, sid); if (item == NULL) { m_ThreadInfo->send( - XmlNodeIq(_T("error"), id, from) - << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel")) - << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"))); + XmlNodeIq(L"error", id, from) + << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel") + << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas")); return FALSE; } @@ -507,14 +507,14 @@ BOOL CJabberProto::FtHandleIbbRequest(HXML iqNode, BOOL bOpen) item->jibb = jibb; ForkThread((MyThreadFunc)&CJabberProto::IbbReceiveThread, jibb); - m_ThreadInfo->send(XmlNodeIq(_T("result"), id, from)); + m_ThreadInfo->send(XmlNodeIq(L"result", id, from)); return TRUE; } // stream already open m_ThreadInfo->send( - XmlNodeIq(_T("error"), id, from) - << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel")) - << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"))); + XmlNodeIq(L"error", id, from) + << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel") + << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas")); return FALSE; } @@ -523,7 +523,7 @@ BOOL CJabberProto::FtHandleIbbRequest(HXML iqNode, BOOL bOpen) item->jibb->bStreamClosed = TRUE; SetEvent(item->jibb->hEvent); - m_ThreadInfo->send(XmlNodeIq(_T("result"), id, from)); + m_ThreadInfo->send(XmlNodeIq(L"result", id, from)); return TRUE; } diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index e4f81a4d68..6394f8a022 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -84,10 +84,10 @@ struct JabberGcRecentInfo void fillForm(HWND hwndDlg) { - SetDlgItemText(hwndDlg, IDC_SERVER, m_server ? m_server : _T("")); - SetDlgItemText(hwndDlg, IDC_ROOM, m_room ? m_room : _T("")); - SetDlgItemText(hwndDlg, IDC_NICK, m_nick ? m_nick : _T("")); - SetDlgItemText(hwndDlg, IDC_PASSWORD, m_password ? m_password : _T("")); + SetDlgItemText(hwndDlg, IDC_SERVER, m_server ? m_server : L""); + SetDlgItemText(hwndDlg, IDC_ROOM, m_room ? m_room : L""); + SetDlgItemText(hwndDlg, IDC_NICK, m_nick ? m_nick : L""); + SetDlgItemText(hwndDlg, IDC_PASSWORD, m_password ? m_password : L""); } void fillData(const TCHAR *room, const TCHAR *server, const TCHAR *nick = NULL, const TCHAR *password = NULL) @@ -246,7 +246,7 @@ void CJabberProto::GroupchatJoinRoom(const TCHAR *server, const TCHAR *room, con } TCHAR text[JABBER_MAX_JID_LEN + 1]; - mir_sntprintf(text, _T("%s@%s/%s"), room, server, nick); + mir_sntprintf(text, L"%s@%s/%s", room, server, nick); JABBER_LIST_ITEM *item = ListAdd(LIST_CHATROOM, text); item->bAutoJoin = autojoin; @@ -254,9 +254,9 @@ void CJabberProto::GroupchatJoinRoom(const TCHAR *server, const TCHAR *room, con replaceStrT(item->password, info.m_password); int status = (m_iStatus == ID_STATUS_INVISIBLE) ? ID_STATUS_ONLINE : m_iStatus; - XmlNode x(_T("x")); x << XATTR(_T("xmlns"), JABBER_FEAT_MUC); + XmlNode x(L"x"); x << XATTR(L"xmlns", JABBER_FEAT_MUC); if (info.m_password && info.m_password[0]) - x << XCHILD(_T("password"), info.m_password); + x << XCHILD(L"password", info.m_password); SendPresenceTo(status, text, x); } @@ -301,23 +301,23 @@ void CJabberProto::OnIqResultDiscovery(HXML iqNode, CJabberIqInfo *pInfo) sttRoomListAppend(hwndList, RoomInfo::ROOM_FAIL, TranslateT("Jabber Error"), TranslateT("Failed to retrieve room list from server."), - _T("")); + L""); } else { bool found = false; HXML item; - for (int i = 1; item = XmlGetNthChild(query, _T("item"), i); i++) { - const TCHAR *jid = XmlGetAttrValue(item, _T("jid")); + for (int i = 1; item = XmlGetNthChild(query, L"item", i); i++) { + const TCHAR *jid = XmlGetAttrValue(item, L"jid"); TCHAR *name = NEWTSTR_ALLOCA(jid); if (name) { if (TCHAR *p = _tcschr(name, _T('@'))) *p = 0; } - else name = _T(""); + else name = L""; sttRoomListAppend(hwndList, ListGetItemPtr(LIST_BOOKMARK, jid) ? RoomInfo::ROOM_BOOKMARK : RoomInfo::ROOM_DEFAULT, - XmlGetAttrValue(item, _T("name")), + XmlGetAttrValue(item, L"name"), jid, name); found = true; @@ -327,7 +327,7 @@ void CJabberProto::OnIqResultDiscovery(HXML iqNode, CJabberIqInfo *pInfo) sttRoomListAppend(hwndList, RoomInfo::ROOM_FAIL, TranslateT("Jabber Error"), TranslateT("No rooms available on server."), - _T("")); + L""); } } } @@ -337,14 +337,14 @@ void CJabberProto::OnIqResultDiscovery(HXML iqNode, CJabberIqInfo *pInfo) sttRoomListAppend(hwndList, RoomInfo::ROOM_FAIL, TranslateT("Jabber Error"), str, - _T("")); + L""); mir_free(str); } else sttRoomListAppend(hwndList, RoomInfo::ROOM_FAIL, TranslateT("Jabber Error"), TranslateT("Room list request timed out."), - _T("")); + L""); SendMessage(hwndList, CB_SHOWDROPDOWN, TRUE, 0); } @@ -471,7 +471,7 @@ void CJabberDlgGcJoin::OnInitDialog() if (!info.loadRecent(i)) break; - mir_sntprintf(jid, _T("%s@%s (%s)"), info.m_room, info.m_server, info.m_nick ? info.m_nick : TranslateT("<no nick>")); + mir_sntprintf(jid, L"%s@%s (%s)", info.m_room, info.m_server, info.m_nick ? info.m_nick : TranslateT("<no nick>")); SetDlgItemText(m_hwnd, IDC_RECENT1 + i, jid); } sttJoinDlgShowRecentItems(m_hwnd, i); @@ -624,7 +624,7 @@ INT_PTR CJabberDlgGcJoin::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) GetDlgItemText(m_hwnd, IDC_SERVER, server, len); if (*server) { - sttRoomListAppend(GetDlgItem(m_hwnd, IDC_ROOM), RoomInfo::ROOM_WAIT, TranslateT("Loading..."), TranslateT("Please wait for room list to download."), _T("")); + sttRoomListAppend(GetDlgItem(m_hwnd, IDC_ROOM), RoomInfo::ROOM_WAIT, TranslateT("Loading..."), TranslateT("Please wait for room list to download."), L""); CJabberIqInfo *pInfo = m_proto->AddIQ(&CJabberProto::OnIqResultDiscovery, JABBER_IQ_TYPE_GET, server, 0, -1, (void*)GetDlgItem(m_hwnd, IDC_ROOM)); pInfo->SetTimeout(30000); @@ -638,7 +638,7 @@ INT_PTR CJabberDlgGcJoin::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) sttRoomListAppend(GetDlgItem(m_hwnd, IDC_ROOM), RoomInfo::ROOM_FAIL, TranslateT("Jabber Error"), TranslateT("Please specify group chat directory first."), - _T("")); + L""); } break; } @@ -652,7 +652,7 @@ INT_PTR CJabberDlgGcJoin::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) { JABBER_LIST_ITEM *item = 0; if (item = m_proto->ListGetItemPtrFromIndex(i)) - if (!mir_tstrcmp(item->type, _T("conference"))) + if (!mir_tstrcmp(item->type, L"conference")) AppendMenu(hMenu, MF_STRING, (UINT_PTR)item, item->name); } AppendMenu(hMenu, MF_SEPARATOR, 0, NULL); @@ -754,7 +754,7 @@ static VOID CALLBACK JabberGroupchatChangeNickname(void* arg) if (param->ppro->EnterString(szBuffer, szTitle, ESF_COMBO, "gcNick_")) { replaceStrT(item->nick, szBuffer); - param->ppro->SendPresenceTo(param->ppro->m_iStatus, CMString(FORMAT, _T("%s/%s"), item->jid, szBuffer), NULL); + param->ppro->SendPresenceTo(param->ppro->m_iStatus, CMString(FORMAT, L"%s/%s", item->jid, szBuffer), NULL); } } @@ -767,7 +767,7 @@ static int sttGetStatusCode(HXML node) if (statusNode == NULL) return -1; - const TCHAR *statusCode = XmlGetAttrValue(statusNode, _T("code")); + const TCHAR *statusCode = XmlGetAttrValue(statusNode, L"code"); if (statusCode == NULL) return -1; @@ -776,8 +776,8 @@ static int sttGetStatusCode(HXML node) void CJabberProto::RenameParticipantNick(JABBER_LIST_ITEM *item, const TCHAR *oldNick, HXML itemNode) { - const TCHAR *jid = XmlGetAttrValue(itemNode, _T("jid")); - const TCHAR *newNick = XmlGetAttrValue(itemNode, _T("nick")); + const TCHAR *jid = XmlGetAttrValue(itemNode, L"jid"); + const TCHAR *newNick = XmlGetAttrValue(itemNode, L"nick"); if (newNick == NULL) return; @@ -815,8 +815,8 @@ void CJabberProto::GroupchatProcessPresence(HXML node) { const TCHAR *from; - if (!node || !XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("presence"))) return; - if ((from = XmlGetAttrValue(node, _T("from"))) == NULL) return; + if (!node || !XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"presence")) return; + if ((from = XmlGetAttrValue(node, L"from")) == NULL) return; const TCHAR *resource = _tcschr(from, '/'); if (resource == NULL || *++resource == '\0') @@ -839,10 +839,10 @@ void CJabberProto::GroupchatProcessPresence(HXML node) HXML xNode = XmlGetChildByTag(node, "x", "xmlns", JABBER_FEAT_MUC_USER); HXML itemNode = XmlGetChild(xNode, "item"); - const TCHAR *type = XmlGetAttrValue(node, _T("type")); + const TCHAR *type = XmlGetAttrValue(node, L"type"); // entering room or a usual room presence - if (type == NULL || !mir_tstrcmp(type, _T("available"))) { + if (type == NULL || !mir_tstrcmp(type, L"available")) { if (ptrT(JabberNickFromJID(from)) == NULL) return; @@ -853,10 +853,10 @@ void CJabberProto::GroupchatProcessPresence(HXML node) int status = ID_STATUS_ONLINE; LPCTSTR ptszShow = XmlGetText(XmlGetChild(node, "show")); if (ptszShow) { - if (!mir_tstrcmp(ptszShow, _T("away"))) status = ID_STATUS_AWAY; - else if (!mir_tstrcmp(ptszShow, _T("xa"))) status = ID_STATUS_NA; - else if (!mir_tstrcmp(ptszShow, _T("dnd"))) status = ID_STATUS_DND; - else if (!mir_tstrcmp(ptszShow, _T("chat"))) status = ID_STATUS_FREECHAT; + if (!mir_tstrcmp(ptszShow, L"away")) status = ID_STATUS_AWAY; + else if (!mir_tstrcmp(ptszShow, L"xa")) status = ID_STATUS_NA; + else if (!mir_tstrcmp(ptszShow, L"dnd")) status = ID_STATUS_DND; + else if (!mir_tstrcmp(ptszShow, L"chat")) status = ID_STATUS_FREECHAT; } LPCTSTR str = XmlGetText(XmlGetChild(node, "status")); @@ -880,17 +880,17 @@ void CJabberProto::GroupchatProcessPresence(HXML node) JABBER_GC_AFFILIATION affiliation = r->m_affiliation; JABBER_GC_ROLE role = r->m_role; - if ((str = XmlGetAttrValue(itemNode, _T("affiliation"))) != NULL) { - if (!mir_tstrcmp(str, _T("owner"))) affiliation = AFFILIATION_OWNER; - else if (!mir_tstrcmp(str, _T("admin"))) affiliation = AFFILIATION_ADMIN; - else if (!mir_tstrcmp(str, _T("member"))) affiliation = AFFILIATION_MEMBER; - else if (!mir_tstrcmp(str, _T("none"))) affiliation = AFFILIATION_NONE; - else if (!mir_tstrcmp(str, _T("outcast"))) affiliation = AFFILIATION_OUTCAST; + if ((str = XmlGetAttrValue(itemNode, L"affiliation")) != NULL) { + if (!mir_tstrcmp(str, L"owner")) affiliation = AFFILIATION_OWNER; + else if (!mir_tstrcmp(str, L"admin")) affiliation = AFFILIATION_ADMIN; + else if (!mir_tstrcmp(str, L"member")) affiliation = AFFILIATION_MEMBER; + else if (!mir_tstrcmp(str, L"none")) affiliation = AFFILIATION_NONE; + else if (!mir_tstrcmp(str, L"outcast")) affiliation = AFFILIATION_OUTCAST; } - if ((str = XmlGetAttrValue(itemNode, _T("role"))) != NULL) { - if (!mir_tstrcmp(str, _T("moderator"))) role = ROLE_MODERATOR; - else if (!mir_tstrcmp(str, _T("participant"))) role = ROLE_PARTICIPANT; - else if (!mir_tstrcmp(str, _T("visitor"))) role = ROLE_VISITOR; + if ((str = XmlGetAttrValue(itemNode, L"role")) != NULL) { + if (!mir_tstrcmp(str, L"moderator")) role = ROLE_MODERATOR; + else if (!mir_tstrcmp(str, L"participant")) role = ROLE_PARTICIPANT; + else if (!mir_tstrcmp(str, L"visitor")) role = ROLE_VISITOR; else role = ROLE_NONE; } @@ -910,7 +910,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) bRoleChanged = true; } - if (str = XmlGetAttrValue(itemNode, _T("jid"))) + if (str = XmlGetAttrValue(itemNode, L"jid")) r->m_tszRealJid = mir_tstrdup(str); } } @@ -936,7 +936,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) // Check <created/> if (bRoomCreated) { HXML n = XmlGetChild(node, "created"); - if (n != NULL && (str = XmlGetAttrValue(n, _T("xmlns"))) != NULL && !mir_tstrcmp(str, JABBER_FEAT_MUC_OWNER)) + if (n != NULL && (str = XmlGetAttrValue(n, L"xmlns")) != NULL && !mir_tstrcmp(str, JABBER_FEAT_MUC_OWNER)) // A new room just created by me // Request room config m_ThreadInfo->send( @@ -946,11 +946,11 @@ void CJabberProto::GroupchatProcessPresence(HXML node) } // leaving room - else if (!mir_tstrcmp(type, _T("unavailable"))) { + else if (!mir_tstrcmp(type, L"unavailable")) { const TCHAR *str = 0; if (xNode != NULL && item->nick != NULL) { HXML reasonNode = XmlGetChild(itemNode, "reason"); - str = XmlGetAttrValue(itemNode, _T("jid")); + str = XmlGetAttrValue(itemNode, L"jid"); int iStatus = sttGetStatusCode(xNode); if (iStatus == 301 && r != NULL) @@ -994,7 +994,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) } // processing room errors - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { int errorCode = 0; HXML errorNode = XmlGetChild(node, "error"); ptrT str(JabberErrorMsg(errorNode, &errorCode)); @@ -1004,7 +1004,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) if (++item->iChatState == 1 && newNick != NULL && newNick[0] != 0) { replaceStrT(item->nick, newNick); TCHAR text[1024] = { 0 }; - mir_sntprintf(text, _T("%s/%s"), item->jid, newNick); + mir_sntprintf(text, L"%s/%s", item->jid, newNick); SendPresenceTo(m_iStatus, text, NULL); } else { @@ -1028,12 +1028,12 @@ void CJabberProto::GroupchatProcessMessage(HXML node) JABBER_LIST_ITEM *item; CMString imgLink; - if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("message"))) return; - if ((from = XmlGetAttrValue(node, _T("from"))) == NULL) return; + if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"message")) return; + if ((from = XmlGetAttrValue(node, L"from")) == NULL) return; if ((item = ListGetItemPtr(LIST_CHATROOM, from)) == NULL) return; - if ((type = XmlGetAttrValue(node, _T("type"))) == NULL) return; - if (!mir_tstrcmp(type, _T("error"))) + if ((type = XmlGetAttrValue(node, L"type")) == NULL) return; + if (!mir_tstrcmp(type, L"error")) return; GCDEST gcd = { m_szModuleName, item->jid, 0 }; @@ -1056,7 +1056,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) if (tmpnick == NULL || *tmpnick == 0) return; - const TCHAR *tmptr = _tcsstr(tmpnick, _T("has set the subject to:")); //ejabberd + const TCHAR *tmptr = _tcsstr(tmpnick, L"has set the subject to:"); //ejabberd if (tmptr == NULL) tmptr = _tcsstr(tmpnick, TranslateT("has set the subject to:")); //ejabberd if (tmptr != NULL && *tmptr != 0) { @@ -1079,7 +1079,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) if (resource == NULL) gcd.iType = GC_EVENT_INFORMATION; - else if (_tcsncmp(msgText, _T("/me "), 4) == 0 && mir_tstrlen(msgText) > 4) { + else if (_tcsncmp(msgText, L"/me ", 4) == 0 && mir_tstrlen(msgText) > 4) { msgText += 4; gcd.iType = GC_EVENT_ACTION; } @@ -1090,8 +1090,8 @@ void CJabberProto::GroupchatProcessMessage(HXML node) time_t msgTime = 0; if (!JabberReadXep203delay(node, msgTime)) { - HXML xDelay = XmlGetChildByTag(node, "x", "xmlns", _T("jabber:x:delay")); - if (xDelay && (p = XmlGetAttrValue(xDelay, _T("stamp"))) != NULL) + HXML xDelay = XmlGetChildByTag(node, "x", "xmlns", L"jabber:x:delay"); + if (xDelay && (p = XmlGetAttrValue(xDelay, L"stamp")) != NULL) msgTime = JabberIsoToUnixTime(p); } @@ -1107,7 +1107,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) else nick = NULL; CMString tszText(msgText); - tszText.Replace(_T("%"), _T("%%")); + tszText.Replace(L"%", L"%%"); tszText += imgLink; GCEVENT gce = { sizeof(gce), &gcd }; @@ -1207,7 +1207,7 @@ void CJabberProto::AcceptGroupchatInvite(const TCHAR *roomJid, const TCHAR *reas { TCHAR room[256], *server, *p; _tcsncpy_s(room, roomJid, _TRUNCATE); - p = _tcstok(room, _T("@")); - server = _tcstok(NULL, _T("@")); + p = _tcstok(room, L"@"); + server = _tcstok(NULL, L"@"); GroupchatJoinRoom(server, p, reason, password); } diff --git a/protocols/JabberG/src/jabber_ibb.cpp b/protocols/JabberG/src/jabber_ibb.cpp index 0ac2a73150..bec32266dd 100644 --- a/protocols/JabberG/src/jabber_ibb.cpp +++ b/protocols/JabberG/src/jabber_ibb.cpp @@ -46,24 +46,24 @@ void JabberIbbFreeJibb(JABBER_IBB_TRANSFER *jibb) BOOL CJabberProto::OnFtHandleIbbIq(HXML iqNode, CJabberIqInfo *pInfo) { - if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("open"))) + if (!mir_tstrcmp(pInfo->GetChildNodeName(), L"open")) FtHandleIbbRequest(iqNode, TRUE); - else if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("close"))) + else if (!mir_tstrcmp(pInfo->GetChildNodeName(), L"close")) FtHandleIbbRequest(iqNode, FALSE); - else if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("data"))) { + else if (!mir_tstrcmp(pInfo->GetChildNodeName(), L"data")) { BOOL bOk = FALSE; - const TCHAR *sid = XmlGetAttrValue(pInfo->GetChildNode(), _T("sid")); - const TCHAR *seq = XmlGetAttrValue(pInfo->GetChildNode(), _T("seq")); + const TCHAR *sid = XmlGetAttrValue(pInfo->GetChildNode(), L"sid"); + const TCHAR *seq = XmlGetAttrValue(pInfo->GetChildNode(), L"seq"); if (sid && seq && XmlGetText(pInfo->GetChildNode())) bOk = OnIbbRecvdData(XmlGetText(pInfo->GetChildNode()), sid, seq); if (bOk) - m_ThreadInfo->send( XmlNodeIq(_T("result"), pInfo)); + m_ThreadInfo->send( XmlNodeIq(L"result", pInfo)); else m_ThreadInfo->send( - XmlNodeIq(_T("error"), pInfo) - << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel")) - << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"))); + XmlNodeIq(L"error", pInfo) + << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel") + << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas")); } return TRUE; } @@ -98,8 +98,8 @@ void CJabberProto::IbbSendThread(JABBER_IBB_TRANSFER *jibb) m_ThreadInfo->send( XmlNodeIq( AddIQ(&CJabberProto::OnIbbInitiateResult, JABBER_IQ_TYPE_SET, jibb->dstJID, 0, -1, jibb)) - << XCHILDNS(_T("open"), JABBER_FEAT_IBB) << XATTR(_T("sid"), jibb->sid) << XATTRI(_T("block-size"), JABBER_IBB_BLOCK_SIZE) - << XATTR(_T("stanza"), _T("message"))); + << XCHILDNS(L"open", JABBER_FEAT_IBB) << XATTR(L"sid", jibb->sid) << XATTRI(L"block-size", JABBER_IBB_BLOCK_SIZE) + << XATTR(L"stanza", L"message")); WaitForSingleObject(jibb->hEvent, INFINITE); CloseHandle(jibb->hEvent); @@ -115,7 +115,7 @@ void CJabberProto::IbbSendThread(JABBER_IBB_TRANSFER *jibb) m_ThreadInfo->send( XmlNodeIq( AddIQ(&CJabberProto::OnIbbCloseResult, JABBER_IQ_TYPE_SET, jibb->dstJID, 0, -1, jibb)) - << XCHILDNS(_T("close"), JABBER_FEAT_IBB) << XATTR(_T("sid"), jibb->sid)); + << XCHILDNS(L"close", JABBER_FEAT_IBB) << XATTR(L"sid", jibb->sid)); WaitForSingleObject(jibb->hEvent, INFINITE); CloseHandle(jibb->hEvent); @@ -151,7 +151,7 @@ void __cdecl CJabberProto::IbbReceiveThread(JABBER_IBB_TRANSFER *jibb) jibb->hEvent = NULL; if (jibb->state == JIBB_ERROR) - m_ThreadInfo->send( XmlNodeIq(_T("set"), SerialNext(), jibb->dstJID) << XCHILDNS(_T("close"), JABBER_FEAT_IBB) << XATTR(_T("sid"), jibb->sid)); + m_ThreadInfo->send( XmlNodeIq(L"set", SerialNext(), jibb->dstJID) << XCHILDNS(L"close", JABBER_FEAT_IBB) << XATTR(L"sid", jibb->sid)); if (jibb->bStreamClosed && jibb->dwTransferredSize == ft->dwExpectedRecvFileSize) jibb->state = JIBB_DONE; diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index 82c385c64b..f3739cdece 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -47,32 +47,32 @@ struct CTransportProtoTableItem static CTransportProtoTableItem TransportProtoTable[] = { - { _T("|*icq*|jit*"), "ICQ" }, - { _T("msn*"), "MSN" }, - { _T("yahoo*"), "YAHOO" }, - { _T("mrim*"), "MRA" }, - { _T("aim*"), "AIM" }, + { L"|*icq*|jit*", "ICQ" }, + { L"msn*", "MSN" }, + { L"yahoo*", "YAHOO" }, + { L"mrim*", "MRA" }, + { L"aim*", "AIM" }, //request #3094 - { _T("|gg*|gadu*"), "GaduGadu" }, - { _T("tv*"), "TV" }, - { _T("dict*"), "Dictionary" }, - { _T("weather*"), "Weather" }, - { _T("skype*"), "Skype" }, - { _T("sms*"), "SMS" }, - { _T("smtp*"), "SMTP" }, + { L"|gg*|gadu*", "GaduGadu" }, + { L"tv*", "TV" }, + { L"dict*", "Dictionary" }, + { L"weather*", "Weather" }, + { L"skype*", "Skype" }, + { L"sms*", "SMS" }, + { L"smtp*", "SMTP" }, //j2j - { _T("gtalk.*.*"), "GTalk" }, - { _T("|xmpp.*.*|j2j.*.*"),"Jabber2Jabber" }, + { L"gtalk.*.*", "GTalk" }, + { L"|xmpp.*.*|j2j.*.*","Jabber2Jabber" }, //jabbim.cz - services - { _T("disk*"), "Jabber Disk" }, - { _T("irc*"), "IRC" }, - { _T("rss*"), "RSS" }, - { _T("tlen*"), "Tlen" }, + { L"disk*", "Jabber Disk" }, + { L"irc*", "IRC" }, + { L"rss*", "RSS" }, + { L"tlen*", "Tlen" }, // German social networks - { _T("studivz*"), "StudiVZ" }, - { _T("schuelervz*"), "SchuelerVZ" }, - { _T("meinvz*"), "MeinVZ" }, + { L"studivz*", "StudiVZ" }, + { L"schuelervz*", "SchuelerVZ" }, + { L"meinvz*", "MeinVZ" }, }; static int skinIconStatusToResourceId[] = {IDI_OFFLINE,IDI_ONLINE,IDI_AWAY,IDI_DND,IDI_NA,IDI_NA,/*IDI_OCCUPIED,*/IDI_FREE4CHAT,IDI_INVISIBLE,IDI_ONTHEPHONE,IDI_OUTTOLUNCH}; @@ -307,7 +307,7 @@ int CJabberProto::LoadAdvancedIcons(int iID) int first = -1; HICON empty = Skin_LoadIcon(SKINICON_OTHER_MIRANDA); - mir_sntprintf(Group, LPGENT("Status icons")_T("/%s/%S %s"), m_tszUserName, proto, TranslateT("transport")); + mir_sntprintf(Group, LPGENT("Status icons")L"/%s/%S %s", m_tszUserName, proto, TranslateT("transport")); mir_snprintf(defFile, "proto_%s.dll", proto); if (!hAdvancedStatusIcon) hAdvancedStatusIcon = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0); diff --git a/protocols/JabberG/src/jabber_iq.cpp b/protocols/JabberG/src/jabber_iq.cpp index 49192e6613..ca7020a25e 100644 --- a/protocols/JabberG/src/jabber_iq.cpp +++ b/protocols/JabberG/src/jabber_iq.cpp @@ -83,52 +83,52 @@ void CJabberIqManager::Shutdown() void CJabberIqManager::FillPermanentHandlers() { // version requests (XEP-0092) - AddPermanentHandler(&CJabberProto::OnIqRequestVersion, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_VERSION, FALSE, _T("query")); + AddPermanentHandler(&CJabberProto::OnIqRequestVersion, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_VERSION, FALSE, L"query"); // last activity (XEP-0012) - AddPermanentHandler(&CJabberProto::OnIqRequestLastActivity, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_LAST_ACTIVITY, FALSE, _T("query")); + AddPermanentHandler(&CJabberProto::OnIqRequestLastActivity, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_LAST_ACTIVITY, FALSE, L"query"); // ping requests (XEP-0199) - AddPermanentHandler(&CJabberProto::OnIqRequestPing, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PING, FALSE, _T("ping")); + AddPermanentHandler(&CJabberProto::OnIqRequestPing, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PING, FALSE, L"ping"); // entity time (XEP-0202) - AddPermanentHandler(&CJabberProto::OnIqRequestTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME, FALSE, _T("time")); + AddPermanentHandler(&CJabberProto::OnIqRequestTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME, FALSE, L"time"); // entity time (XEP-0090) - AddPermanentHandler(&CJabberProto::OnIqProcessIqOldTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME_OLD, FALSE, _T("query")); + AddPermanentHandler(&CJabberProto::OnIqProcessIqOldTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME_OLD, FALSE, L"query"); // old avatars support (deprecated XEP-0008) - AddPermanentHandler(&CJabberProto::OnIqRequestAvatar, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_AVATAR, FALSE, _T("query")); + AddPermanentHandler(&CJabberProto::OnIqRequestAvatar, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_AVATAR, FALSE, L"query"); // privacy lists (XEP-0016) - AddPermanentHandler(&CJabberProto::OnIqRequestPrivacyLists, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PRIVACY_LISTS, FALSE, _T("query")); + AddPermanentHandler(&CJabberProto::OnIqRequestPrivacyLists, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PRIVACY_LISTS, FALSE, L"query"); // in band bytestreams (XEP-0047) AddPermanentHandler(&CJabberProto::OnFtHandleIbbIq, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE | JABBER_IQ_PARSE_CHILD_TAG_NAME | JABBER_IQ_PARSE_CHILD_TAG_XMLNS, JABBER_FEAT_IBB, FALSE, NULL); // socks5-bytestreams (XEP-0065) - AddPermanentHandler(&CJabberProto::FtHandleBytestreamRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_BYTESTREAMS, FALSE, _T("query")); + AddPermanentHandler(&CJabberProto::FtHandleBytestreamRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_BYTESTREAMS, FALSE, L"query"); // session initiation (XEP-0095) - AddPermanentHandler(&CJabberProto::OnSiRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_SI, FALSE, _T("si")); + AddPermanentHandler(&CJabberProto::OnSiRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_SI, FALSE, L"si"); // roster push requests - AddPermanentHandler(&CJabberProto::OnRosterPushRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_IQ_ROSTER, FALSE, _T("query")); + AddPermanentHandler(&CJabberProto::OnRosterPushRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_IQ_ROSTER, FALSE, L"query"); // OOB file transfers - AddPermanentHandler(&CJabberProto::OnIqRequestOOB, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_HCONTACT | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_OOB, FALSE, _T("query")); + AddPermanentHandler(&CJabberProto::OnIqRequestOOB, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_HCONTACT | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_OOB, FALSE, L"query"); // disco#items requests (XEP-0030, XEP-0050) - AddPermanentHandler(&CJabberProto::OnHandleDiscoItemsRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_ITEMS, FALSE, _T("query")); + AddPermanentHandler(&CJabberProto::OnHandleDiscoItemsRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_ITEMS, FALSE, L"query"); // disco#info requests (XEP-0030, XEP-0050, XEP-0115) - AddPermanentHandler(&CJabberProto::OnHandleDiscoInfoRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_INFO, FALSE, _T("query")); + AddPermanentHandler(&CJabberProto::OnHandleDiscoInfoRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_INFO, FALSE, L"query"); // ad-hoc commands (XEP-0050) for remote controlling (XEP-0146) - AddPermanentHandler(&CJabberProto::HandleAdhocCommandRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_COMMANDS, FALSE, _T("command")); + AddPermanentHandler(&CJabberProto::HandleAdhocCommandRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_COMMANDS, FALSE, L"command"); // http auth (XEP-0070) - AddPermanentHandler(&CJabberProto::OnIqHttpAuth, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_HTTP_AUTH, FALSE, _T("confirm")); + AddPermanentHandler(&CJabberProto::OnIqHttpAuth, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_HTTP_AUTH, FALSE, L"confirm"); } void __cdecl CJabberProto::ExpirerThread(void* pParam) @@ -171,7 +171,7 @@ void CJabberIqManager::ExpireInfo(CJabberIqInfo *pInfo) if ((pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT) && (pInfo->m_szFrom)) pInfo->m_hContact = ppro->HContactFromJID(pInfo->m_szFrom); - ppro->debugLog(_T("Expiring iq id %d, sent to %s"), pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : _T("server")); + ppro->debugLog(L"Expiring iq id %d, sent to %s", pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : L"server"); pInfo->m_nIqType = JABBER_IQ_TYPE_FAIL; (ppro->*(pInfo->m_pHandler))(NULL, pInfo); @@ -243,14 +243,14 @@ bool CJabberIqManager::HandleIq(int nIqId, HXML pNode) if (nIqId == -1 || pNode == NULL) return false; - const TCHAR *szType = XmlGetAttrValue(pNode, _T("type")); + const TCHAR *szType = XmlGetAttrValue(pNode, L"type"); if (!szType) return false; int nIqType = JABBER_IQ_TYPE_FAIL; - if (!mir_tstrcmpi(szType, _T("result"))) + if (!mir_tstrcmpi(szType, L"result")) nIqType = JABBER_IQ_TYPE_RESULT; - else if (!mir_tstrcmpi(szType, _T("error"))) + else if (!mir_tstrcmpi(szType, L"error")) nIqType = JABBER_IQ_TYPE_ERROR; else return false; @@ -268,19 +268,19 @@ bool CJabberIqManager::HandleIq(int nIqId, HXML pNode) if (pInfo->m_pChildNode && (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_CHILD_TAG_NAME)) pInfo->m_szChildTagName = (TCHAR*)XmlGetName(pInfo->m_pChildNode); if (pInfo->m_pChildNode && (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_CHILD_TAG_XMLNS)) - pInfo->m_szChildTagXmlns = (TCHAR*)XmlGetAttrValue(pNode, _T("xmlns")); + pInfo->m_szChildTagXmlns = (TCHAR*)XmlGetAttrValue(pNode, L"xmlns"); } if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_TO) - pInfo->m_szTo = (TCHAR*)XmlGetAttrValue(pNode, _T("to")); + pInfo->m_szTo = (TCHAR*)XmlGetAttrValue(pNode, L"to"); if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_FROM) - pInfo->m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, _T("from")); + pInfo->m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, L"from"); if (pInfo->m_szFrom && (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT)) pInfo->m_hContact = ppro->HContactFromJID(pInfo->m_szFrom); if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_ID_STR) - pInfo->m_szId = (TCHAR*)XmlGetAttrValue(pNode, _T("id")); + pInfo->m_szId = (TCHAR*)XmlGetAttrValue(pNode, L"id"); (ppro->*(pInfo->m_pHandler))(pNode, pInfo); delete pInfo; @@ -294,15 +294,15 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode) for (int i = 0; i < m_arHandlers.getCount(); i++) { CJabberIqPermanentInfo &pInfo = m_arHandlers[i]; // have to get all data here, in the loop, because there's always possibility that previous handler modified it - const TCHAR *szType = XmlGetAttrValue(pNode, _T("type")); + const TCHAR *szType = XmlGetAttrValue(pNode, L"type"); if (!szType) return FALSE; CJabberIqInfo iqInfo; iqInfo.m_nIqType = JABBER_IQ_TYPE_FAIL; - if (!mir_tstrcmpi(szType, _T("get"))) + if (!mir_tstrcmpi(szType, L"get")) iqInfo.m_nIqType = JABBER_IQ_TYPE_GET; - else if (!mir_tstrcmpi(szType, _T("set"))) + else if (!mir_tstrcmpi(szType, L"set")) iqInfo.m_nIqType = JABBER_IQ_TYPE_SET; else return FALSE; @@ -315,7 +315,7 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode) return FALSE; const TCHAR *szTagName = XmlGetName(pFirstChild); - const TCHAR *szXmlns = XmlGetAttrValue(pFirstChild, _T("xmlns")); + const TCHAR *szXmlns = XmlGetAttrValue(pFirstChild, L"xmlns"); if ((!pInfo.m_szXmlns || (szXmlns && !mir_tstrcmp(pInfo.m_szXmlns, szXmlns))) && (!pInfo.m_szTag || !mir_tstrcmp(pInfo.m_szTag, szTagName))) @@ -324,19 +324,19 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode) iqInfo.m_pChildNode = pFirstChild; iqInfo.m_szChildTagName = (TCHAR*)szTagName; iqInfo.m_szChildTagXmlns = (TCHAR*)szXmlns; - iqInfo.m_szId = (TCHAR*)XmlGetAttrValue(pNode, _T("id")); + iqInfo.m_szId = (TCHAR*)XmlGetAttrValue(pNode, L"id"); iqInfo.m_pUserData = pInfo.m_pUserData; if (pInfo.m_dwParamsToParse & JABBER_IQ_PARSE_TO) - iqInfo.m_szTo = (TCHAR*)XmlGetAttrValue(pNode, _T("to")); + iqInfo.m_szTo = (TCHAR*)XmlGetAttrValue(pNode, L"to"); if (pInfo.m_dwParamsToParse & JABBER_IQ_PARSE_FROM) - iqInfo.m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, _T("from")); + iqInfo.m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, L"from"); if ((pInfo.m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT) && (iqInfo.m_szFrom)) iqInfo.m_hContact = ppro->HContactFromJID(iqInfo.m_szFrom); - ppro->debugLog(_T("Handling iq id %s, type %s, from %s"), iqInfo.m_szId, szType, iqInfo.m_szFrom); + ppro->debugLog(L"Handling iq id %s, type %s, from %s", iqInfo.m_szId, szType, iqInfo.m_szFrom); if ((ppro->*(pInfo.m_pHandler))(pNode, &iqInfo)) return true; } diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index 13e3cc5cca..a8f4f31e8f 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -36,16 +36,16 @@ BOOL CJabberProto::OnIqRequestVersion(HXML, CJabberIqInfo *pInfo) if (!m_options.AllowVersionRequests) return FALSE; - XmlNodeIq iq(_T("result"), pInfo); + XmlNodeIq iq(L"result", pInfo); HXML query = iq << XQUERY(JABBER_FEAT_VERSION); - query << XCHILD(_T("name"), _T("Miranda NG Jabber")); - query << XCHILD(_T("version"), szCoreVersion); + query << XCHILD(L"name", L"Miranda NG Jabber"); + query << XCHILD(L"version", szCoreVersion); if (m_options.ShowOSVersion) { TCHAR os[256] = { 0 }; if (!GetOSDisplayString(os, _countof(os))) - mir_tstrncpy(os, _T("Microsoft Windows"), _countof(os)); - query << XCHILD(_T("os"), os); + mir_tstrncpy(os, L"Microsoft Windows", _countof(os)); + query << XCHILD(L"os", os); } m_ThreadInfo->send(iq); @@ -56,15 +56,15 @@ BOOL CJabberProto::OnIqRequestVersion(HXML, CJabberIqInfo *pInfo) BOOL CJabberProto::OnIqRequestLastActivity(HXML, CJabberIqInfo *pInfo) { m_ThreadInfo->send( - XmlNodeIq(_T("result"), pInfo) << XQUERY(JABBER_FEAT_LAST_ACTIVITY) - << XATTRI(_T("seconds"), m_tmJabberIdleStartTime ? time(0) - m_tmJabberIdleStartTime : 0)); + XmlNodeIq(L"result", pInfo) << XQUERY(JABBER_FEAT_LAST_ACTIVITY) + << XATTRI(L"seconds", m_tmJabberIdleStartTime ? time(0) - m_tmJabberIdleStartTime : 0)); return TRUE; } // XEP-0199: XMPP Ping support BOOL CJabberProto::OnIqRequestPing(HXML, CJabberIqInfo *pInfo) { - m_ThreadInfo->send(XmlNodeIq(_T("result"), pInfo) << XATTR(_T("from"), m_ThreadInfo->fullJID)); + m_ThreadInfo->send(XmlNodeIq(L"result", pInfo) << XATTR(L"from", m_ThreadInfo->fullJID)); return TRUE; } @@ -101,17 +101,17 @@ BOOL CJabberProto::OnIqRequestTime(HXML, CJabberIqInfo *pInfo) TCHAR stime[100]; TCHAR szTZ[10]; - TimeZone_PrintDateTime(UTC_TIME_HANDLE, _T("I"), stime, _countof(stime), 0); + TimeZone_PrintDateTime(UTC_TIME_HANDLE, L"I", stime, _countof(stime), 0); int nGmtOffset = GetGMTOffset(); - mir_sntprintf(szTZ, _T("%+03d:%02d"), nGmtOffset / 60, nGmtOffset % 60); + mir_sntprintf(szTZ, L"%+03d:%02d", nGmtOffset / 60, nGmtOffset % 60); - XmlNodeIq iq(_T("result"), pInfo); - HXML timeNode = iq << XCHILDNS(_T("time"), JABBER_FEAT_ENTITY_TIME); - timeNode << XCHILD(_T("utc"), stime); timeNode << XCHILD(_T("tzo"), szTZ); + XmlNodeIq iq(L"result", pInfo); + HXML timeNode = iq << XCHILDNS(L"time", JABBER_FEAT_ENTITY_TIME); + timeNode << XCHILD(L"utc", stime); timeNode << XCHILD(L"tzo", szTZ); LPCTSTR szTZName = TimeZone_GetName(NULL); if (szTZName) - timeNode << XCHILD(_T("tz"), szTZName); + timeNode << XCHILD(L"tz", szTZName); m_ThreadInfo->send(iq); return TRUE; } @@ -125,19 +125,19 @@ BOOL CJabberProto::OnIqProcessIqOldTime(HXML, CJabberIqInfo *pInfo) _tzset(); time(<ime); gmt = gmtime(<ime); - mir_sntprintf(stime, _T("%.4i%.2i%.2iT%.2i:%.2i:%.2i"), + mir_sntprintf(stime, L"%.4i%.2i%.2iT%.2i:%.2i:%.2i", gmt->tm_year + 1900, gmt->tm_mon + 1, gmt->tm_mday, gmt->tm_hour, gmt->tm_min, gmt->tm_sec); dtime = _tctime(<ime); dtime[24] = 0; - XmlNodeIq iq(_T("result"), pInfo); + XmlNodeIq iq(L"result", pInfo); HXML queryNode = iq << XQUERY(JABBER_FEAT_ENTITY_TIME_OLD); - queryNode << XCHILD(_T("utc"), stime); + queryNode << XCHILD(L"utc", stime); LPCTSTR szTZName = TimeZone_GetName(NULL); if (szTZName) - queryNode << XCHILD(_T("tz"), szTZName); - queryNode << XCHILD(_T("display"), dtime); + queryNode << XCHILD(L"tz", szTZName); + queryNode << XCHILD(L"display", dtime); m_ThreadInfo->send(iq); return TRUE; } @@ -153,17 +153,17 @@ BOOL CJabberProto::OnIqRequestAvatar(HXML, CJabberIqInfo *pInfo) TCHAR *szMimeType; switch (pictureType) { - case PA_FORMAT_JPEG: szMimeType = _T("image/jpeg"); break; - case PA_FORMAT_GIF: szMimeType = _T("image/gif"); break; - case PA_FORMAT_PNG: szMimeType = _T("image/png"); break; - case PA_FORMAT_BMP: szMimeType = _T("image/bmp"); break; + case PA_FORMAT_JPEG: szMimeType = L"image/jpeg"; break; + case PA_FORMAT_GIF: szMimeType = L"image/gif"; break; + case PA_FORMAT_PNG: szMimeType = L"image/png"; break; + case PA_FORMAT_BMP: szMimeType = L"image/bmp"; break; default: return TRUE; } TCHAR szFileName[MAX_PATH]; GetAvatarFileName(NULL, szFileName, _countof(szFileName)); - FILE* in = _tfopen(szFileName, _T("rb")); + FILE* in = _tfopen(szFileName, L"rb"); if (in == NULL) return TRUE; @@ -178,21 +178,21 @@ BOOL CJabberProto::OnIqRequestAvatar(HXML, CJabberIqInfo *pInfo) fclose(in); ptrA str(mir_base64_encode((PBYTE)(char*)buffer, bytes)); - m_ThreadInfo->send(XmlNodeIq(_T("result"), pInfo) << XQUERY(JABBER_FEAT_AVATAR) << XCHILD(_T("query"), _A2T(str)) << XATTR(_T("mimetype"), szMimeType)); + m_ThreadInfo->send(XmlNodeIq(L"result", pInfo) << XQUERY(JABBER_FEAT_AVATAR) << XCHILD(L"query", _A2T(str)) << XATTR(L"mimetype", szMimeType)); return TRUE; } BOOL CJabberProto::OnSiRequest(HXML node, CJabberIqInfo *pInfo) { - const TCHAR *szProfile = XmlGetAttrValue(pInfo->GetChildNode(), _T("profile")); + const TCHAR *szProfile = XmlGetAttrValue(pInfo->GetChildNode(), L"profile"); if (szProfile && !mir_tstrcmp(szProfile, JABBER_FEAT_SI_FT)) FtHandleSiRequest(node); else { - XmlNodeIq iq(_T("error"), pInfo); - HXML error = iq << XCHILD(_T("error")) << XATTRI(_T("code"), 400) << XATTR(_T("type"), _T("cancel")); - error << XCHILDNS(_T("bad-request"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")); - error << XCHILD(_T("bad-profile")); + XmlNodeIq iq(L"error", pInfo); + HXML error = iq << XCHILD(L"error") << XATTRI(L"code", 400) << XATTR(L"type", L"cancel"); + error << XCHILDNS(L"bad-request", L"urn:ietf:params:xml:ns:xmpp-stanzas"); + error << XCHILD(L"bad-profile"); m_ThreadInfo->send(iq); } return TRUE; @@ -227,7 +227,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) // invalid JID if (!bRetVal) { - debugLog(_T("<iq/> attempt to hack via roster push from %s"), pInfo->GetFrom()); + debugLog(L"<iq/> attempt to hack via roster push from %s", pInfo->GetFrom()); return TRUE; } } @@ -240,16 +240,16 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) if (!itemNode) break; - if (mir_tstrcmp(XmlGetName(itemNode), _T("item")) != 0) + if (mir_tstrcmp(XmlGetName(itemNode), L"item") != 0) continue; - if ((jid = XmlGetAttrValue(itemNode, _T("jid"))) == NULL) + if ((jid = XmlGetAttrValue(itemNode, L"jid")) == NULL) continue; - if ((str = XmlGetAttrValue(itemNode, _T("subscription"))) == NULL) + if ((str = XmlGetAttrValue(itemNode, L"subscription")) == NULL) continue; // we will not add new account when subscription=remove - if (!mir_tstrcmp(str, _T("to")) || !mir_tstrcmp(str, _T("both")) || !mir_tstrcmp(str, _T("from")) || !mir_tstrcmp(str, _T("none"))) { - const TCHAR *name = XmlGetAttrValue(itemNode, _T("name")); + if (!mir_tstrcmp(str, L"to") || !mir_tstrcmp(str, L"both") || !mir_tstrcmp(str, L"from") || !mir_tstrcmp(str, L"none")) { + const TCHAR *name = XmlGetAttrValue(itemNode, L"name"); ptrT nick((name != NULL) ? mir_tstrdup(name) : JabberNickFromJID(jid)); if (nick != NULL) { MCONTACT hContact = HContactFromJID(jid, false); @@ -287,18 +287,18 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) } if (JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, jid)) { - if (!mir_tstrcmp(str, _T("both"))) item->subscription = SUB_BOTH; - else if (!mir_tstrcmp(str, _T("to"))) item->subscription = SUB_TO; - else if (!mir_tstrcmp(str, _T("from"))) item->subscription = SUB_FROM; + if (!mir_tstrcmp(str, L"both")) item->subscription = SUB_BOTH; + else if (!mir_tstrcmp(str, L"to")) item->subscription = SUB_TO; + else if (!mir_tstrcmp(str, L"from")) item->subscription = SUB_FROM; else item->subscription = SUB_NONE; - debugLog(_T("Roster push for jid=%s, set subscription to %s"), jid, str); + debugLog(L"Roster push for jid=%s, set subscription to %s", jid, str); MCONTACT hContact = HContactFromJID(jid); // subscription = remove is to remove from roster list // but we will just set the contact to offline and not actually // remove, so that history will be retained. - if (!mir_tstrcmp(str, _T("remove"))) { + if (!mir_tstrcmp(str, L"remove")) { if (hContact) { SetContactOfflineStatus(hContact); ListRemove(LIST_ROSTER, jid); @@ -327,8 +327,8 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo) if (m_options.BsOnlyIBB) { // reject - XmlNodeIq iq(_T("error"), pInfo); - HXML e = XmlAddChild(iq, _T("error"), _T("File transfer refused")); XmlAddAttr(e, _T("code"), 406); + XmlNodeIq iq(L"error", pInfo); + HXML e = XmlAddChild(iq, L"error", L"File transfer refused"); XmlAddAttr(e, L"code", 406); m_ThreadInfo->send(iq); return TRUE; } @@ -344,7 +344,7 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo) // Parse the URL TCHAR *str = (TCHAR*)XmlGetText(n); // URL of the file to get - if (!_tcsnicmp(str, _T("http://"), 7)) { + if (!_tcsnicmp(str, L"http://", 7)) { TCHAR *p = str + 7, *q; if ((q = _tcschr(p, '/')) != NULL) { TCHAR text[1024]; @@ -371,7 +371,7 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo) desc = (TCHAR*)XmlGetText(n); TCHAR *str2; - debugLog(_T("description = %s"), desc); + debugLog(L"description = %s", desc); if ((str2 = _tcsrchr(ft->httpPath, '/')) != NULL) str2++; else @@ -391,8 +391,8 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo) } else { // reject - XmlNodeIq iq(_T("error"), pInfo); - HXML e = XmlAddChild(iq, _T("error"), _T("File transfer refused")); XmlAddAttr(e, _T("code"), 406); + XmlNodeIq iq(L"error", pInfo); + HXML e = XmlAddChild(iq, L"error", L"File transfer refused"); XmlAddAttr(e, L"code", 406); m_ThreadInfo->send(iq); delete ft; } @@ -404,7 +404,7 @@ BOOL CJabberProto::OnHandleDiscoInfoRequest(HXML iqNode, CJabberIqInfo *pInfo) if (!pInfo->GetChildNode()) return TRUE; - const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), _T("node")); + const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), L"node"); // caps hack if (m_clientCapsManager.HandleInfoRequest(iqNode, pInfo, szNode)) return TRUE; @@ -415,9 +415,9 @@ BOOL CJabberProto::OnHandleDiscoInfoRequest(HXML iqNode, CJabberIqInfo *pInfo) // another request, send empty result m_ThreadInfo->send( - XmlNodeIq(_T("error"), pInfo) - << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel")) - << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"))); + XmlNodeIq(L"error", pInfo) + << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel") + << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas")); return TRUE; } @@ -427,19 +427,19 @@ BOOL CJabberProto::OnHandleDiscoItemsRequest(HXML iqNode, CJabberIqInfo *pInfo) return TRUE; // ad-hoc commands check: - const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), _T("node")); + const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), L"node"); if (szNode && m_adhocManager.HandleItemsRequest(iqNode, pInfo, szNode)) return TRUE; // another request, send empty result - XmlNodeIq iq(_T("result"), pInfo); + XmlNodeIq iq(L"result", pInfo); HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_ITEMS); if (szNode) - XmlAddAttr(resultQuery, _T("node"), szNode); + XmlAddAttr(resultQuery, L"node", szNode); if (!szNode && m_options.EnableRemoteControl) - resultQuery << XCHILD(_T("item")) << XATTR(_T("jid"), m_ThreadInfo->fullJID) - << XATTR(_T("node"), JABBER_FEAT_COMMANDS) << XATTR(_T("name"), _T("Ad-hoc commands")); + resultQuery << XCHILD(L"item") << XATTR(L"jid", m_ThreadInfo->fullJID) + << XATTR(L"node", JABBER_FEAT_COMMANDS) << XATTR(L"name", L"Ad-hoc commands"); m_ThreadInfo->send(iq); return TRUE; @@ -473,9 +473,9 @@ BOOL CJabberProto::OnIqHttpAuth(HXML node, CJabberIqInfo *pInfo) if (!pConfirm) return TRUE; - const TCHAR *szId = XmlGetAttrValue(pConfirm, _T("id")); - const TCHAR *szMethod = XmlGetAttrValue(pConfirm, _T("method")); - const TCHAR *szUrl = XmlGetAttrValue(pConfirm, _T("url")); + const TCHAR *szId = XmlGetAttrValue(pConfirm, L"id"); + const TCHAR *szMethod = XmlGetAttrValue(pConfirm, L"method"); + const TCHAR *szUrl = XmlGetAttrValue(pConfirm, L"url"); if (!szId || !szMethod || !szUrl) return TRUE; diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index fdba87e6cf..61fe3f353d 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -34,8 +34,8 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*) if (iqNode == NULL) return; - const TCHAR *type = XmlGetAttrValue(iqNode, _T("type")); - if (mir_tstrcmp(type, _T("result"))) + const TCHAR *type = XmlGetAttrValue(iqNode, L"type"); + if (mir_tstrcmp(type, L"result")) return; HXML query = XmlGetChildByTag(iqNode, "query", "xmlns", JABBER_FEAT_DISCO_INFO); @@ -43,13 +43,13 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*) return; HXML identity; - for (int i = 1; (identity = XmlGetNthChild(query, _T("identity"), i)) != NULL; i++) { + for (int i = 1; (identity = XmlGetNthChild(query, L"identity", i)) != NULL; i++) { JABBER_DISCO_FIELD tmp = { - XmlGetAttrValue(identity, _T("category")), - XmlGetAttrValue(identity, _T("type")), - XmlGetAttrValue(identity, _T("name")) }; + XmlGetAttrValue(identity, L"category"), + XmlGetAttrValue(identity, L"type"), + XmlGetAttrValue(identity, L"name") }; - if (!mir_tstrcmp(tmp.category, _T("pubsub")) && !mir_tstrcmp(tmp.type, _T("pep"))) { + if (!mir_tstrcmp(tmp.category, L"pubsub") && !mir_tstrcmp(tmp.type, L"pep")) { m_bPepSupported = true; EnableMenuItems(true); @@ -62,8 +62,8 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*) if (m_ThreadInfo) { HXML feature; - for (int i = 1; (feature = XmlGetNthChild(query, _T("feature"), i)) != NULL; i++) { - const TCHAR *featureName = XmlGetAttrValue(feature, _T("var")); + for (int i = 1; (feature = XmlGetNthChild(query, L"feature", i)) != NULL; i++) { + const TCHAR *featureName = XmlGetAttrValue(feature, L"var"); if (!featureName) continue; @@ -86,7 +86,7 @@ void CJabberProto::OnIqResultNestedRosterGroups(HXML iqNode, CJabberIqInfo *pInf if (iqNode && pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) { bPrivateStorageSupport = true; - szGroupDelimeter = XPathFmt(iqNode, _T("query[@xmlns='%s']/roster[@xmlns='%s']"), JABBER_FEAT_PRIVATE_STORAGE, JABBER_FEAT_NESTED_ROSTER_GROUPS); + szGroupDelimeter = XPathFmt(iqNode, L"query[@xmlns='%s']/roster[@xmlns='%s']", JABBER_FEAT_PRIVATE_STORAGE, JABBER_FEAT_NESTED_ROSTER_GROUPS); if (szGroupDelimeter && !szGroupDelimeter[0]) szGroupDelimeter = NULL; // "" as roster delimeter is not supported :) } @@ -96,22 +96,22 @@ void CJabberProto::OnIqResultNestedRosterGroups(HXML iqNode, CJabberIqInfo *pInf return; // is our default delimiter? - if ((!szGroupDelimeter && bPrivateStorageSupport) || (szGroupDelimeter && mir_tstrcmp(szGroupDelimeter, _T("\\")))) + if ((!szGroupDelimeter && bPrivateStorageSupport) || (szGroupDelimeter && mir_tstrcmp(szGroupDelimeter, L"\\"))) m_ThreadInfo->send( - XmlNodeIq(_T("set"), SerialNext()) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) - << XCHILD(_T("roster"), _T("\\")) << XATTR(_T("xmlns"), JABBER_FEAT_NESTED_ROSTER_GROUPS)); + XmlNodeIq(L"set", SerialNext()) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) + << XCHILD(L"roster", L"\\") << XATTR(L"xmlns", JABBER_FEAT_NESTED_ROSTER_GROUPS)); // roster request - TCHAR *szUserData = mir_tstrdup(szGroupDelimeter ? szGroupDelimeter : _T("\\")); + TCHAR *szUserData = mir_tstrdup(szGroupDelimeter ? szGroupDelimeter : L"\\"); m_ThreadInfo->send( XmlNodeIq( AddIQ(&CJabberProto::OnIqResultGetRoster, JABBER_IQ_TYPE_GET, NULL, 0, -1, (void*)szUserData)) - << XCHILDNS(_T("query"), JABBER_FEAT_IQ_ROSTER)); + << XCHILDNS(L"query", JABBER_FEAT_IQ_ROSTER)); } void CJabberProto::OnIqResultNotes(HXML iqNode, CJabberIqInfo *pInfo) { if (iqNode && pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) { - HXML hXmlData = XPathFmt(iqNode, _T("query[@xmlns='%s']/storage[@xmlns='%s']"), + HXML hXmlData = XPathFmt(iqNode, L"query[@xmlns='%s']/storage[@xmlns='%s']", JABBER_FEAT_PRIVATE_STORAGE, JABBER_FEAT_MIRANDA_NOTES); if (hXmlData) m_notes.LoadXml(hXmlData); } @@ -134,7 +134,7 @@ void CJabberProto::OnProcessLoginRq(ThreadData *info, DWORD rq) LISTFOREACH(i, this, LIST_BOOKMARK) { JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i); - if (item != NULL && !mir_tstrcmp(item->type, _T("conference")) && item->bAutoJoin) + if (item != NULL && !mir_tstrcmp(item->type, L"conference") && item->bAutoJoin) ll.insert(item); } @@ -144,8 +144,8 @@ void CJabberProto::OnProcessLoginRq(ThreadData *info, DWORD rq) TCHAR room[256], text[128]; _tcsncpy_s(text, item->jid, _TRUNCATE); _tcsncpy_s(room, text, _TRUNCATE); - TCHAR *p = _tcstok(room, _T("@")); - TCHAR *server = _tcstok(NULL, _T("@")); + TCHAR *p = _tcstok(room, L"@"); + TCHAR *server = _tcstok(NULL, L"@"); if (item->nick && item->nick[0]) GroupchatJoinRoom(server, p, item->nick, item->password, true); else { @@ -178,18 +178,18 @@ void CJabberProto::OnLoggedIn() pIqInfo->SetTimeout(30000); m_ThreadInfo->send( XmlNodeIq(pIqInfo) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) - << XCHILDNS(_T("roster"), JABBER_FEAT_NESTED_ROSTER_GROUPS)); + << XCHILDNS(L"roster", JABBER_FEAT_NESTED_ROSTER_GROUPS)); } // Server-side notes m_ThreadInfo->send( XmlNodeIq(AddIQ(&CJabberProto::OnIqResultNotes, JABBER_IQ_TYPE_GET)) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) - << XCHILDNS(_T("storage"), JABBER_FEAT_MIRANDA_NOTES)); + << XCHILDNS(L"storage", JABBER_FEAT_MIRANDA_NOTES)); m_ThreadInfo->send( XmlNodeIq(AddIQ(&CJabberProto::OnIqResultDiscoBookmarks, JABBER_IQ_TYPE_GET)) - << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(_T("storage"), _T("storage:bookmarks"))); + << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(L"storage", L"storage:bookmarks")); m_bPepSupported = false; m_ThreadInfo->jabberServerCaps = JABBER_RESOURCE_CAPS_NONE; @@ -216,22 +216,22 @@ void CJabberProto::OnIqResultGetAuth(HXML iqNode, CJabberIqInfo*) HXML queryNode; const TCHAR *type; - if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return; + if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return; if ((queryNode = XmlGetChild(iqNode, "query")) == NULL) return; - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { XmlNodeIq iq(AddIQ(&CJabberProto::OnIqResultSetAuth, JABBER_IQ_TYPE_SET)); - HXML query = iq << XQUERY(_T("jabber:iq:auth")); - query << XCHILD(_T("username"), m_ThreadInfo->conn.username); + HXML query = iq << XQUERY(L"jabber:iq:auth"); + query << XCHILD(L"username", m_ThreadInfo->conn.username); if (XmlGetChild(queryNode, "digest") != NULL && m_ThreadInfo->szStreamId) { JabberShaStrBuf buf; T2Utf str(m_ThreadInfo->conn.password); char text[200]; mir_snprintf(text, "%s%s", m_ThreadInfo->szStreamId, str); - query << XCHILD(_T("digest"), _A2T(JabberSha1(text, buf))); + query << XCHILD(L"digest", _A2T(JabberSha1(text, buf))); } else if (XmlGetChild(queryNode, "password") != NULL) - query << XCHILD(_T("password"), m_ThreadInfo->conn.password); + query << XCHILD(L"password", m_ThreadInfo->conn.password); else { debugLogA("No known authentication mechanism accepted by the server."); m_ThreadInfo->send("</stream:stream>"); @@ -239,11 +239,11 @@ void CJabberProto::OnIqResultGetAuth(HXML iqNode, CJabberIqInfo*) } if (XmlGetChild(queryNode, "resource") != NULL) - query << XCHILD(_T("resource"), m_ThreadInfo->resource); + query << XCHILD(L"resource", m_ThreadInfo->resource); m_ThreadInfo->send(iq); } - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { m_ThreadInfo->send("</stream:stream>"); TCHAR text[128]; @@ -261,9 +261,9 @@ void CJabberProto::OnIqResultSetAuth(HXML iqNode, CJabberIqInfo*) // RECVED: authentication result // ACTION: if successfully logged in, continue by requesting roster list and set my initial status debugLogA("<iq/> iqIdSetAuth"); - if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return; + if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return; - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { ptrT tszNick(getTStringA("Nick")); if (tszNick == NULL) setTString("Nick", m_ThreadInfo->conn.username); @@ -271,7 +271,7 @@ void CJabberProto::OnIqResultSetAuth(HXML iqNode, CJabberIqInfo*) OnLoggedIn(); } // What to do if password error? etc... - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { TCHAR text[128]; m_ThreadInfo->send("</stream:stream>"); @@ -290,16 +290,16 @@ void CJabberProto::OnIqResultBind(HXML iqNode, CJabberIqInfo *pInfo) LPCTSTR szJid = XPathT(iqNode, "bind[@xmlns='urn:ietf:params:xml:ns:xmpp-bind']/jid"); if (szJid) { if (!_tcsncmp(m_ThreadInfo->fullJID, szJid, _countof(m_ThreadInfo->fullJID))) - debugLog(_T("Result Bind: %s confirmed "), m_ThreadInfo->fullJID); + debugLog(L"Result Bind: %s confirmed ", m_ThreadInfo->fullJID); else { - debugLog(_T("Result Bind: %s changed to %s"), m_ThreadInfo->fullJID, szJid); + debugLog(L"Result Bind: %s changed to %s", m_ThreadInfo->fullJID, szJid); _tcsncpy_s(m_ThreadInfo->fullJID, szJid, _TRUNCATE); } } if (m_ThreadInfo->bIsSessionAvailable) m_ThreadInfo->send( XmlNodeIq( AddIQ(&CJabberProto::OnIqResultSession, JABBER_IQ_TYPE_SET)) - << XCHILDNS(_T("session"), _T("urn:ietf:params:xml:ns:xmpp-session"))); + << XCHILDNS(L"session", L"urn:ietf:params:xml:ns:xmpp-session")); else OnLoggedIn(); } @@ -357,12 +357,12 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) return; } - if (mir_tstrcmp(XmlGetAttrValue(queryNode, _T("xmlns")), JABBER_FEAT_IQ_ROSTER)) { + if (mir_tstrcmp(XmlGetAttrValue(queryNode, L"xmlns"), JABBER_FEAT_IQ_ROSTER)) { mir_free(szGroupDelimeter); return; } - if (!mir_tstrcmp(szGroupDelimeter, _T("\\"))) { + if (!mir_tstrcmp(szGroupDelimeter, L"\\")) { mir_free(szGroupDelimeter); szGroupDelimeter = NULL; } @@ -377,25 +377,25 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) if (!itemNode) break; - if (mir_tstrcmp(XmlGetName(itemNode), _T("item"))) + if (mir_tstrcmp(XmlGetName(itemNode), L"item")) continue; - const TCHAR *str = XmlGetAttrValue(itemNode, _T("subscription")); + const TCHAR *str = XmlGetAttrValue(itemNode, L"subscription"); JABBER_SUBSCRIPTION sub; if (str == NULL) sub = SUB_NONE; - else if (!mir_tstrcmp(str, _T("both"))) sub = SUB_BOTH; - else if (!mir_tstrcmp(str, _T("to"))) sub = SUB_TO; - else if (!mir_tstrcmp(str, _T("from"))) sub = SUB_FROM; + else if (!mir_tstrcmp(str, L"both")) sub = SUB_BOTH; + else if (!mir_tstrcmp(str, L"to")) sub = SUB_TO; + else if (!mir_tstrcmp(str, L"from")) sub = SUB_FROM; else sub = SUB_NONE; - const TCHAR *jid = XmlGetAttrValue(itemNode, _T("jid")); + const TCHAR *jid = XmlGetAttrValue(itemNode, L"jid"); if (jid == NULL) continue; if (_tcschr(jid, '@') == NULL) bIsTransport = true; - const TCHAR *name = XmlGetAttrValue(itemNode, _T("name")); + const TCHAR *name = XmlGetAttrValue(itemNode, L"name"); TCHAR *nick = (name != NULL) ? mir_tstrdup(name) : JabberNickFromJID(jid); if (nick == NULL) continue; @@ -419,7 +419,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) szPos += mir_tstrlen(szGroupDelimeter); TCHAR *szNewGroup = (TCHAR *)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(item->group) + mir_tstrlen(szPos) + 2)); mir_tstrcpy(szNewGroup, item->group); - mir_tstrcat(szNewGroup, _T("\\")); + mir_tstrcat(szNewGroup, L"\\"); mir_tstrcat(szNewGroup, szPos); mir_free(item->group); item->group = szNewGroup; @@ -478,7 +478,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) setByte(hContact, "IsTransport", false); } - const TCHAR *imagepath = XmlGetAttrValue(itemNode, _T("vz:img")); + const TCHAR *imagepath = XmlGetAttrValue(itemNode, L"vz:img"); if (imagepath) httpavatars->insert(new JABBER_HTTP_AVATARS(imagepath, hContact)); } @@ -494,7 +494,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) MCONTACT hNext = db_find_next(hContact, m_szModuleName); ptrT jid(getTStringA(hContact, "jid")); if (jid != NULL && !ListGetItemPtr(LIST_ROSTER, jid)) { - debugLog(_T("Syncing roster: preparing to delete %s (hContact=0x%x)"), jid, hContact); + debugLog(L"Syncing roster: preparing to delete %s (hContact=0x%x)", jid, hContact); CallService(MS_DB_CONTACT_DELETE, hContact, 0); } hContact = hNext; @@ -530,14 +530,14 @@ void CJabberProto::OnIqResultGetRegister(HXML iqNode, CJabberIqInfo*) HXML queryNode; const TCHAR *type; - if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return; + if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return; if ((queryNode = XmlGetChild(iqNode, "query")) == NULL) return; - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { if (m_hwndAgentRegInput) SendMessage(m_hwndAgentRegInput, WM_JABBER_REGINPUT_ACTIVATE, 1 /*success*/, (LPARAM)xmlCopyNode(iqNode)); } - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { if (m_hwndAgentRegInput) { HXML errorNode = XmlGetChild(iqNode, "error"); TCHAR *str = JabberErrorMsg(errorNode); @@ -554,10 +554,10 @@ void CJabberProto::OnIqResultSetRegister(HXML iqNode, CJabberIqInfo*) debugLogA("<iq/> iqIdSetRegister"); const TCHAR *type, *from; - if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return; - if ((from = XmlGetAttrValue(iqNode, _T("from"))) == NULL) return; + if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return; + if ((from = XmlGetAttrValue(iqNode, L"from")) == NULL) return; - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { MCONTACT hContact = HContactFromJID(from); if (hContact != NULL) setByte(hContact, "IsTransport", true); @@ -565,7 +565,7 @@ void CJabberProto::OnIqResultSetRegister(HXML iqNode, CJabberIqInfo*) if (m_hwndRegProgress) SendMessage(m_hwndRegProgress, WM_JABBER_REGDLG_UPDATE, 100, (LPARAM)TranslateT("Registration successful")); } - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { if (m_hwndRegProgress) { HXML errorNode = XmlGetChild(iqNode, "error"); TCHAR *str = JabberErrorMsg(errorNode); @@ -601,7 +601,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(HXML n, MCONTACT hContact, bool &hasP TCHAR szAvatarFileName[MAX_PATH]; GetAvatarFileName(hContact, szAvatarFileName, _countof(szAvatarFileName)); - debugLog(_T("Picture file name set to %s"), szAvatarFileName); + debugLog(L"Picture file name set to %s", szAvatarFileName); HANDLE hFile = CreateFile(szAvatarFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) return; @@ -618,7 +618,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(HXML n, MCONTACT hContact, bool &hasP hasPhoto = true; CallService(MS_AV_SETMYAVATART, (WPARAM)m_szModuleName, (LPARAM)szAvatarFileName); - debugLog(_T("My picture saved to %s"), szAvatarFileName); + debugLog(L"My picture saved to %s", szAvatarFileName); } else { ptrT jid(getTStringA(hContact, "jid")); @@ -634,7 +634,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(HXML n, MCONTACT hContact, bool &hasP if (item->photoFileName && mir_tstrcmp(item->photoFileName, szAvatarFileName)) DeleteFile(item->photoFileName); replaceStrT(item->photoFileName, szAvatarFileName); - debugLog(_T("Contact's picture saved to %s"), szAvatarFileName); + debugLog(L"Contact's picture saved to %s", szAvatarFileName); OnIqResultGotAvatar(hContact, o, szPicType); } } @@ -661,27 +661,27 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) DBVARIANT dbv; debugLogA("<iq/> iqIdGetVcard"); - if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return; - if ((jid = XmlGetAttrValue(iqNode, _T("from"))) == NULL) return; + if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return; + if ((jid = XmlGetAttrValue(iqNode, L"from")) == NULL) return; int id = JabberGetPacketID(iqNode); if (id == m_nJabberSearchID) { m_nJabberSearchID = -1; if ((vCardNode = XmlGetChild(iqNode, "vCard")) != NULL) { - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { PROTOSEARCHRESULT psr = { 0 }; psr.cbSize = sizeof(psr); psr.flags = PSR_TCHAR; psr.nick.t = sttGetText(vCardNode, "NICKNAME"); psr.firstName.t = sttGetText(vCardNode, "FN"); - psr.lastName.t = _T(""); + psr.lastName.t = L""; psr.email.t = sttGetText(vCardNode, "EMAIL"); psr.id.t = NEWTSTR_ALLOCA(jid); ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&psr); ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); } - else if (!mir_tstrcmp(type, _T("error"))) + else if (!mir_tstrcmp(type, L"error")) ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); } else ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); @@ -699,13 +699,13 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) debugLogA("Other user's vcard"); } - if (!mir_tstrcmp(type, _T("error"))) { + if (!mir_tstrcmp(type, L"error")) { if ((hContact = HContactFromJID(jid)) != NULL) ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1, 0); return; } - if (mir_tstrcmp(type, _T("result"))) + if (mir_tstrcmp(type, L"result")) return; bool hasFn = false, hasNick = false, hasGiven = false, hasFamily = false, hasMiddle = false, @@ -723,19 +723,19 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) if (!n) break; if (XmlGetName(n) == NULL) continue; - if (!mir_tstrcmp(XmlGetName(n), _T("FN"))) { + if (!mir_tstrcmp(XmlGetName(n), L"FN")) { if (XmlGetText(n) != NULL) { hasFn = true; setTString(hContact, "FullName", XmlGetText(n)); } } - else if (!mir_tstrcmp(XmlGetName(n), _T("NICKNAME"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"NICKNAME")) { if (XmlGetText(n) != NULL) { hasNick = true; setTString(hContact, "Nick", XmlGetText(n)); } } - else if (!mir_tstrcmp(XmlGetName(n), _T("N"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"N")) { // First/Last name if (!hasGiven && !hasFamily && !hasMiddle) { if ((m = XmlGetChild(n, "GIVEN")) != NULL && XmlGetText(m) != NULL) { @@ -752,7 +752,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) } } } - else if (!mir_tstrcmp(XmlGetName(n), _T("EMAIL"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"EMAIL")) { // E-mail address(es) if ((m = XmlGetChild(n, "USERID")) == NULL) // Some bad client put e-mail directly in <EMAIL/> instead of <USERID/> m = n; @@ -779,11 +779,11 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) nEmail++; } } - else if (!mir_tstrcmp(XmlGetName(n), _T("BDAY"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"BDAY")) { // Birthday if (!hasBday && XmlGetText(n) != NULL) { if (hContact != NULL) { - if (_stscanf(XmlGetText(n), _T("%d-%d-%d"), &nYear, &nMonth, &nDay) == 3) { + if (_stscanf(XmlGetText(n), L"%d-%d-%d", &nYear, &nMonth, &nDay) == 3) { hasBday = true; setWord(hContact, "BirthYear", (WORD)nYear); setByte(hContact, "BirthMonth", (BYTE)nMonth); @@ -804,7 +804,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) } } } - else if (!mir_tstrcmp(XmlGetName(n), _T("GENDER"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"GENDER")) { // Gender if (!hasGender && XmlGetText(n) != NULL) { if (hContact != NULL) { @@ -819,7 +819,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) } } } - else if (!mir_tstrcmp(XmlGetName(n), _T("ADR"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"ADR")) { if (!hasHome && XmlGetChild(n, "HOME") != NULL) { // Home address TCHAR text[128]; @@ -828,9 +828,9 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) hasHomeStreet = true; if (hContact != NULL) { if ((o = XmlGetChild(n, "EXTADR")) != NULL && XmlGetText(o) != NULL) - mir_sntprintf(text, _T("%s\r\n%s"), XmlGetText(m), XmlGetText(o)); + mir_sntprintf(text, L"%s\r\n%s", XmlGetText(m), XmlGetText(o)); else if ((o = XmlGetChild(n, "EXTADD")) != NULL && XmlGetText(o) != NULL) - mir_sntprintf(text, _T("%s\r\n%s"), XmlGetText(m), XmlGetText(o)); + mir_sntprintf(text, L"%s\r\n%s", XmlGetText(m), XmlGetText(o)); else _tcsncpy_s(text, XmlGetText(m), _TRUNCATE); text[_countof(text) - 1] = '\0'; @@ -875,9 +875,9 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) hasWorkStreet = true; if (hContact != NULL) { if ((o = XmlGetChild(n, "EXTADR")) != NULL && XmlGetText(o) != NULL) - mir_sntprintf(text, _T("%s\r\n%s"), XmlGetText(m), XmlGetText(o)); + mir_sntprintf(text, L"%s\r\n%s", XmlGetText(m), XmlGetText(o)); else if ((o = XmlGetChild(n, "EXTADD")) != NULL && XmlGetText(o) != NULL) - mir_sntprintf(text, _T("%s\r\n%s"), XmlGetText(m), XmlGetText(o)); + mir_sntprintf(text, L"%s\r\n%s", XmlGetText(m), XmlGetText(o)); else _tcsncpy_s(text, XmlGetText(m), _TRUNCATE); text[_countof(text) - 1] = '\0'; @@ -914,7 +914,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) } } } - else if (!mir_tstrcmp(XmlGetName(n), _T("TEL"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"TEL")) { // Telephone/Fax/Cellular if ((m = XmlGetChild(n, "NUMBER")) != NULL && XmlGetText(m) != NULL) { if (hContact != NULL) { @@ -966,14 +966,14 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) } } } - else if (!mir_tstrcmp(XmlGetName(n), _T("URL"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"URL")) { // Homepage if (!hasUrl && XmlGetText(n) != NULL) { hasUrl = true; setTString(hContact, "Homepage", XmlGetText(n)); } } - else if (!mir_tstrcmp(XmlGetName(n), _T("ORG"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"ORG")) { if (!hasOrgname && !hasOrgunit) { if ((m = XmlGetChild(n, "ORGNAME")) != NULL && XmlGetText(m) != NULL) { hasOrgname = true; @@ -985,27 +985,27 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) } } } - else if (!mir_tstrcmp(XmlGetName(n), _T("ROLE"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"ROLE")) { if (!hasRole && XmlGetText(n) != NULL) { hasRole = true; setTString(hContact, "Role", XmlGetText(n)); } } - else if (!mir_tstrcmp(XmlGetName(n), _T("TITLE"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"TITLE")) { if (!hasTitle && XmlGetText(n) != NULL) { hasTitle = true; setTString(hContact, "CompanyPosition", XmlGetText(n)); } } - else if (!mir_tstrcmp(XmlGetName(n), _T("DESC"))) { + else if (!mir_tstrcmp(XmlGetName(n), L"DESC")) { if (!hasDesc && XmlGetText(n) != NULL) { hasDesc = true; CMString tszMemo(XmlGetText(n)); - tszMemo.Replace(_T("\n"), _T("\r\n")); + tszMemo.Replace(L"\n", L"\r\n"); setTString(hContact, "About", tszMemo); } } - else if (!mir_tstrcmp(XmlGetName(n), _T("PHOTO"))) + else if (!mir_tstrcmp(XmlGetName(n), L"PHOTO")) OnIqResultGetVcardPhoto(n, hContact, hasPhoto); } } @@ -1145,7 +1145,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) void CJabberProto::OnIqResultSetVcard(HXML iqNode, CJabberIqInfo*) { debugLogA("<iq/> iqIdSetVcard"); - if (XmlGetAttrValue(iqNode, _T("type"))) + if (XmlGetAttrValue(iqNode, L"type")) WindowList_Broadcast(m_hWindowList, WM_JABBER_REFRESH_VCARD, 0, 0); } @@ -1156,10 +1156,10 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode, CJabberIqInfo*) int id; debugLogA("<iq/> iqIdGetSearch"); - if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return; + if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return; if ((id = JabberGetPacketID(iqNode)) == -1) return; - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { if ((queryNode = XmlGetChild(iqNode, "query")) == NULL) return; @@ -1170,26 +1170,26 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode, CJabberIqInfo*) if (!itemNode) break; - if (!mir_tstrcmp(XmlGetName(itemNode), _T("item"))) { - if ((jid = XmlGetAttrValue(itemNode, _T("jid"))) != NULL) { + if (!mir_tstrcmp(XmlGetName(itemNode), L"item")) { + if ((jid = XmlGetAttrValue(itemNode, L"jid")) != NULL) { psr.id.t = (TCHAR*)jid; - debugLog(_T("Result jid = %s"), jid); + debugLog(L"Result jid = %s", jid); if ((n = XmlGetChild(itemNode, "nick")) != NULL && XmlGetText(n) != NULL) psr.nick.t = (TCHAR*)XmlGetText(n); else - psr.nick.t = _T(""); + psr.nick.t = L""; if ((n = XmlGetChild(itemNode, "first")) != NULL && XmlGetText(n) != NULL) psr.firstName.t = (TCHAR*)XmlGetText(n); else - psr.firstName.t = _T(""); + psr.firstName.t = L""; if ((n = XmlGetChild(itemNode, "last")) != NULL && XmlGetText(n) != NULL) psr.lastName.t = (TCHAR*)XmlGetText(n); else - psr.lastName.t = _T(""); + psr.lastName.t = L""; if ((n = XmlGetChild(itemNode, "email")) != NULL && XmlGetText(n) != NULL) psr.email.t = (TCHAR*)XmlGetText(n); else - psr.email.t = _T(""); + psr.email.t = L""; psr.flags = PSR_TCHAR; ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&psr); } @@ -1198,7 +1198,7 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode, CJabberIqInfo*) ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); } - else if (!mir_tstrcmp(type, _T("error"))) + else if (!mir_tstrcmp(type, L"error")) ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); } @@ -1207,7 +1207,7 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) HXML queryNode; debugLogA("<iq/> iqIdGetExtSearch"); - const TCHAR *type = XmlGetAttrValue(iqNode, _T("type")); + const TCHAR *type = XmlGetAttrValue(iqNode, L"type"); if (type == NULL) return; @@ -1215,14 +1215,14 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) if (id == -1) return; - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { if ((queryNode = XmlGetChild(iqNode, "query")) == NULL) return; if ((queryNode = XmlGetChild(queryNode, "x")) == NULL) return; for (int i = 0;; i++) { HXML itemNode = XmlGetChild(queryNode, i); if (!itemNode) break; - if (mir_tstrcmp(XmlGetName(itemNode), _T("item"))) + if (mir_tstrcmp(XmlGetName(itemNode), L"item")) continue; PROTOSEARCHRESULT psr = { 0 }; @@ -1234,10 +1234,10 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) if (!fieldNode) break; - if (mir_tstrcmp(XmlGetName(fieldNode), _T("field"))) + if (mir_tstrcmp(XmlGetName(fieldNode), L"field")) continue; - const TCHAR *fieldName = XmlGetAttrValue(fieldNode, _T("var")); + const TCHAR *fieldName = XmlGetAttrValue(fieldNode, L"var"); if (fieldName == NULL) continue; @@ -1245,20 +1245,20 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) if (n == NULL) continue; - if (!mir_tstrcmp(fieldName, _T("jid"))) { + if (!mir_tstrcmp(fieldName, L"jid")) { psr.id.t = (TCHAR*)XmlGetText(n); - debugLog(_T("Result jid = %s"), psr.id.t); + debugLog(L"Result jid = %s", psr.id.t); } - else if (!mir_tstrcmp(fieldName, _T("nickname"))) - psr.nick.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : _T(""); - else if (!mir_tstrcmp(fieldName, _T("fn"))) - psr.firstName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : _T(""); - else if (!mir_tstrcmp(fieldName, _T("given"))) - psr.firstName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : _T(""); - else if (!mir_tstrcmp(fieldName, _T("family"))) - psr.lastName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : _T(""); - else if (!mir_tstrcmp(fieldName, _T("email"))) - psr.email.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : _T(""); + else if (!mir_tstrcmp(fieldName, L"nickname")) + psr.nick.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : L""; + else if (!mir_tstrcmp(fieldName, L"fn")) + psr.firstName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : L""; + else if (!mir_tstrcmp(fieldName, L"given")) + psr.firstName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : L""; + else if (!mir_tstrcmp(fieldName, L"family")) + psr.lastName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : L""; + else if (!mir_tstrcmp(fieldName, L"email")) + psr.email.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : L""; } ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&psr); @@ -1266,7 +1266,7 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); } - else if (!mir_tstrcmp(type, _T("error"))) + else if (!mir_tstrcmp(type, L"error")) ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); } @@ -1274,15 +1274,15 @@ void CJabberProto::OnIqResultSetPassword(HXML iqNode, CJabberIqInfo*) { debugLogA("<iq/> iqIdSetPassword"); - const TCHAR *type = XmlGetAttrValue(iqNode, _T("type")); + const TCHAR *type = XmlGetAttrValue(iqNode, L"type"); if (type == NULL) return; - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { _tcsncpy_s(m_ThreadInfo->conn.password, m_ThreadInfo->tszNewPassword, _TRUNCATE); MessageBox(NULL, TranslateT("Password is successfully changed. Don't forget to update your password in the Jabber protocol option."), TranslateT("Change Password"), MB_OK | MB_ICONINFORMATION | MB_SETFOREGROUND); } - else if (!mir_tstrcmp(type, _T("error"))) + else if (!mir_tstrcmp(type, L"error")) MessageBox(NULL, TranslateT("Password cannot be changed."), TranslateT("Change Password"), MB_OK | MB_ICONSTOP | MB_SETFOREGROUND); } @@ -1290,7 +1290,7 @@ void CJabberProto::OnIqResultGetVCardAvatar(HXML iqNode, CJabberIqInfo*) { debugLogA("<iq/> OnIqResultGetVCardAvatar"); - const TCHAR *from = XmlGetAttrValue(iqNode, _T("from")); + const TCHAR *from = XmlGetAttrValue(iqNode, L"from"); if (from == NULL) return; @@ -1299,8 +1299,8 @@ void CJabberProto::OnIqResultGetVCardAvatar(HXML iqNode, CJabberIqInfo*) return; const TCHAR *type; - if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return; - if (mir_tstrcmp(type, _T("result"))) return; + if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return; + if (mir_tstrcmp(type, L"result")) return; HXML vCard = XmlGetChild(iqNode, "vCard"); if (vCard == NULL) return; @@ -1331,7 +1331,7 @@ void CJabberProto::OnIqResultGetClientAvatar(HXML iqNode, CJabberIqInfo*) debugLogA("<iq/> iqIdResultGetClientAvatar"); - const TCHAR *from = XmlGetAttrValue(iqNode, _T("from")); + const TCHAR *from = XmlGetAttrValue(iqNode, L"from"); if (from == NULL) return; MCONTACT hContact = HContactFromJID(from); @@ -1339,17 +1339,17 @@ void CJabberProto::OnIqResultGetClientAvatar(HXML iqNode, CJabberIqInfo*) return; HXML n = NULL; - if ((type = XmlGetAttrValue(iqNode, _T("type"))) != NULL && !mir_tstrcmp(type, _T("result"))) { + if ((type = XmlGetAttrValue(iqNode, L"type")) != NULL && !mir_tstrcmp(type, L"result")) { HXML queryNode = XmlGetChild(iqNode, "query"); if (queryNode != NULL) { - const TCHAR *xmlns = XmlGetAttrValue(queryNode, _T("xmlns")); + const TCHAR *xmlns = XmlGetAttrValue(queryNode, L"xmlns"); if (!mir_tstrcmp(xmlns, JABBER_FEAT_AVATAR)) n = XmlGetChild(queryNode, "data"); } } if (n != NULL) { - OnIqResultGotAvatar(hContact, n, XmlGetAttrValue(n, _T("mimetype"))); + OnIqResultGotAvatar(hContact, n, XmlGetAttrValue(n, L"mimetype")); return; } @@ -1369,7 +1369,7 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo*) { debugLogA("<iq/> iqIdResultGetServerAvatar"); - const TCHAR *from = XmlGetAttrValue(iqNode, _T("from")); + const TCHAR *from = XmlGetAttrValue(iqNode, L"from"); if (from == NULL) return; @@ -1378,18 +1378,18 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo*) return; HXML n = NULL; - const TCHAR *type = XmlGetAttrValue(iqNode, _T("type")); - if (!mir_tstrcmp(type, _T("result"))) { + const TCHAR *type = XmlGetAttrValue(iqNode, L"type"); + if (!mir_tstrcmp(type, L"result")) { HXML queryNode = XmlGetChild(iqNode, "query"); if (queryNode != NULL) { - const TCHAR *xmlns = XmlGetAttrValue(queryNode, _T("xmlns")); + const TCHAR *xmlns = XmlGetAttrValue(queryNode, L"xmlns"); if (!mir_tstrcmp(xmlns, JABBER_FEAT_SERVER_AVATAR)) n = XmlGetChild(queryNode, "data"); } } if (n != NULL) { - OnIqResultGotAvatar(hContact, n, XmlGetAttrValue(n, _T("mimetype"))); + OnIqResultGotAvatar(hContact, n, XmlGetAttrValue(n, L"mimetype")); return; } @@ -1401,7 +1401,7 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo*) // Try VCard photo m_ThreadInfo->send( - XmlNodeIq(AddIQ(&CJabberProto::OnIqResultGetVCardAvatar, JABBER_IQ_TYPE_GET, szJid)) << XCHILDNS(_T("vCard"), JABBER_FEAT_VCARD_TEMP)); + XmlNodeIq(AddIQ(&CJabberProto::OnIqResultGetVCardAvatar, JABBER_IQ_TYPE_GET, szJid)) << XCHILDNS(L"vCard", JABBER_FEAT_VCARD_TEMP)); } @@ -1414,13 +1414,13 @@ void CJabberProto::OnIqResultGotAvatar(MCONTACT hContact, HXML n, const TCHAR *m int pictureType; if (mimeType != NULL) { - if (!mir_tstrcmp(mimeType, _T("image/jpeg"))) pictureType = PA_FORMAT_JPEG; - else if (!mir_tstrcmp(mimeType, _T("image/png"))) pictureType = PA_FORMAT_PNG; - else if (!mir_tstrcmp(mimeType, _T("image/gif"))) pictureType = PA_FORMAT_GIF; - else if (!mir_tstrcmp(mimeType, _T("image/bmp"))) pictureType = PA_FORMAT_BMP; + if (!mir_tstrcmp(mimeType, L"image/jpeg")) pictureType = PA_FORMAT_JPEG; + else if (!mir_tstrcmp(mimeType, L"image/png")) pictureType = PA_FORMAT_PNG; + else if (!mir_tstrcmp(mimeType, L"image/gif")) pictureType = PA_FORMAT_GIF; + else if (!mir_tstrcmp(mimeType, L"image/bmp")) pictureType = PA_FORMAT_BMP; else { LBL_ErrFormat: - debugLog(_T("Invalid mime type specified for picture: %s"), mimeType); + debugLog(L"Invalid mime type specified for picture: %s", mimeType); return; } } @@ -1448,7 +1448,7 @@ LBL_ErrFormat: GetAvatarFileName(hContact, tszFileName, _countof(tszFileName)); _tcsncpy_s(ai.filename, tszFileName, _TRUNCATE); - FILE *out = _tfopen(tszFileName, _T("wb")); + FILE *out = _tfopen(tszFileName, L"wb"); if (out != NULL) { fwrite(body, resultLen, 1, out); fclose(out); @@ -1456,7 +1456,7 @@ LBL_ErrFormat: char buffer[41]; setString(hContact, "AvatarSaved", bin2hex(digest, sizeof(digest), buffer)); ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, HANDLE(&ai), NULL); - debugLog(_T("Broadcast new avatar: %s"), ai.filename); + debugLog(L"Broadcast new avatar: %s", ai.filename); } else ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, HANDLE(&ai), NULL); } @@ -1469,12 +1469,12 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*) // RECVED: list of bookmarks // ACTION: refresh bookmarks dialog debugLogA("<iq/> iqIdGetBookmarks"); - const TCHAR *type = XmlGetAttrValue(iqNode, _T("type")); + const TCHAR *type = XmlGetAttrValue(iqNode, L"type"); if (type == NULL) return; const TCHAR *jid; - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { if (m_ThreadInfo && !(m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE)) { m_ThreadInfo->jabberServerCaps |= JABBER_CAPS_PRIVATE_STORAGE; EnableMenuItems(true); @@ -1486,23 +1486,23 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*) HXML itemNode; for (int i = 0; itemNode = XmlGetChild(storageNode, i); i++) { if (LPCTSTR name = XmlGetName(itemNode)) { - if (!mir_tstrcmp(name, _T("conference")) && (jid = XmlGetAttrValue(itemNode, _T("jid")))) { + if (!mir_tstrcmp(name, L"conference") && (jid = XmlGetAttrValue(itemNode, L"jid"))) { JABBER_LIST_ITEM *item = ListAdd(LIST_BOOKMARK, jid); - item->name = mir_tstrdup(XmlGetAttrValue(itemNode, _T("name"))); - item->type = mir_tstrdup(_T("conference")); + item->name = mir_tstrdup(XmlGetAttrValue(itemNode, L"name")); + item->type = mir_tstrdup(L"conference"); item->bUseResource = true; item->nick = mir_tstrdup(XPathT(itemNode, "nick")); item->password = mir_tstrdup(XPathT(itemNode, "password")); - const TCHAR *autoJ = XmlGetAttrValue(itemNode, _T("autojoin")); + const TCHAR *autoJ = XmlGetAttrValue(itemNode, L"autojoin"); if (autoJ != NULL) - item->bAutoJoin = !mir_tstrcmp(autoJ, _T("true")) || !mir_tstrcmp(autoJ, _T("1")); + item->bAutoJoin = !mir_tstrcmp(autoJ, L"true") || !mir_tstrcmp(autoJ, L"1"); } - else if (!mir_tstrcmp(name, _T("url")) && (jid = XmlGetAttrValue(itemNode, _T("url")))) { + else if (!mir_tstrcmp(name, L"url") && (jid = XmlGetAttrValue(itemNode, L"url"))) { JABBER_LIST_ITEM *item = ListAdd(LIST_BOOKMARK, jid); item->bUseResource = true; - item->name = mir_tstrdup(XmlGetAttrValue(itemNode, _T("name"))); - item->type = mir_tstrdup(_T("url")); + item->name = mir_tstrdup(XmlGetAttrValue(itemNode, L"name")); + item->type = mir_tstrdup(L"url"); } } } @@ -1512,7 +1512,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*) OnProcessLoginRq(m_ThreadInfo, JABBER_LOGIN_BOOKMARKS); } } - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { if (m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE) { m_ThreadInfo->jabberServerCaps &= ~JABBER_CAPS_PRIVATE_STORAGE; EnableMenuItems(true); @@ -1524,7 +1524,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*) void CJabberProto::SetBookmarkRequest(XmlNodeIq& iq) { HXML query = iq << XQUERY(JABBER_FEAT_PRIVATE_STORAGE); - HXML storage = query << XCHILDNS(_T("storage"), _T("storage:bookmarks")); + HXML storage = query << XCHILDNS(L"storage", L"storage:bookmarks"); LISTFOREACH(i, this, LIST_BOOKMARK) { @@ -1532,22 +1532,22 @@ void CJabberProto::SetBookmarkRequest(XmlNodeIq& iq) if (item == NULL || item->jid == NULL) continue; - if (!mir_tstrcmp(item->type, _T("conference"))) { - HXML itemNode = storage << XCHILD(_T("conference")) << XATTR(_T("jid"), item->jid); + if (!mir_tstrcmp(item->type, L"conference")) { + HXML itemNode = storage << XCHILD(L"conference") << XATTR(L"jid", item->jid); if (item->name) - itemNode << XATTR(_T("name"), item->name); + itemNode << XATTR(L"name", item->name); if (item->bAutoJoin) - itemNode << XATTRI(_T("autojoin"), 1); + itemNode << XATTRI(L"autojoin", 1); if (item->nick) - itemNode << XCHILD(_T("nick"), item->nick); + itemNode << XCHILD(L"nick", item->nick); if (item->password) - itemNode << XCHILD(_T("password"), item->password); + itemNode << XCHILD(L"password", item->password); } - if (!mir_tstrcmp(item->type, _T("url"))) { - HXML itemNode = storage << XCHILD(_T("url")) << XATTR(_T("url"), item->jid); + if (!mir_tstrcmp(item->type, L"url")) { + HXML itemNode = storage << XCHILD(L"url") << XATTR(L"url", item->jid); if (item->name) - itemNode << XATTR(_T("name"), item->name); + itemNode << XATTR(L"name", item->name); } } } @@ -1559,14 +1559,14 @@ void CJabberProto::OnIqResultSetBookmarks(HXML iqNode, CJabberIqInfo*) debugLogA("<iq/> iqIdSetBookmarks"); - const TCHAR *type = XmlGetAttrValue(iqNode, _T("type")); + const TCHAR *type = XmlGetAttrValue(iqNode, L"type"); if (type == NULL) return; - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { UI_SAFE_NOTIFY(m_pDlgBookmarks, WM_JABBER_REFRESH); } - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { HXML errorNode = XmlGetChild(iqNode, "error"); TCHAR *str = JabberErrorMsg(errorNode); MessageBox(NULL, str, TranslateT("Jabber Bookmarks Error"), MB_OK | MB_SETFOREGROUND); @@ -1608,7 +1608,7 @@ void CJabberProto::OnIqResultEntityTime(HXML pIqNode, CJabberIqInfo *pInfo) return; if (pInfo->m_nIqType == JABBER_IQ_TYPE_RESULT) { - LPCTSTR szTzo = XPathFmt(pIqNode, _T("time[@xmlns='%s']/tzo"), JABBER_FEAT_ENTITY_TIME); + LPCTSTR szTzo = XPathFmt(pIqNode, L"time[@xmlns='%s']/tzo", JABBER_FEAT_ENTITY_TIME); if (szTzo && szTzo[0]) { LPCTSTR szMin = _tcschr(szTzo, ':'); int nTz = _ttoi(szTzo) * -2; @@ -1620,7 +1620,7 @@ void CJabberProto::OnIqResultEntityTime(HXML pIqNode, CJabberIqInfo *pInfo) setByte(pInfo->m_hContact, "Timezone", (signed char)nTz); - LPCTSTR szTz = XPathFmt(pIqNode, _T("time[@xmlns='%s']/tz"), JABBER_FEAT_ENTITY_TIME); + LPCTSTR szTz = XPathFmt(pIqNode, L"time[@xmlns='%s']/tz", JABBER_FEAT_ENTITY_TIME); if (szTz) setTString(pInfo->m_hContact, "TzName", szTz); else diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp index 58418c0219..576080d884 100644 --- a/protocols/JabberG/src/jabber_iqid_muc.cpp +++ b/protocols/JabberG/src/jabber_iqid_muc.cpp @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void CJabberProto::SetMucConfig(HXML node, void *from) { if (m_ThreadInfo && from) { - XmlNodeIq iq(_T("set"), SerialNext(), (TCHAR*)from); + XmlNodeIq iq(L"set", SerialNext(), (TCHAR*)from); HXML query = iq << XQUERY(JABBER_FEAT_MUC_OWNER); XmlAddChild(query, node); m_ThreadInfo->send(iq); @@ -42,24 +42,24 @@ void CJabberProto::SetMucConfig(HXML node, void *from) void CJabberProto::OnIqResultGetMuc(HXML iqNode, CJabberIqInfo*) { debugLogA("<iq/> iqIdGetMuc"); - LPCTSTR type = XmlGetAttrValue(iqNode, _T("type")); + LPCTSTR type = XmlGetAttrValue(iqNode, L"type"); if (type == NULL) return; - LPCTSTR from = XmlGetAttrValue(iqNode, _T("from")); + LPCTSTR from = XmlGetAttrValue(iqNode, L"from"); if (from == NULL) return; - if (!mir_tstrcmp(type, _T("result"))) { - HXML queryNode = XmlGetChild(iqNode, _T("query")); + if (!mir_tstrcmp(type, L"result")) { + HXML queryNode = XmlGetChild(iqNode, L"query"); if (queryNode != NULL) { - LPCTSTR str = XmlGetAttrValue(queryNode, _T("xmlns")); + LPCTSTR str = XmlGetAttrValue(queryNode, L"xmlns"); if (!mir_tstrcmp(str, JABBER_FEAT_MUC_OWNER)) { - HXML xNode = XmlGetChild(queryNode, _T("x")); + HXML xNode = XmlGetChild(queryNode, L"x"); if (xNode != NULL) { - str = XmlGetAttrValue(xNode, _T("xmlns")); + str = XmlGetAttrValue(xNode, L"xmlns"); if (!mir_tstrcmp(str, JABBER_FEAT_DATA_FORMS)) //LaunchForm(xNode); - FormCreateDialog(xNode, _T("Jabber Conference Room Configuration"), &CJabberProto::SetMucConfig, mir_tstrdup(from)); + FormCreateDialog(xNode, L"Jabber Conference Room Configuration", &CJabberProto::SetMucConfig, mir_tstrdup(from)); } } } @@ -98,9 +98,9 @@ static void sttFillJidList(HWND hwndDlg) TCHAR tszItemText[JABBER_MAX_JID_LEN + 256]; HXML iqNode = jidListInfo->iqNode; if (iqNode != NULL) { - LPCTSTR from = XmlGetAttrValue(iqNode, _T("from")); + LPCTSTR from = XmlGetAttrValue(iqNode, L"from"); if (from != NULL) { - HXML queryNode = XmlGetChild(iqNode, _T("query")); + HXML queryNode = XmlGetChild(iqNode, L"query"); if (queryNode != NULL) { lvi.mask = LVIF_TEXT | LVIF_PARAM; lvi.iSubItem = 0; @@ -110,20 +110,20 @@ static void sttFillJidList(HWND hwndDlg) if (!itemNode) break; - LPCTSTR jid = XmlGetAttrValue(itemNode, _T("jid")); + LPCTSTR jid = XmlGetAttrValue(itemNode, L"jid"); if (jid != NULL) { lvi.pszText = (TCHAR*)jid; if (jidListInfo->type == MUC_BANLIST) { - LPCTSTR reason = XmlGetText(XmlGetChild(itemNode, _T("reason"))); + LPCTSTR reason = XmlGetText(XmlGetChild(itemNode, L"reason")); if (reason != NULL) { - mir_sntprintf(tszItemText, _T("%s (%s)"), jid, reason); + mir_sntprintf(tszItemText, L"%s (%s)", jid, reason); lvi.pszText = tszItemText; } } else if (jidListInfo->type == MUC_VOICELIST || jidListInfo->type == MUC_MODERATORLIST) { - LPCTSTR nick = XmlGetAttrValue(itemNode, _T("nick")); + LPCTSTR nick = XmlGetAttrValue(itemNode, L"nick"); if (nick != NULL) { - mir_sntprintf(tszItemText, _T("%s (%s)"), nick, jid); + mir_sntprintf(tszItemText, L"%s (%s)", nick, jid); lvi.pszText = tszItemText; } } @@ -239,10 +239,10 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w if ((dat = (JABBER_MUC_JIDLIST_INFO *)lParam) != NULL) { HXML iqNode = dat->iqNode; if (iqNode != NULL) { - LPCTSTR from = XmlGetAttrValue(iqNode, _T("from")); + LPCTSTR from = XmlGetAttrValue(iqNode, L"from"); if (from != NULL) { dat->roomJid = mir_tstrdup(from); - HXML queryNode = XmlGetChild(iqNode, _T("query")); + HXML queryNode = XmlGetChild(iqNode, L"query"); if (queryNode != NULL) { TCHAR *localFrom = mir_tstrdup(from); mir_sntprintf(title, TranslateT("%s, %d items (%s)"), @@ -437,11 +437,11 @@ static void CALLBACK JabberMucJidListCreateDialogApcProc(void* param) if (iqNode == NULL) return; - LPCTSTR from = XmlGetAttrValue(iqNode, _T("from")); + LPCTSTR from = XmlGetAttrValue(iqNode, L"from"); if (from == NULL) return; - HXML queryNode = XmlGetChild(iqNode, _T("query")); + HXML queryNode = XmlGetChild(iqNode, L"query"); if (queryNode == NULL) return; @@ -480,11 +480,11 @@ static void CALLBACK JabberMucJidListCreateDialogApcProc(void* param) void CJabberProto::OnIqResultMucGetJidList(HXML iqNode, JABBER_MUC_JIDLIST_TYPE listType) { - LPCTSTR type = XmlGetAttrValue(iqNode, _T("type")); + LPCTSTR type = XmlGetAttrValue(iqNode, L"type"); if (type == NULL) return; - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { JABBER_MUC_JIDLIST_INFO *jidListInfo = new JABBER_MUC_JIDLIST_INFO; if (jidListInfo != NULL) { jidListInfo->type = listType; diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 4a20f0dc88..c82c57eedd 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -461,7 +461,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) FormatMirVer(r, szTmp); hIcon = Finger_GetClientIcon(szTmp, 0); } - szTmp.Format(_T("%s [%s, %d]"), r->m_tszResourceName, pcli->pfnGetStatusModeDescription(r->m_iStatus, 0), r->m_iPriority); + szTmp.Format(L"%s [%s, %d]", r->m_tszResourceName, pcli->pfnGetStatusModeDescription(r->m_iStatus, 0), r->m_iPriority); Menu_ModifyItem(m_phMenuResourceItems[i], szTmp, hIcon); DestroyIcon(hIcon); } @@ -520,7 +520,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM hContact, LPARAM) if (hContact != NULL && m_bJabberOnline) { ptrT jid(getTStringA(hContact, "jid")); if (jid != NULL) - m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), jid) << XATTR(_T("type"), _T("subscribe"))); + m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", jid) << XATTR(L"type", L"subscribe")); } return 0; } @@ -530,7 +530,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM hContact, LPARAM) if (hContact != NULL && m_bJabberOnline) { ptrT jid(getTStringA(hContact, "jid")); if (jid != NULL) - m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), jid) << XATTR(_T("type"), _T("subscribed"))); + m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", jid) << XATTR(L"type", L"subscribed")); } return 0; } @@ -540,7 +540,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM hContact, LPARAM) if (hContact != NULL && m_bJabberOnline) { ptrT jid(getTStringA(hContact, "jid")); if (jid != NULL) - m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), jid) << XATTR(_T("type"), _T("unsubscribed"))); + m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", jid) << XATTR(L"type", L"unsubscribed")); } return 0; } @@ -552,9 +552,9 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM hContact, LPARAM) JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, ptrT(getTStringA(hContact, "jid"))); if (item != NULL) { - XmlNode p(_T("presence")); XmlAddAttr(p, _T("to"), item->jid); + XmlNode p(L"presence"); XmlAddAttr(p, L"to", item->jid); if (item->getTemp()->m_iStatus == ID_STATUS_ONLINE) - XmlAddAttr(p, _T("type"), _T("unavailable")); + XmlAddAttr(p, L"type", L"unavailable"); m_ThreadInfo->send(p); } return 0; @@ -584,7 +584,7 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM hContact, LPARAM) JABBER_LIST_ITEM *item = new JABBER_LIST_ITEM(); item->jid = mir_tstrdup(roomID); item->name = pcli->pfnGetContactDisplayName(hContact, 0); - item->type = _T("conference"); + item->type = L"conference"; item->nick = getTStringA(hContact, "MyNick"); AddEditBookmark(item); delete item; @@ -973,8 +973,8 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) if (GetResourceCapabilites(jid, TRUE) & JABBER_CAPS_CHATSTATES) m_ThreadInfo->send( - XmlNode(_T("message")) << XATTR(_T("to"), jid) << XATTR(_T("type"), _T("chat")) << XATTRID(SerialNext()) - << XCHILDNS(_T("gone"), JABBER_FEAT_CHATSTATES)); + XmlNode(L"message") << XATTR(L"to", jid) << XATTR(L"type", L"chat") << XATTRID(SerialNext()) + << XCHILDNS(L"gone", JABBER_FEAT_CHATSTATES)); } } } @@ -1083,7 +1083,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM hContact, LPARAM if (item == NULL) return 0; - mir_sntprintf(text, _T("%s/%s"), item->jid, item->nick); + mir_sntprintf(text, L"%s/%s", item->jid, item->nick); jid = text; } else jid = tszJid; diff --git a/protocols/JabberG/src/jabber_message_handlers.cpp b/protocols/JabberG/src/jabber_message_handlers.cpp index 820fa3a3e7..dc7e7f6026 100644 --- a/protocols/JabberG/src/jabber_message_handlers.cpp +++ b/protocols/JabberG/src/jabber_message_handlers.cpp @@ -44,9 +44,9 @@ BOOL CJabberProto::OnMessageError(HXML node, ThreadData*, CJabberMessageInfo* pI TCHAR buf[512]; HXML bodyNode = XmlGetChild(node, "body"); if (bodyNode) - mir_sntprintf(buf, _T("%s:\n%s\n%s"), pInfo->GetFrom(), XmlGetText(bodyNode), szErrText); + mir_sntprintf(buf, L"%s:\n%s\n%s", pInfo->GetFrom(), XmlGetText(bodyNode), szErrText); else - mir_sntprintf(buf, _T("%s:\n%s"), pInfo->GetFrom(), szErrText); + mir_sntprintf(buf, L"%s:\n%s", pInfo->GetFrom(), szErrText); MsgPopup(NULL, buf, TranslateT("Jabber Error")); } @@ -58,8 +58,8 @@ BOOL CJabberProto::OnMessageError(HXML node, ThreadData*, CJabberMessageInfo* pI BOOL CJabberProto::OnMessageIbb(HXML, ThreadData*, CJabberMessageInfo* pInfo) { BOOL bOk = FALSE; - const TCHAR *sid = XmlGetAttrValue(pInfo->GetChildNode(), _T("sid")); - const TCHAR *seq = XmlGetAttrValue(pInfo->GetChildNode(), _T("seq")); + const TCHAR *sid = XmlGetAttrValue(pInfo->GetChildNode(), L"sid"); + const TCHAR *seq = XmlGetAttrValue(pInfo->GetChildNode(), L"seq"); if (sid && seq && XmlGetText(pInfo->GetChildNode())) bOk = OnIbbRecvdData(XmlGetText(pInfo->GetChildNode()), sid, seq); diff --git a/protocols/JabberG/src/jabber_message_manager.cpp b/protocols/JabberG/src/jabber_message_manager.cpp index 6800cfb729..47a683a23e 100644 --- a/protocols/JabberG/src/jabber_message_manager.cpp +++ b/protocols/JabberG/src/jabber_message_manager.cpp @@ -43,9 +43,9 @@ CJabberMessageManager::~CJabberMessageManager() void CJabberMessageManager::FillPermanentHandlers() { - AddPermanentHandler(&CJabberProto::OnMessageError, JABBER_MESSAGE_TYPE_ERROR, JABBER_MESSAGE_PARSE_FROM | JABBER_MESSAGE_PARSE_HCONTACT, NULL, FALSE, _T("error")); - AddPermanentHandler(&CJabberProto::OnMessageIbb, 0, 0, JABBER_FEAT_IBB, FALSE, _T("data")); - AddPermanentHandler(&CJabberProto::OnMessagePubsubEvent, 0, 0, JABBER_FEAT_PUBSUB_EVENT, FALSE, _T("event")); + AddPermanentHandler(&CJabberProto::OnMessageError, JABBER_MESSAGE_TYPE_ERROR, JABBER_MESSAGE_PARSE_FROM | JABBER_MESSAGE_PARSE_HCONTACT, NULL, FALSE, L"error"); + AddPermanentHandler(&CJabberProto::OnMessageIbb, 0, 0, JABBER_FEAT_IBB, FALSE, L"data"); + AddPermanentHandler(&CJabberProto::OnMessagePubsubEvent, 0, 0, JABBER_FEAT_PUBSUB_EVENT, FALSE, L"event"); AddPermanentHandler(&CJabberProto::OnMessageGroupchat, JABBER_MESSAGE_TYPE_GROUPCHAT, JABBER_MESSAGE_PARSE_FROM, NULL, FALSE, NULL); } @@ -57,17 +57,17 @@ bool CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea // have to get all data here, in the loop, because there's always possibility that previous handler modified it CJabberMessageInfo messageInfo; - LPCTSTR szType = XmlGetAttrValue(node, _T("type")); + LPCTSTR szType = XmlGetAttrValue(node, L"type"); if (szType) { - if (!mir_tstrcmpi(szType, _T("normal"))) + if (!mir_tstrcmpi(szType, L"normal")) messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_NORMAL; - else if (!mir_tstrcmpi(szType, _T("error"))) + else if (!mir_tstrcmpi(szType, L"error")) messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_ERROR; - else if (!mir_tstrcmpi(szType, _T("chat"))) + else if (!mir_tstrcmpi(szType, L"chat")) messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_CHAT; - else if (!mir_tstrcmpi(szType, _T("groupchat"))) + else if (!mir_tstrcmpi(szType, L"groupchat")) messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_GROUPCHAT; - else if (!mir_tstrcmpi(szType, _T("headline"))) + else if (!mir_tstrcmpi(szType, L"headline")) messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_HEADLINE; else return false; @@ -80,7 +80,7 @@ bool CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea HXML child = XmlGetChild(node, i); LPCTSTR szTagName = XmlGetName(child); - LPCTSTR szXmlns = XmlGetAttrValue(child, _T("xmlns")); + LPCTSTR szXmlns = XmlGetAttrValue(child, L"xmlns"); if ((!pInfo.m_szXmlns || (szXmlns && !mir_tstrcmp(pInfo.m_szXmlns, szXmlns))) && (!pInfo.m_szTag || !mir_tstrcmp(pInfo.m_szTag, szTagName))) { // node suits handler criteria, call the handler @@ -88,19 +88,19 @@ bool CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea messageInfo.m_szChildTagName = szTagName; messageInfo.m_szChildTagXmlns = szXmlns; messageInfo.m_pUserData = pInfo.m_pUserData; - messageInfo.m_szFrom = XmlGetAttrValue(node, _T("from")); // is necessary for ppro->debugLogA() below, that's why we must parse it even if JABBER_MESSAGE_PARSE_FROM flag is not set + messageInfo.m_szFrom = XmlGetAttrValue(node, L"from"); // is necessary for ppro->debugLogA() below, that's why we must parse it even if JABBER_MESSAGE_PARSE_FROM flag is not set if (pInfo.m_dwParamsToParse & JABBER_MESSAGE_PARSE_ID_STR) - messageInfo.m_szId = XmlGetAttrValue(node, _T("id")); + messageInfo.m_szId = XmlGetAttrValue(node, L"id"); if (pInfo.m_dwParamsToParse & JABBER_IQ_PARSE_TO) - messageInfo.m_szTo = XmlGetAttrValue(node, _T("to")); + messageInfo.m_szTo = XmlGetAttrValue(node, L"to"); if (pInfo.m_dwParamsToParse & JABBER_MESSAGE_PARSE_HCONTACT) messageInfo.m_hContact = ppro->HContactFromJID(messageInfo.m_szFrom); if (messageInfo.m_szFrom) - ppro->debugLog(_T("Handling message from %s"), messageInfo.m_szFrom); + ppro->debugLog(L"Handling message from %s", messageInfo.m_szFrom); if ((ppro->*(pInfo.m_pHandler))(node, pThreadData, &messageInfo)) return true; } diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 0d9b4a7c01..de15d1102b 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -32,11 +32,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void CJabberProto::AddContactToRoster(const TCHAR *jid, const TCHAR *nick, const TCHAR *grpName) { - XmlNodeIq iq(_T("set"), SerialNext()); + XmlNodeIq iq(L"set", SerialNext()); HXML query = iq << XQUERY(JABBER_FEAT_IQ_ROSTER) - << XCHILD(_T("item")) << XATTR(_T("jid"), jid) << XATTR(_T("name"), nick); + << XCHILD(L"item") << XATTR(L"jid", jid) << XATTR(L"name", nick); if (grpName) - query << XCHILD(_T("group"), grpName); + query << XCHILD(L"group", grpName); m_ThreadInfo->send(iq); } @@ -114,7 +114,7 @@ MCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, bool if (JABBER_LIST_ITEM *pItem = ListAdd(LIST_ROSTER, jid, hNewContact)) pItem->bUseResource = _tcschr(szJid, '/') != 0; - debugLog(_T("Create Jabber contact jid=%s, nick=%s"), szJid, nick); + debugLog(L"Create Jabber contact jid=%s, nick=%s", szJid, nick); DBCheckIsTransportedContact(szJid, hNewContact); return hNewContact; } @@ -156,7 +156,7 @@ BOOL CJabberProto::AddDbPresenceEvent(MCONTACT hContact, BYTE btEventType) void CJabberProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen) { - int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName); + int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName); DWORD dwAttributes = GetFileAttributes(pszDest); if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) @@ -176,15 +176,15 @@ void CJabberProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t c db_free(&dbv); } else _i64toa((LONG_PTR)hContact, str, 10); - mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S%s"), JabberSha1(str, buf), szFileType); + mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%S%s", JabberSha1(str, buf), szFileType); } else if (m_ThreadInfo != NULL) { - mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%s@%S avatar%s"), + mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%s@%S avatar%s", m_ThreadInfo->conn.username, m_ThreadInfo->conn.server, szFileType); } else { ptrA res1(getStringA("LoginName")), res2(getStringA("LoginServer")); - mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S@%S avatar%s"), + mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%S@%S avatar%s", (res1) ? (LPSTR)res1 : "noname", (res2) ? (LPSTR)res2 : m_szModuleName, szFileType); } } @@ -286,12 +286,12 @@ struct } static sttCapsNodeToName_Map[] = { - { _T("http://miranda-im.org"), _T("Miranda IM Jabber") }, - { _T("http://miranda-ng.org"), _T("Miranda NG Jabber") }, - { _T("http://www.google.com"), _T("GTalk") }, - { _T("http://mail.google.com"), _T("GMail") }, - { _T("http://talk.google.com/xmpp/bot"), _T("GTalk Bot") }, - { _T("http://www.android.com"), _T("Android") }, + { L"http://miranda-im.org", L"Miranda IM Jabber" }, + { L"http://miranda-ng.org", L"Miranda NG Jabber" }, + { L"http://www.google.com", L"GTalk" }, + { L"http://mail.google.com", L"GMail" }, + { L"http://talk.google.com/xmpp/bot", L"GTalk Bot" }, + { L"http://www.android.com", L"Android" }, }; void CJabberProto::UpdateMirVer(JABBER_LIST_ITEM *item) @@ -300,7 +300,7 @@ void CJabberProto::UpdateMirVer(JABBER_LIST_ITEM *item) if (!hContact) return; - debugLog(_T("JabberUpdateMirVer: for jid %s"), item->jid); + debugLog(L"JabberUpdateMirVer: for jid %s", item->jid); pResourceStatus p(NULL); if (item->resourceMode == RSMODE_LASTSEEN) @@ -320,55 +320,55 @@ void CJabberProto::FormatMirVer(pResourceStatus &resource, CMString &res) // jabber:iq:version info requested and exists? if (resource->m_dwVersionRequestTime && resource->m_tszSoftware) { - debugLog(_T("JabberUpdateMirVer: for iq:version rc %s: %s"), resource->m_tszResourceName, resource->m_tszSoftware); + debugLog(L"JabberUpdateMirVer: for iq:version rc %s: %s", resource->m_tszResourceName, resource->m_tszSoftware); if (!resource->m_tszSoftwareVersion || _tcsstr(resource->m_tszSoftware, resource->m_tszSoftwareVersion)) res = resource->m_tszSoftware; else - res.Format(_T("%s %s"), resource->m_tszSoftware, resource->m_tszSoftwareVersion); + res.Format(L"%s %s", resource->m_tszSoftware, resource->m_tszSoftwareVersion); } // no version info and no caps info? set MirVer = resource name else if (!resource->m_tszCapsNode || !resource->m_tszCapsVer) { - debugLog(_T("JabberUpdateMirVer: for rc %s: %s"), resource->m_tszResourceName, resource->m_tszResourceName); + debugLog(L"JabberUpdateMirVer: for rc %s: %s", resource->m_tszResourceName, resource->m_tszResourceName); if (resource->m_tszResourceName) res = resource->m_tszResourceName; } // XEP-0115 caps mode else { - debugLog(_T("JabberUpdateMirVer: for rc %s: %s#%s"), resource->m_tszResourceName, resource->m_tszCapsNode, resource->m_tszCapsVer); + debugLog(L"JabberUpdateMirVer: for rc %s: %s#%s", resource->m_tszResourceName, resource->m_tszCapsNode, resource->m_tszCapsVer); int i; // search through known software list for (i = 0; i < _countof(sttCapsNodeToName_Map); i++) if (_tcsstr(resource->m_tszCapsNode, sttCapsNodeToName_Map[i].node)) { - res.Format(_T("%s %s"), sttCapsNodeToName_Map[i].name, resource->m_tszCapsVer); + res.Format(L"%s %s", sttCapsNodeToName_Map[i].name, resource->m_tszCapsVer); break; } // unknown software if (i == _countof(sttCapsNodeToName_Map)) - res.Format(_T("%s %s"), resource->m_tszCapsNode, resource->m_tszCapsVer); + res.Format(L"%s %s", resource->m_tszCapsNode, resource->m_tszCapsVer); } // attach additional info for fingerprint plguin - if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_PLATFORMX86) && !_tcsstr(res, _T("x86"))) - res.Append(_T(" x86")); + if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_PLATFORMX86) && !_tcsstr(res, L"x86")) + res.Append(L" x86"); - if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_PLATFORMX64) && !_tcsstr(res, _T("x64"))) - res.Append(_T(" x64")); + if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_PLATFORMX64) && !_tcsstr(res, L"x64")) + res.Append(L" x64"); - if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_SECUREIM) && !_tcsstr(res, _T("(SecureIM)"))) - res.Append(_T(" (SecureIM)")); + if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_SECUREIM) && !_tcsstr(res, L"(SecureIM)")) + res.Append(L" (SecureIM)"); - if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_MIROTR) && !_tcsstr(res, _T("(MirOTR)"))) - res.Append(_T(" (MirOTR)")); + if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_MIROTR) && !_tcsstr(res, L"(MirOTR)")) + res.Append(L" (MirOTR)"); - if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_NEWGPG) && !_tcsstr(res, _T("(New_GPG)"))) - res.Append(_T(" (New_GPG)")); + if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_NEWGPG) && !_tcsstr(res, L"(New_GPG)")) + res.Append(L" (New_GPG)"); if (resource->m_tszResourceName && !_tcsstr(res, resource->m_tszResourceName)) - if (_tcsstr(res, _T("Miranda IM")) || _tcsstr(res, _T("Miranda NG")) || m_options.ShowForeignResourceInMirVer) - res.AppendFormat(_T(" [%s]"), resource->m_tszResourceName); + if (_tcsstr(res, L"Miranda IM") || _tcsstr(res, L"Miranda NG") || m_options.ShowForeignResourceInMirVer) + res.AppendFormat(L" [%s]", resource->m_tszResourceName); } @@ -385,7 +385,7 @@ void CJabberProto::UpdateMirVer(MCONTACT hContact, pResourceStatus &resource) TCHAR szFullJid[JABBER_MAX_JID_LEN]; if (resource->m_tszResourceName && !_tcschr(jid, '/')) - mir_sntprintf(szFullJid, _T("%s/%s"), jid, resource->m_tszResourceName); + mir_sntprintf(szFullJid, L"%s/%s", jid, resource->m_tszResourceName); else mir_tstrncpy(szFullJid, jid, _countof(szFullJid)); setTString(hContact, DBSETTING_DISPLAY_UID, szFullJid); @@ -438,7 +438,7 @@ void CJabberProto::SetContactOfflineStatus(MCONTACT hContact) void CJabberProto::InitPopups(void) { TCHAR desc[256]; - mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Errors")); + mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Errors")); char name[256]; mir_snprintf(name, "%s_%s", m_szModuleName, "Error"); @@ -485,7 +485,7 @@ CMString CJabberProto::ExtractImage(HXML node) if ((nHtml = XmlGetChild(node, "html")) != NULL && (nBody = XmlGetChild(nHtml, "body")) != NULL && (nImg = XmlGetChild(nBody, "img")) != NULL && - (src = XmlGetAttrValue(nImg, _T("src"))) != NULL) { + (src = XmlGetAttrValue(nImg, L"src")) != NULL) { CMString strSrc(src); if (strSrc.Left(11).Compare(L"data:image/") == 0) { @@ -501,8 +501,8 @@ CMString CJabberProto::ExtractImage(HXML node) TCHAR tszTempPath[MAX_PATH], tszTempFile[MAX_PATH]; GetTempPath(_countof(tszTempPath), tszTempPath); - GetTempFileName(tszTempPath, _T("jab"), InterlockedIncrement(&g_nTempFileId), tszTempFile); - _tcsncat_s(tszTempFile, _T("."), 1); + GetTempFileName(tszTempPath, L"jab", InterlockedIncrement(&g_nTempFileId), tszTempFile); + _tcsncat_s(tszTempFile, L".", 1); _tcsncat_s(tszTempFile, ext, ext.GetLength()); HANDLE h = CreateFile(tszTempFile, GENERIC_READ | GENERIC_WRITE, @@ -516,7 +516,7 @@ CMString CJabberProto::ExtractImage(HXML node) WriteFile(h, buffer, bufferLen, &n, NULL); CloseHandle(h); - link = _T(" file:///"); + link = L" file:///"; link += tszTempFile; } } diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index 47cbbd8cfb..aa46e14e58 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -153,10 +153,10 @@ void CNoteList::SaveXml(HXML hXmlParent) CNoteList &me = *this; for (int i = 0; i < getCount(); i++) { - HXML hXmlItem = hXmlParent << XCHILD(_T("note")); - hXmlItem << XATTR(_T("from"), me[i].GetFrom()) << XATTR(_T("tags"), me[i].GetTagsStr()); - hXmlItem << XCHILD(_T("title"), me[i].GetTitle()); - hXmlItem << XCHILD(_T("text"), me[i].GetText()); + HXML hXmlItem = hXmlParent << XCHILD(L"note"); + hXmlItem << XATTR(L"from", me[i].GetFrom()) << XATTR(L"tags", me[i].GetTagsStr()); + hXmlItem << XCHILD(L"title", me[i].GetTitle()); + hXmlItem << XCHILD(L"text", me[i].GetText()); } } @@ -601,9 +601,9 @@ private: void btnSave_OnClick(CCtrlButton *) { - XmlNodeIq iq(_T("set")); + XmlNodeIq iq(L"set"); HXML query = iq << XQUERY(JABBER_FEAT_PRIVATE_STORAGE); - HXML storage = query << XCHILDNS(_T("storage"), JABBER_FEAT_MIRANDA_NOTES); + HXML storage = query << XCHILDNS(L"storage", JABBER_FEAT_MIRANDA_NOTES); m_proto->m_notes.SaveXml(storage); m_proto->m_ThreadInfo->send(iq); EnableControls(); @@ -710,9 +710,9 @@ void CJabberProto::ProcessIncomingNote(CNoteItem *pNote, bool ok) if (ok && pNote->IsNotEmpty()) { m_notes.insert(pNote); - XmlNodeIq iq(_T("set")); + XmlNodeIq iq(L"set"); HXML query = iq << XQUERY(JABBER_FEAT_PRIVATE_STORAGE); - HXML storage = query << XCHILDNS(_T("storage"), JABBER_FEAT_MIRANDA_NOTES); + HXML storage = query << XCHILDNS(L"storage", JABBER_FEAT_MIRANDA_NOTES); m_notes.SaveXml(storage); m_ThreadInfo->send(iq); } @@ -727,7 +727,7 @@ void CJabberProto::ProcessOutgoingNote(CNoteItem *pNote, bool ok) } TCHAR buf[1024]; - mir_sntprintf(buf, _T("Incoming note: %s\n\n%s\nTags: %s"), + mir_sntprintf(buf, L"Incoming note: %s\n\n%s\nTags: %s", pNote->GetTitle(), pNote->GetText(), pNote->GetTagsStr()); JabberCapsBits jcb = GetResourceCapabilites(pNote->GetFrom(), TRUE); @@ -737,20 +737,20 @@ void CJabberProto::ProcessOutgoingNote(CNoteItem *pNote, bool ok) int nMsgId = SerialNext(); - XmlNode m(_T("message")); - m << XATTR(_T("type"), _T("chat")) << XATTR(_T("to"), pNote->GetFrom()) << XATTRID(nMsgId); - m << XCHILD(_T("body"), buf); - HXML hXmlItem = m << XCHILDNS(_T("x"), JABBER_FEAT_MIRANDA_NOTES) << XCHILD(_T("note")); - hXmlItem << XATTR(_T("tags"), pNote->GetTagsStr()); - hXmlItem << XCHILD(_T("title"), pNote->GetTitle()); - hXmlItem << XCHILD(_T("text"), pNote->GetText()); + XmlNode m(L"message"); + m << XATTR(L"type", L"chat") << XATTR(L"to", pNote->GetFrom()) << XATTRID(nMsgId); + m << XCHILD(L"body", buf); + HXML hXmlItem = m << XCHILDNS(L"x", JABBER_FEAT_MIRANDA_NOTES) << XCHILD(L"note"); + hXmlItem << XATTR(L"tags", pNote->GetTagsStr()); + hXmlItem << XCHILD(L"title", pNote->GetTitle()); + hXmlItem << XCHILD(L"text", pNote->GetText()); // message receipts XEP priority if (jcb & JABBER_CAPS_MESSAGE_RECEIPTS) - m << XCHILDNS(_T("request"), JABBER_FEAT_MESSAGE_RECEIPTS); + m << XCHILDNS(L"request", JABBER_FEAT_MESSAGE_RECEIPTS); else if (jcb & JABBER_CAPS_MESSAGE_EVENTS) { - HXML x = m << XCHILDNS(_T("x"), JABBER_FEAT_MESSAGE_EVENTS); - x << XCHILD(_T("delivered")); x << XCHILD(_T("offline")); + HXML x = m << XCHILDNS(L"x", JABBER_FEAT_MESSAGE_EVENTS); + x << XCHILD(L"delivered"); x << XCHILD(L"offline"); } else nMsgId = -1; diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 40f2b4fb61..9c165d1ce8 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -33,194 +33,194 @@ static BOOL(WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0; ///////////////////////////////////////////////////////////////////////////////////////// // JabberRegisterDlgProc - the dialog proc for registering new account -#define STR_FORMAT _T("%s %s@%S:%d?") +#define STR_FORMAT L"%s %s@%S:%d?" struct { TCHAR *szCode; TCHAR *szDescription; } g_LanguageCodes[] = { - { _T("aa"), LPGENT("Afar") }, - { _T("ab"), LPGENT("Abkhazian") }, - { _T("af"), LPGENT("Afrikaans") }, - { _T("ak"), LPGENT("Akan") }, - { _T("sq"), LPGENT("Albanian") }, - { _T("am"), LPGENT("Amharic") }, - { _T("ar"), LPGENT("Arabic") }, - { _T("an"), LPGENT("Aragonese") }, - { _T("hy"), LPGENT("Armenian") }, - { _T("as"), LPGENT("Assamese") }, - { _T("av"), LPGENT("Avaric") }, - { _T("ae"), LPGENT("Avestan") }, - { _T("ay"), LPGENT("Aymara") }, - { _T("az"), LPGENT("Azerbaijani") }, - { _T("ba"), LPGENT("Bashkir") }, - { _T("bm"), LPGENT("Bambara") }, - { _T("eu"), LPGENT("Basque") }, - { _T("be"), LPGENT("Belarusian") }, - { _T("bn"), LPGENT("Bengali") }, - { _T("bh"), LPGENT("Bihari") }, - { _T("bi"), LPGENT("Bislama") }, - { _T("bs"), LPGENT("Bosnian") }, - { _T("br"), LPGENT("Breton") }, - { _T("bg"), LPGENT("Bulgarian") }, - { _T("my"), LPGENT("Burmese") }, - { _T("ca"), LPGENT("Catalan; Valencian") }, - { _T("ch"), LPGENT("Chamorro") }, - { _T("ce"), LPGENT("Chechen") }, - { _T("zh"), LPGENT("Chinese") }, - { _T("cu"), LPGENT("Church Slavic; Old Slavonic") }, - { _T("cv"), LPGENT("Chuvash") }, - { _T("kw"), LPGENT("Cornish") }, - { _T("co"), LPGENT("Corsican") }, - { _T("cr"), LPGENT("Cree") }, - { _T("cs"), LPGENT("Czech") }, - { _T("da"), LPGENT("Danish") }, - { _T("dv"), LPGENT("Divehi; Dhivehi; Maldivian") }, - { _T("nl"), LPGENT("Dutch; Flemish") }, - { _T("dz"), LPGENT("Dzongkha") }, - { _T("en"), LPGENT("English") }, - { _T("eo"), LPGENT("Esperanto") }, - { _T("et"), LPGENT("Estonian") }, - { _T("ee"), LPGENT("Ewe") }, - { _T("fo"), LPGENT("Faroese") }, - { _T("fj"), LPGENT("Fijian") }, - { _T("fi"), LPGENT("Finnish") }, - { _T("fr"), LPGENT("French") }, - { _T("fy"), LPGENT("Western Frisian") }, - { _T("ff"), LPGENT("Fulah") }, - { _T("ka"), LPGENT("Georgian") }, - { _T("de"), LPGENT("German") }, - { _T("gd"), LPGENT("Gaelic; Scottish Gaelic") }, - { _T("ga"), LPGENT("Irish") }, - { _T("gl"), LPGENT("Galician") }, - { _T("gv"), LPGENT("Manx") }, - { _T("el"), LPGENT("Greek, Modern (1453-)") }, - { _T("gn"), LPGENT("Guarani") }, - { _T("gu"), LPGENT("Gujarati") }, - { _T("ht"), LPGENT("Haitian; Haitian Creole") }, - { _T("ha"), LPGENT("Hausa") }, - { _T("he"), LPGENT("Hebrew") }, - { _T("hz"), LPGENT("Herero") }, - { _T("hi"), LPGENT("Hindi") }, - { _T("ho"), LPGENT("Hiri Motu") }, - { _T("hu"), LPGENT("Hungarian") }, - { _T("ig"), LPGENT("Igbo") }, - { _T("is"), LPGENT("Icelandic") }, - { _T("io"), LPGENT("Ido") }, - { _T("ii"), LPGENT("Sichuan Yi") }, - { _T("iu"), LPGENT("Inuktitut") }, - { _T("ie"), LPGENT("Interlingue") }, - { _T("ia"), LPGENT("Interlingua (International Auxiliary Language Association)") }, - { _T("id"), LPGENT("Indonesian") }, - { _T("ik"), LPGENT("Inupiaq") }, - { _T("it"), LPGENT("Italian") }, - { _T("jv"), LPGENT("Javanese") }, - { _T("ja"), LPGENT("Japanese") }, - { _T("kl"), LPGENT("Kalaallisut; Greenlandic") }, - { _T("kn"), LPGENT("Kannada") }, - { _T("ks"), LPGENT("Kashmiri") }, - { _T("kr"), LPGENT("Kanuri") }, - { _T("kk"), LPGENT("Kazakh") }, - { _T("km"), LPGENT("Central Khmer") }, - { _T("ki"), LPGENT("Kikuyu; Gikuyu") }, - { _T("rw"), LPGENT("Kinyarwanda") }, - { _T("ky"), LPGENT("Kirghiz; Kyrgyz") }, - { _T("kv"), LPGENT("Komi") }, - { _T("kg"), LPGENT("Kongo") }, - { _T("ko"), LPGENT("Korean") }, - { _T("kj"), LPGENT("Kuanyama; Kwanyama") }, - { _T("ku"), LPGENT("Kurdish") }, - { _T("lo"), LPGENT("Lao") }, - { _T("la"), LPGENT("Latin") }, - { _T("lv"), LPGENT("Latvian") }, - { _T("li"), LPGENT("Limburgan; Limburger; Limburgish") }, - { _T("ln"), LPGENT("Lingala") }, - { _T("lt"), LPGENT("Lithuanian") }, - { _T("lb"), LPGENT("Luxembourgish; Letzeburgesch") }, - { _T("lu"), LPGENT("Luba-Katanga") }, - { _T("lg"), LPGENT("Ganda") }, - { _T("mk"), LPGENT("Macedonian") }, - { _T("mh"), LPGENT("Marshallese") }, - { _T("ml"), LPGENT("Malayalam") }, - { _T("mi"), LPGENT("Maori") }, - { _T("mr"), LPGENT("Marathi") }, - { _T("ms"), LPGENT("Malay") }, - { _T("mg"), LPGENT("Malagasy") }, - { _T("mt"), LPGENT("Maltese") }, - { _T("mo"), LPGENT("Moldavian") }, - { _T("mn"), LPGENT("Mongolian") }, - { _T("na"), LPGENT("Nauru") }, - { _T("nv"), LPGENT("Navajo; Navaho") }, - { _T("nr"), LPGENT("Ndebele, South; South Ndebele") }, - { _T("nd"), LPGENT("Ndebele, North; North Ndebele") }, - { _T("ng"), LPGENT("Ndonga") }, - { _T("ne"), LPGENT("Nepali") }, - { _T("nn"), LPGENT("Norwegian Nynorsk; Nynorsk, Norwegian") }, - { _T("nb"), LPGENT("Bokmaal, Norwegian; Norwegian Bokmaal") }, - { _T("no"), LPGENT("Norwegian") }, - { _T("ny"), LPGENT("Chichewa; Chewa; Nyanja") }, - { _T("oc"), LPGENT("Occitan (post 1500); Provencal") }, - { _T("oj"), LPGENT("Ojibwa") }, - { _T("or"), LPGENT("Oriya") }, - { _T("om"), LPGENT("Oromo") }, - { _T("os"), LPGENT("Ossetian; Ossetic") }, - { _T("pa"), LPGENT("Panjabi; Punjabi") }, - { _T("fa"), LPGENT("Persian") }, - { _T("pi"), LPGENT("Pali") }, - { _T("pl"), LPGENT("Polish") }, - { _T("pt"), LPGENT("Portuguese") }, - { _T("ps"), LPGENT("Pushto") }, - { _T("qu"), LPGENT("Quechua") }, - { _T("rm"), LPGENT("Romansh") }, - { _T("ro"), LPGENT("Romanian") }, - { _T("rn"), LPGENT("Rundi") }, - { _T("ru"), LPGENT("Russian") }, - { _T("sg"), LPGENT("Sango") }, - { _T("sa"), LPGENT("Sanskrit") }, - { _T("sr"), LPGENT("Serbian") }, - { _T("hr"), LPGENT("Croatian") }, - { _T("si"), LPGENT("Sinhala; Sinhalese") }, - { _T("sk"), LPGENT("Slovak") }, - { _T("sl"), LPGENT("Slovenian") }, - { _T("se"), LPGENT("Northern Sami") }, - { _T("sm"), LPGENT("Samoan") }, - { _T("sn"), LPGENT("Shona") }, - { _T("sd"), LPGENT("Sindhi") }, - { _T("so"), LPGENT("Somali") }, - { _T("st"), LPGENT("Sotho, Southern") }, - { _T("es"), LPGENT("Spanish; Castilian") }, - { _T("sc"), LPGENT("Sardinian") }, - { _T("ss"), LPGENT("Swati") }, - { _T("su"), LPGENT("Sundanese") }, - { _T("sw"), LPGENT("Swahili") }, - { _T("sv"), LPGENT("Swedish") }, - { _T("ty"), LPGENT("Tahitian") }, - { _T("ta"), LPGENT("Tamil") }, - { _T("tt"), LPGENT("Tatar") }, - { _T("te"), LPGENT("Telugu") }, - { _T("tg"), LPGENT("Tajik") }, - { _T("tl"), LPGENT("Tagalog") }, - { _T("th"), LPGENT("Thai") }, - { _T("bo"), LPGENT("Tibetan") }, - { _T("ti"), LPGENT("Tigrinya") }, - { _T("to"), LPGENT("Tonga (Tonga Islands)") }, - { _T("tn"), LPGENT("Tswana") }, - { _T("ts"), LPGENT("Tsonga") }, - { _T("tk"), LPGENT("Turkmen") }, - { _T("tr"), LPGENT("Turkish") }, - { _T("tw"), LPGENT("Twi") }, - { _T("ug"), LPGENT("Uighur; Uyghur") }, - { _T("uk"), LPGENT("Ukrainian") }, - { _T("ur"), LPGENT("Urdu") }, - { _T("uz"), LPGENT("Uzbek") }, - { _T("ve"), LPGENT("Venda") }, - { _T("vi"), LPGENT("Vietnamese") }, - { _T("vo"), LPGENT("Volapuk") }, - { _T("cy"), LPGENT("Welsh") }, - { _T("wa"), LPGENT("Walloon") }, - { _T("wo"), LPGENT("Wolof") }, - { _T("xh"), LPGENT("Xhosa") }, - { _T("yi"), LPGENT("Yiddish") }, - { _T("yo"), LPGENT("Yoruba") }, - { _T("za"), LPGENT("Zhuang; Chuang") }, - { _T("zu"), LPGENT("Zulu") }, + { L"aa", LPGENT("Afar") }, + { L"ab", LPGENT("Abkhazian") }, + { L"af", LPGENT("Afrikaans") }, + { L"ak", LPGENT("Akan") }, + { L"sq", LPGENT("Albanian") }, + { L"am", LPGENT("Amharic") }, + { L"ar", LPGENT("Arabic") }, + { L"an", LPGENT("Aragonese") }, + { L"hy", LPGENT("Armenian") }, + { L"as", LPGENT("Assamese") }, + { L"av", LPGENT("Avaric") }, + { L"ae", LPGENT("Avestan") }, + { L"ay", LPGENT("Aymara") }, + { L"az", LPGENT("Azerbaijani") }, + { L"ba", LPGENT("Bashkir") }, + { L"bm", LPGENT("Bambara") }, + { L"eu", LPGENT("Basque") }, + { L"be", LPGENT("Belarusian") }, + { L"bn", LPGENT("Bengali") }, + { L"bh", LPGENT("Bihari") }, + { L"bi", LPGENT("Bislama") }, + { L"bs", LPGENT("Bosnian") }, + { L"br", LPGENT("Breton") }, + { L"bg", LPGENT("Bulgarian") }, + { L"my", LPGENT("Burmese") }, + { L"ca", LPGENT("Catalan; Valencian") }, + { L"ch", LPGENT("Chamorro") }, + { L"ce", LPGENT("Chechen") }, + { L"zh", LPGENT("Chinese") }, + { L"cu", LPGENT("Church Slavic; Old Slavonic") }, + { L"cv", LPGENT("Chuvash") }, + { L"kw", LPGENT("Cornish") }, + { L"co", LPGENT("Corsican") }, + { L"cr", LPGENT("Cree") }, + { L"cs", LPGENT("Czech") }, + { L"da", LPGENT("Danish") }, + { L"dv", LPGENT("Divehi; Dhivehi; Maldivian") }, + { L"nl", LPGENT("Dutch; Flemish") }, + { L"dz", LPGENT("Dzongkha") }, + { L"en", LPGENT("English") }, + { L"eo", LPGENT("Esperanto") }, + { L"et", LPGENT("Estonian") }, + { L"ee", LPGENT("Ewe") }, + { L"fo", LPGENT("Faroese") }, + { L"fj", LPGENT("Fijian") }, + { L"fi", LPGENT("Finnish") }, + { L"fr", LPGENT("French") }, + { L"fy", LPGENT("Western Frisian") }, + { L"ff", LPGENT("Fulah") }, + { L"ka", LPGENT("Georgian") }, + { L"de", LPGENT("German") }, + { L"gd", LPGENT("Gaelic; Scottish Gaelic") }, + { L"ga", LPGENT("Irish") }, + { L"gl", LPGENT("Galician") }, + { L"gv", LPGENT("Manx") }, + { L"el", LPGENT("Greek, Modern (1453-)") }, + { L"gn", LPGENT("Guarani") }, + { L"gu", LPGENT("Gujarati") }, + { L"ht", LPGENT("Haitian; Haitian Creole") }, + { L"ha", LPGENT("Hausa") }, + { L"he", LPGENT("Hebrew") }, + { L"hz", LPGENT("Herero") }, + { L"hi", LPGENT("Hindi") }, + { L"ho", LPGENT("Hiri Motu") }, + { L"hu", LPGENT("Hungarian") }, + { L"ig", LPGENT("Igbo") }, + { L"is", LPGENT("Icelandic") }, + { L"io", LPGENT("Ido") }, + { L"ii", LPGENT("Sichuan Yi") }, + { L"iu", LPGENT("Inuktitut") }, + { L"ie", LPGENT("Interlingue") }, + { L"ia", LPGENT("Interlingua (International Auxiliary Language Association)") }, + { L"id", LPGENT("Indonesian") }, + { L"ik", LPGENT("Inupiaq") }, + { L"it", LPGENT("Italian") }, + { L"jv", LPGENT("Javanese") }, + { L"ja", LPGENT("Japanese") }, + { L"kl", LPGENT("Kalaallisut; Greenlandic") }, + { L"kn", LPGENT("Kannada") }, + { L"ks", LPGENT("Kashmiri") }, + { L"kr", LPGENT("Kanuri") }, + { L"kk", LPGENT("Kazakh") }, + { L"km", LPGENT("Central Khmer") }, + { L"ki", LPGENT("Kikuyu; Gikuyu") }, + { L"rw", LPGENT("Kinyarwanda") }, + { L"ky", LPGENT("Kirghiz; Kyrgyz") }, + { L"kv", LPGENT("Komi") }, + { L"kg", LPGENT("Kongo") }, + { L"ko", LPGENT("Korean") }, + { L"kj", LPGENT("Kuanyama; Kwanyama") }, + { L"ku", LPGENT("Kurdish") }, + { L"lo", LPGENT("Lao") }, + { L"la", LPGENT("Latin") }, + { L"lv", LPGENT("Latvian") }, + { L"li", LPGENT("Limburgan; Limburger; Limburgish") }, + { L"ln", LPGENT("Lingala") }, + { L"lt", LPGENT("Lithuanian") }, + { L"lb", LPGENT("Luxembourgish; Letzeburgesch") }, + { L"lu", LPGENT("Luba-Katanga") }, + { L"lg", LPGENT("Ganda") }, + { L"mk", LPGENT("Macedonian") }, + { L"mh", LPGENT("Marshallese") }, + { L"ml", LPGENT("Malayalam") }, + { L"mi", LPGENT("Maori") }, + { L"mr", LPGENT("Marathi") }, + { L"ms", LPGENT("Malay") }, + { L"mg", LPGENT("Malagasy") }, + { L"mt", LPGENT("Maltese") }, + { L"mo", LPGENT("Moldavian") }, + { L"mn", LPGENT("Mongolian") }, + { L"na", LPGENT("Nauru") }, + { L"nv", LPGENT("Navajo; Navaho") }, + { L"nr", LPGENT("Ndebele, South; South Ndebele") }, + { L"nd", LPGENT("Ndebele, North; North Ndebele") }, + { L"ng", LPGENT("Ndonga") }, + { L"ne", LPGENT("Nepali") }, + { L"nn", LPGENT("Norwegian Nynorsk; Nynorsk, Norwegian") }, + { L"nb", LPGENT("Bokmaal, Norwegian; Norwegian Bokmaal") }, + { L"no", LPGENT("Norwegian") }, + { L"ny", LPGENT("Chichewa; Chewa; Nyanja") }, + { L"oc", LPGENT("Occitan (post 1500); Provencal") }, + { L"oj", LPGENT("Ojibwa") }, + { L"or", LPGENT("Oriya") }, + { L"om", LPGENT("Oromo") }, + { L"os", LPGENT("Ossetian; Ossetic") }, + { L"pa", LPGENT("Panjabi; Punjabi") }, + { L"fa", LPGENT("Persian") }, + { L"pi", LPGENT("Pali") }, + { L"pl", LPGENT("Polish") }, + { L"pt", LPGENT("Portuguese") }, + { L"ps", LPGENT("Pushto") }, + { L"qu", LPGENT("Quechua") }, + { L"rm", LPGENT("Romansh") }, + { L"ro", LPGENT("Romanian") }, + { L"rn", LPGENT("Rundi") }, + { L"ru", LPGENT("Russian") }, + { L"sg", LPGENT("Sango") }, + { L"sa", LPGENT("Sanskrit") }, + { L"sr", LPGENT("Serbian") }, + { L"hr", LPGENT("Croatian") }, + { L"si", LPGENT("Sinhala; Sinhalese") }, + { L"sk", LPGENT("Slovak") }, + { L"sl", LPGENT("Slovenian") }, + { L"se", LPGENT("Northern Sami") }, + { L"sm", LPGENT("Samoan") }, + { L"sn", LPGENT("Shona") }, + { L"sd", LPGENT("Sindhi") }, + { L"so", LPGENT("Somali") }, + { L"st", LPGENT("Sotho, Southern") }, + { L"es", LPGENT("Spanish; Castilian") }, + { L"sc", LPGENT("Sardinian") }, + { L"ss", LPGENT("Swati") }, + { L"su", LPGENT("Sundanese") }, + { L"sw", LPGENT("Swahili") }, + { L"sv", LPGENT("Swedish") }, + { L"ty", LPGENT("Tahitian") }, + { L"ta", LPGENT("Tamil") }, + { L"tt", LPGENT("Tatar") }, + { L"te", LPGENT("Telugu") }, + { L"tg", LPGENT("Tajik") }, + { L"tl", LPGENT("Tagalog") }, + { L"th", LPGENT("Thai") }, + { L"bo", LPGENT("Tibetan") }, + { L"ti", LPGENT("Tigrinya") }, + { L"to", LPGENT("Tonga (Tonga Islands)") }, + { L"tn", LPGENT("Tswana") }, + { L"ts", LPGENT("Tsonga") }, + { L"tk", LPGENT("Turkmen") }, + { L"tr", LPGENT("Turkish") }, + { L"tw", LPGENT("Twi") }, + { L"ug", LPGENT("Uighur; Uyghur") }, + { L"uk", LPGENT("Ukrainian") }, + { L"ur", LPGENT("Urdu") }, + { L"uz", LPGENT("Uzbek") }, + { L"ve", LPGENT("Venda") }, + { L"vi", LPGENT("Vietnamese") }, + { L"vo", LPGENT("Volapuk") }, + { L"cy", LPGENT("Welsh") }, + { L"wa", LPGENT("Walloon") }, + { L"wo", LPGENT("Wolof") }, + { L"xh", LPGENT("Xhosa") }, + { L"yi", LPGENT("Yiddish") }, + { L"yo", LPGENT("Yoruba") }, + { L"za", LPGENT("Zhuang; Chuang") }, + { L"zu", LPGENT("Zulu") }, { NULL, NULL } }; @@ -331,7 +331,7 @@ CCtrlEditJid::CCtrlEditJid(CDlgBase* dlg, int ctrlId): static void sttStoreJidFromUI(CJabberProto *ppro, CCtrlEdit &txtUsername, CCtrlCombo &cbServer) { - ppro->setTString("jid", CMString(FORMAT, _T("%s@%s"), ptrT(txtUsername.GetText()), ptrT(cbServer.GetText()))); + ppro->setTString("jid", CMString(FORMAT, L"%s@%s", ptrT(txtUsername.GetText()), ptrT(cbServer.GetText()))); } class CDlgOptAccount : public CJabberDlgBase @@ -388,22 +388,22 @@ public: m_gotservers(false), m_lnkServers(this, IDC_LINK_PUBLIC_SERVER, "https://xmpp.net/directory.php") { - CreateLink(m_txtUsername, "LoginName", _T("")); + CreateLink(m_txtUsername, "LoginName", L""); CreateLink(m_txtPriority, "Priority", DBVT_DWORD, 0); CreateLink(m_chkSavePassword, proto->m_options.SavePassword); - CreateLink(m_cbResource, "Resource", _T("Miranda")); + CreateLink(m_cbResource, "Resource", L"Miranda"); CreateLink(m_chkUseHostnameAsResource, proto->m_options.HostNameAsResource); CreateLink(m_chkUseDomainLogin, proto->m_options.UseDomainLogin); - CreateLink(m_cbServer, "LoginServer", _T("jabber.org")); + CreateLink(m_cbServer, "LoginServer", L"jabber.org"); CreateLink(m_txtPort, "Port", DBVT_WORD, 5222); CreateLink(m_chkUseSsl, proto->m_options.UseSSL); CreateLink(m_chkUseTls, proto->m_options.UseTLS); CreateLink(m_chkManualHost, proto->m_options.ManualConnect); - CreateLink(m_txtManualHost, "ManualHost", _T("")); + CreateLink(m_txtManualHost, "ManualHost", L""); CreateLink(m_txtManualPort, "ManualPort", DBVT_WORD, 0); CreateLink(m_chkKeepAlive, proto->m_options.KeepAlive); CreateLink(m_chkAutoDeleteContacts, proto->m_options.RosterSync); - CreateLink(m_txtUserDirectory, "Jud", _T("")); + CreateLink(m_txtUserDirectory, "Jud", L""); // Bind events m_cbServer.OnDropdown = Callback(this, &CDlgOptAccount::cbServer_OnDropdown); @@ -434,7 +434,7 @@ protected: m_cbServer.AddString(TranslateT("Loading...")); // fill predefined resources - TCHAR *szResources[] = { _T("Home"), _T("Work"), _T("Office"), _T("Miranda") }; + TCHAR *szResources[] = { L"Home", L"Work", L"Office", L"Miranda" }; for (int i = 0; i < _countof(szResources); i++) m_cbResource.AddString(szResources[i]); @@ -450,7 +450,7 @@ protected: m_cbResource.AddString(tszResource); m_cbResource.SetText(tszResource); } - else m_cbResource.SetText(_T("Miranda")); + else m_cbResource.SetText(L"Miranda"); for (int i = 0; g_LanguageCodes[i].szCode; i++) { int iItem = m_cbLocale.AddString(TranslateTS(g_LanguageCodes[i].szDescription), (LPARAM)g_LanguageCodes[i].szCode); @@ -571,8 +571,8 @@ private: if (res == IDYES) m_proto->m_ThreadInfo->send( - XmlNodeIq(_T("set"), m_proto->SerialNext(), m_proto->m_szJabberJID) << XQUERY(JABBER_FEAT_REGISTER) - << XCHILD(_T("remove"))); + XmlNodeIq(L"set", m_proto->SerialNext(), m_proto->m_szJabberJID) << XQUERY(JABBER_FEAT_REGISTER) + << XCHILD(L"remove")); } void btnChangePassword_OnClick(CCtrlButton *) @@ -631,8 +631,8 @@ private: m_txtUsername.Enable(!checked); m_chkSavePassword.Enable(!checked); if (checked) { - m_txtPassword.SetText(_T("")); - m_txtUsername.SetText(_T("")); + m_txtPassword.SetText(L""); + m_txtUsername.SetText(L""); m_chkSavePassword.SetState(BST_CHECKED); } } @@ -697,8 +697,8 @@ private: if (!n) break; - if (!mir_tstrcmp(XmlGetName(n), _T("item"))) - if (const TCHAR *jid = XmlGetAttrValue(n, _T("jid"))) + if (!mir_tstrcmp(XmlGetName(n), L"item")) + if (const TCHAR *jid = XmlGetAttrValue(n, L"jid")) if (m_cbServer.FindString(jid, -1, true) == CB_ERR) m_cbServer.AddString(jid); } @@ -732,7 +732,7 @@ private: TCHAR *buf = mir_a2t(result->pData); XmlNode node(buf, NULL, NULL); if (node) { - HXML queryNode = XmlGetChild(node, _T("query")); + HXML queryNode = XmlGetChild(node, L"query"); SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)queryNode); bIsError = false; } @@ -776,41 +776,41 @@ public: CreateLink(m_chkDirect, proto->m_options.BsDirect); CreateLink(m_chkDirectManual, proto->m_options.BsDirectManual); CreateLink(m_chkProxy, proto->m_options.BsProxyManual); - CreateLink(m_txtDirect, "BsDirectAddr", _T("")); - CreateLink(m_txtProxy, "BsProxyServer", _T("")); + CreateLink(m_txtDirect, "BsDirectAddr", L""); + CreateLink(m_txtProxy, "BsProxyServer", L""); m_chkDirect.OnChange = m_chkDirectManual.OnChange = Callback(this, &CDlgOptAdvanced::chkDirect_OnChange); m_chkProxy.OnChange = Callback(this, &CDlgOptAdvanced::chkProxy_OnChange); - m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Send messages slower, but with full acknowledgment"), m_proto->m_options.MsgAck); - m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Enable avatars"), m_proto->m_options.EnableAvatars); - m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Log chat state changes"), m_proto->m_options.LogChatstates); - m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Log presence subscription state changes"), m_proto->m_options.LogPresence); - m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Log presence errors"), m_proto->m_options.LogPresenceErrors); - m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Enable user moods receiving"), m_proto->m_options.EnableUserMood); - m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Enable user tunes receiving"), m_proto->m_options.EnableUserTune); - m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Enable user activity receiving"), m_proto->m_options.EnableUserActivity); - m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Receive notes"), m_proto->m_options.AcceptNotes); - m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Automatically save received notes"), m_proto->m_options.AutosaveNotes); - m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Enable server-side history"), m_proto->m_options.EnableMsgArchive); - - m_otvOptions.AddOption(LPGENT("Server options") _T("/") LPGENT("Disable SASL authentication (for old servers)"), m_proto->m_options.Disable3920auth); - m_otvOptions.AddOption(LPGENT("Server options") _T("/") LPGENT("Enable stream compression (if possible)"), m_proto->m_options.EnableZlib); - - m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Enable remote controlling (from another resource of same JID only)"), m_proto->m_options.EnableRemoteControl); - m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Show transport agents on contact list"), m_proto->m_options.ShowTransport); - m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Automatically add contact when accept authorization"), m_proto->m_options.AutoAdd); - m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Automatically accept authorization requests"), m_proto->m_options.AutoAcceptAuthorization); - m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Fix incorrect timestamps in incoming messages"), m_proto->m_options.FixIncorrectTimestamps); - m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Disable frame"), m_proto->m_options.DisableFrame); - m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Enable XMPP link processing (requires AssocMgr)"), m_proto->m_options.ProcessXMPPLinks); - m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Keep contacts assigned to local groups (ignore roster group)"), m_proto->m_options.IgnoreRosterGroups); - - m_otvOptions.AddOption(LPGENT("Security") _T("/") LPGENT("Allow servers to request version (XEP-0092)"), m_proto->m_options.AllowVersionRequests); - m_otvOptions.AddOption(LPGENT("Security") _T("/") LPGENT("Show information about operating system in version replies"), m_proto->m_options.ShowOSVersion); - m_otvOptions.AddOption(LPGENT("Security") _T("/") LPGENT("Accept only in band incoming filetransfers (don't disclose own IP)"), m_proto->m_options.BsOnlyIBB); - m_otvOptions.AddOption(LPGENT("Security") _T("/") LPGENT("Accept HTTP Authentication requests (XEP-0070)"), m_proto->m_options.AcceptHttpAuth); + m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Send messages slower, but with full acknowledgment"), m_proto->m_options.MsgAck); + m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Enable avatars"), m_proto->m_options.EnableAvatars); + m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Log chat state changes"), m_proto->m_options.LogChatstates); + m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Log presence subscription state changes"), m_proto->m_options.LogPresence); + m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Log presence errors"), m_proto->m_options.LogPresenceErrors); + m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Enable user moods receiving"), m_proto->m_options.EnableUserMood); + m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Enable user tunes receiving"), m_proto->m_options.EnableUserTune); + m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Enable user activity receiving"), m_proto->m_options.EnableUserActivity); + m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Receive notes"), m_proto->m_options.AcceptNotes); + m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Automatically save received notes"), m_proto->m_options.AutosaveNotes); + m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Enable server-side history"), m_proto->m_options.EnableMsgArchive); + + m_otvOptions.AddOption(LPGENT("Server options") L"/" LPGENT("Disable SASL authentication (for old servers)"), m_proto->m_options.Disable3920auth); + m_otvOptions.AddOption(LPGENT("Server options") L"/" LPGENT("Enable stream compression (if possible)"), m_proto->m_options.EnableZlib); + + m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Enable remote controlling (from another resource of same JID only)"), m_proto->m_options.EnableRemoteControl); + m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Show transport agents on contact list"), m_proto->m_options.ShowTransport); + m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Automatically add contact when accept authorization"), m_proto->m_options.AutoAdd); + m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Automatically accept authorization requests"), m_proto->m_options.AutoAcceptAuthorization); + m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Fix incorrect timestamps in incoming messages"), m_proto->m_options.FixIncorrectTimestamps); + m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Disable frame"), m_proto->m_options.DisableFrame); + m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Enable XMPP link processing (requires AssocMgr)"), m_proto->m_options.ProcessXMPPLinks); + m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Keep contacts assigned to local groups (ignore roster group)"), m_proto->m_options.IgnoreRosterGroups); + + m_otvOptions.AddOption(LPGENT("Security") L"/" LPGENT("Allow servers to request version (XEP-0092)"), m_proto->m_options.AllowVersionRequests); + m_otvOptions.AddOption(LPGENT("Security") L"/" LPGENT("Show information about operating system in version replies"), m_proto->m_options.ShowOSVersion); + m_otvOptions.AddOption(LPGENT("Security") L"/" LPGENT("Accept only in band incoming filetransfers (don't disclose own IP)"), m_proto->m_options.BsOnlyIBB); + m_otvOptions.AddOption(LPGENT("Security") L"/" LPGENT("Accept HTTP Authentication requests (XEP-0070)"), m_proto->m_options.AcceptHttpAuth); } void OnInitDialog() @@ -896,21 +896,21 @@ public: m_txtQuit(this, IDC_TXT_QUIT), m_otvOptions(this, IDC_OPTTREE) { - CreateLink(m_txtAltNick, "GcAltNick", _T("")); + CreateLink(m_txtAltNick, "GcAltNick", L""); CreateLink(m_txtSlap, "GcMsgSlap", TranslateTS(JABBER_GC_MSG_SLAP)); CreateLink(m_txtQuit, "GcMsgQuit", TranslateTS(JABBER_GC_MSG_QUIT)); - m_otvOptions.AddOption(LPGENT("General") _T("/") LPGENT("Autoaccept multiuser chat invitations"), m_proto->m_options.AutoAcceptMUC); - m_otvOptions.AddOption(LPGENT("General") _T("/") LPGENT("Automatically join bookmarks on login"), m_proto->m_options.AutoJoinBookmarks); - m_otvOptions.AddOption(LPGENT("General") _T("/") LPGENT("Automatically join conferences on login"), m_proto->m_options.AutoJoinConferences); - m_otvOptions.AddOption(LPGENT("General") _T("/") LPGENT("Hide conference windows at startup"), m_proto->m_options.AutoJoinHidden); - m_otvOptions.AddOption(LPGENT("General") _T("/") LPGENT("Do not show multiuser chat invitations"), m_proto->m_options.IgnoreMUCInvites); - m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Ban notifications"), m_proto->m_options.GcLogBans); - m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Room configuration changes"), m_proto->m_options.GcLogConfig); - m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Affiliation changes"), m_proto->m_options.GcLogAffiliations); - m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Role changes"), m_proto->m_options.GcLogRoles); - m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Status changes"), m_proto->m_options.GcLogStatuses); - m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Don't notify history messages"), m_proto->m_options.GcLogChatHistory); + m_otvOptions.AddOption(LPGENT("General") L"/" LPGENT("Autoaccept multiuser chat invitations"), m_proto->m_options.AutoAcceptMUC); + m_otvOptions.AddOption(LPGENT("General") L"/" LPGENT("Automatically join bookmarks on login"), m_proto->m_options.AutoJoinBookmarks); + m_otvOptions.AddOption(LPGENT("General") L"/" LPGENT("Automatically join conferences on login"), m_proto->m_options.AutoJoinConferences); + m_otvOptions.AddOption(LPGENT("General") L"/" LPGENT("Hide conference windows at startup"), m_proto->m_options.AutoJoinHidden); + m_otvOptions.AddOption(LPGENT("General") L"/" LPGENT("Do not show multiuser chat invitations"), m_proto->m_options.IgnoreMUCInvites); + m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Ban notifications"), m_proto->m_options.GcLogBans); + m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Room configuration changes"), m_proto->m_options.GcLogConfig); + m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Affiliation changes"), m_proto->m_options.GcLogAffiliations); + m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Role changes"), m_proto->m_options.GcLogRoles); + m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Status changes"), m_proto->m_options.GcLogStatuses); + m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Don't notify history messages"), m_proto->m_options.GcLogChatHistory); } }; @@ -1000,16 +1000,16 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*) if (query == NULL) return; int i = 1; while (TRUE) { - HXML item = XmlGetNthChild(query, _T("item"), i++); + HXML item = XmlGetNthChild(query, L"item", i++); if (item == NULL) break; - const TCHAR *jid = XmlGetAttrValue(item, _T("jid")); + const TCHAR *jid = XmlGetAttrValue(item, L"jid"); if (jid == NULL) continue; - const TCHAR *name = XmlGetAttrValue(item, _T("name")); - const TCHAR *subscription = XmlGetAttrValue(item, _T("subscription")); + const TCHAR *name = XmlGetAttrValue(item, L"name"); + const TCHAR *subscription = XmlGetAttrValue(item, L"subscription"); const TCHAR *group = XmlGetText(XmlGetChild(item, "group")); _RosterInsertListItem(hList, jid, name, group, subscription, TRUE); } @@ -1050,15 +1050,15 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*) XmlNodeIq iq(AddIQ(&CJabberProto::_RosterHandleGetRequest, JABBER_IQ_TYPE_SET)); - HXML query = iq << XCHILDNS(_T("query"), JABBER_FEAT_IQ_ROSTER); + HXML query = iq << XCHILDNS(L"query", JABBER_FEAT_IQ_ROSTER); int itemCount = 0; int ListItemCount = ListView_GetItemCount(hList); for (int index = 0; index < ListItemCount; index++) { - TCHAR jid[JABBER_MAX_JID_LEN] = _T(""); - TCHAR name[260] = _T(""); - TCHAR group[260] = _T(""); - TCHAR subscr[260] = _T(""); + TCHAR jid[JABBER_MAX_JID_LEN] = L""; + TCHAR name[260] = L""; + TCHAR group[260] = L""; + TCHAR subscr[260] = L""; ListView_GetItemText(hList, index, 0, jid, _countof(jid)); ListView_GetItemText(hList, index, 1, name, _countof(name)); ListView_GetItemText(hList, index, 2, group, _countof(group)); @@ -1067,17 +1067,17 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*) BOOL bRemove = !ListView_GetCheckState(hList, index); if (itemRoster && bRemove) { //delete item - query << XCHILD(_T("item")) << XATTR(_T("jid"), jid) << XATTR(_T("subscription"), _T("remove")); + query << XCHILD(L"item") << XATTR(L"jid", jid) << XATTR(L"subscription", L"remove"); itemCount++; } else if (!bRemove) { BOOL bPushed = itemRoster ? TRUE : FALSE; if (!bPushed) { - const TCHAR *rosterName = XmlGetAttrValue(itemRoster, _T("name")); + const TCHAR *rosterName = XmlGetAttrValue(itemRoster, L"name"); if ((rosterName != NULL || name[0] != 0) && mir_tstrcmpi(rosterName, name)) bPushed = TRUE; if (!bPushed) { - rosterName = XmlGetAttrValue(itemRoster, _T("subscription")); + rosterName = XmlGetAttrValue(itemRoster, L"subscription"); if ((rosterName != NULL || subscr[0] != 0) && mir_tstrcmpi(rosterName, subscr)) bPushed = TRUE; } @@ -1088,12 +1088,12 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*) } } if (bPushed) { - HXML item = query << XCHILD(_T("item")); + HXML item = query << XCHILD(L"item"); if (mir_tstrlen(group)) - item << XCHILD(_T("group"), group); + item << XCHILD(L"group", group); if (mir_tstrlen(name)) - item << XATTR(_T("name"), name); - item << XATTR(_T("jid"), jid) << XATTR(_T("subscription"), subscr[0] ? subscr : _T("none")); + item << XATTR(L"name", name); + item << XATTR(L"jid", jid) << XATTR(L"subscription", subscr[0] ? subscr : L"none"); itemCount++; } } @@ -1120,7 +1120,7 @@ void CJabberProto::_RosterSendRequest(HWND hwndDlg, BYTE rrAction) m_ThreadInfo->send( XmlNodeIq(AddIQ(&CJabberProto::_RosterHandleGetRequest, JABBER_IQ_TYPE_GET)) - << XCHILDNS(_T("query"), JABBER_FEAT_IQ_ROSTER)); + << XCHILDNS(L"query", JABBER_FEAT_IQ_ROSTER)); } static void _RosterItemEditEnd(HWND hEditor, ROSTEREDITDAT * edat, BOOL bCancel) @@ -1179,7 +1179,7 @@ void CJabberProto::_RosterExportToFile(HWND hwndDlg) TCHAR filename[MAX_PATH] = { 0 }; TCHAR filter[MAX_PATH]; - mir_sntprintf(filter, _T("%s (*.xml)%c*.xml%c%c"), TranslateT("XML for MS Excel (UTF-8 encoded)"), 0, 0, 0); + mir_sntprintf(filter, L"%s (*.xml)%c*.xml%c%c", TranslateT("XML for MS Excel (UTF-8 encoded)"), 0, 0, 0); OPENFILENAME ofn = { 0 }; ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400; ofn.hwndOwner = hwndDlg; @@ -1189,41 +1189,41 @@ void CJabberProto::_RosterExportToFile(HWND hwndDlg) ofn.Flags = OFN_HIDEREADONLY; ofn.nMaxFile = _countof(filename); ofn.nMaxFileTitle = MAX_PATH; - ofn.lpstrDefExt = _T("xml"); + ofn.lpstrDefExt = L"xml"; if (!GetSaveFileName(&ofn)) return; - FILE * fp = fopent(filename, _T("w")); + FILE * fp = fopent(filename, L"w"); if (!fp) return; HWND hList = GetDlgItem(hwndDlg, IDC_ROSTER); int ListItemCount = ListView_GetItemCount(hList); - XmlNode root(_T("Workbook")); - root << XATTR(_T("xmlns"), _T("urn:schemas-microsoft-com:office:spreadsheet")) - << XATTR(_T("xmlns:o"), _T("urn:schemas-microsoft-com:office:office")) - << XATTR(_T("xmlns:x"), _T("urn:schemas-microsoft-com:office:excel")) - << XATTR(_T("xmlns:ss"), _T("urn:schemas-microsoft-com:office:spreadsheet")) - << XATTR(_T("xmlns:html"), _T("http://www.w3.org/TR/REC-html40")); - root << XCHILD(_T("ExcelWorkbook")) - << XATTR(_T("xmlns"), _T("urn:schemas-microsoft-com:office:excel")); - HXML table = root << XCHILD(_T("Worksheet")) << XATTR(_T("ss:Name"), _T("Exported roster")) - << XCHILD(_T("Table")); + XmlNode root(L"Workbook"); + root << XATTR(L"xmlns", L"urn:schemas-microsoft-com:office:spreadsheet") + << XATTR(L"xmlns:o", L"urn:schemas-microsoft-com:office:office") + << XATTR(L"xmlns:x", L"urn:schemas-microsoft-com:office:excel") + << XATTR(L"xmlns:ss", L"urn:schemas-microsoft-com:office:spreadsheet") + << XATTR(L"xmlns:html", L"http://www.w3.org/TR/REC-html40"); + root << XCHILD(L"ExcelWorkbook") + << XATTR(L"xmlns", L"urn:schemas-microsoft-com:office:excel"); + HXML table = root << XCHILD(L"Worksheet") << XATTR(L"ss:Name", L"Exported roster") + << XCHILD(L"Table"); for (int index = 0; index < ListItemCount; index++) { - TCHAR jid[JABBER_MAX_JID_LEN] = _T(""); - TCHAR name[260] = _T(""); - TCHAR group[260] = _T(""); - TCHAR subscr[260] = _T(""); + TCHAR jid[JABBER_MAX_JID_LEN] = L""; + TCHAR name[260] = L""; + TCHAR group[260] = L""; + TCHAR subscr[260] = L""; ListView_GetItemText(hList, index, 0, jid, _countof(jid)); ListView_GetItemText(hList, index, 1, name, _countof(name)); ListView_GetItemText(hList, index, 2, group, _countof(group)); ListView_GetItemText(hList, index, 3, subscr, _countof(subscr)); - HXML node = table << XCHILD(_T("Row")); - node << XCHILD(_T("Cell")) << XCHILD(_T("Data"), _T("+")) << XATTR(_T("ss:Type"), _T("String")); - node << XCHILD(_T("Cell")) << XCHILD(_T("Data"), jid) << XATTR(_T("ss:Type"), _T("String")); - node << XCHILD(_T("Cell")) << XCHILD(_T("Data"), name) << XATTR(_T("ss:Type"), _T("String")); - node << XCHILD(_T("Cell")) << XCHILD(_T("Data"), group) << XATTR(_T("ss:Type"), _T("String")); - node << XCHILD(_T("Cell")) << XCHILD(_T("Data"), subscr) << XATTR(_T("ss:Type"), _T("String")); + HXML node = table << XCHILD(L"Row"); + node << XCHILD(L"Cell") << XCHILD(L"Data", L"+") << XATTR(L"ss:Type", L"String"); + node << XCHILD(L"Cell") << XCHILD(L"Data", jid) << XATTR(L"ss:Type", L"String"); + node << XCHILD(L"Cell") << XCHILD(L"Data", name) << XATTR(L"ss:Type", L"String"); + node << XCHILD(L"Cell") << XCHILD(L"Data", group) << XATTR(L"ss:Type", L"String"); + node << XCHILD(L"Cell") << XCHILD(L"Data", subscr) << XATTR(L"ss:Type", L"String"); } @@ -1274,7 +1274,7 @@ void CJabberProto::_RosterImportFromFile(HWND hwndDlg) int nBytesProcessed = 0; XmlNode node(newBuf, &nBytesProcessed, NULL); if (node) { - HXML Workbook = XmlGetChild(node, _T("Workbook")); + HXML Workbook = XmlGetChild(node, L"Workbook"); if (Workbook) { HXML Worksheet = XmlGetChild(Workbook, "Worksheet"); if (Worksheet) { @@ -1283,7 +1283,7 @@ void CJabberProto::_RosterImportFromFile(HWND hwndDlg) int index = 1; HWND hList = GetDlgItem(hwndDlg, IDC_ROSTER); while (TRUE) { - HXML Row = XmlGetNthChild(Table, _T("Row"), index++); + HXML Row = XmlGetNthChild(Table, L"Row", index++); if (!Row) break; @@ -1292,13 +1292,13 @@ void CJabberProto::_RosterImportFromFile(HWND hwndDlg) const TCHAR *name = NULL; const TCHAR *group = NULL; const TCHAR *subscr = NULL; - HXML Cell = XmlGetNthChild(Row, _T("Cell"), 1); + HXML Cell = XmlGetNthChild(Row, L"Cell", 1); HXML Data = (Cell) ? XmlGetChild(Cell, "Data") : XmlNode(); if (Data) { - if (!mir_tstrcmpi(XmlGetText(Data), _T("+"))) bAdd = TRUE; - else if (mir_tstrcmpi(XmlGetText(Data), _T("-"))) continue; + if (!mir_tstrcmpi(XmlGetText(Data), L"+")) bAdd = TRUE; + else if (mir_tstrcmpi(XmlGetText(Data), L"-")) continue; - Cell = XmlGetNthChild(Row, _T("Cell"), 2); + Cell = XmlGetNthChild(Row, L"Cell", 2); if (Cell) Data = XmlGetChild(Cell, "Data"); else Data = NULL; if (Data) { @@ -1306,17 +1306,17 @@ void CJabberProto::_RosterImportFromFile(HWND hwndDlg) if (!jid || mir_tstrlen(jid) == 0) continue; } - Cell = XmlGetNthChild(Row, _T("Cell"), 3); + Cell = XmlGetNthChild(Row, L"Cell", 3); if (Cell) Data = XmlGetChild(Cell, "Data"); else Data = NULL; if (Data) name = XmlGetText(Data); - Cell = XmlGetNthChild(Row, _T("Cell"), 4); + Cell = XmlGetNthChild(Row, L"Cell", 4); if (Cell) Data = XmlGetChild(Cell, "Data"); else Data = NULL; if (Data) group = XmlGetText(Data); - Cell = XmlGetNthChild(Row, _T("Cell"), 5); + Cell = XmlGetNthChild(Row, L"Cell", 5); if (Cell) Data = XmlGetChild(Cell, "Data"); else Data = NULL; if (Data) subscr = XmlGetText(Data); @@ -1544,10 +1544,10 @@ public: { SetParent(hwndParent); - CreateLink(m_txtUsername, "LoginName", _T("")); + CreateLink(m_txtUsername, "LoginName", L""); CreateLink(m_chkSavePassword, proto->m_options.SavePassword); - CreateLink(m_cbResource, "Resource", _T("Miranda")); - CreateLink(m_cbServer, "LoginServer", _T("jabber.org")); + CreateLink(m_cbResource, "Resource", L"Miranda"); + CreateLink(m_cbServer, "LoginServer", L"jabber.org"); CreateLink(m_txtPort, "Port", DBVT_WORD, 5222); CreateLink(m_chkUseDomainLogin, proto->m_options.UseDomainLogin); @@ -1578,7 +1578,7 @@ protected: m_cbServer.AddString(TranslateT("Loading...")); // fill predefined resources - TCHAR *szResources[] = { _T("Home"), _T("Work"), _T("Office"), _T("Miranda") }; + TCHAR *szResources[] = { L"Home", L"Work", L"Office", L"Miranda" }; for (int i = 0; i < _countof(szResources); i++) m_cbResource.AddString(szResources[i]); @@ -1594,7 +1594,7 @@ protected: m_cbResource.AddString(tszResource); m_cbResource.SetText(tszResource); } - else m_cbResource.SetText(_T("Miranda")); + else m_cbResource.SetText(L"Miranda"); m_cbType.AddString(TranslateT("Public XMPP Network"), ACC_PUBLIC); m_cbType.AddString(TranslateT("Secure XMPP Network"), ACC_TLS); @@ -1864,8 +1864,8 @@ private: m_txtUsername.Enable(!checked); m_chkSavePassword.Enable(!checked); if (checked) { - m_txtPassword.SetText(_T("")); - m_txtUsername.SetText(_T("")); + m_txtPassword.SetText(L""); + m_txtUsername.SetText(L""); m_chkSavePassword.SetState(BST_CHECKED); } } @@ -2171,8 +2171,8 @@ void CJabberDlgAccMgrUI::RefreshServers(HXML node) if (!n) break; - if (!mir_tstrcmp(XmlGetName(n), _T("item"))) - if (const TCHAR *jid = XmlGetAttrValue(n, _T("jid"))) + if (!mir_tstrcmp(XmlGetName(n), L"item")) + if (const TCHAR *jid = XmlGetAttrValue(n, L"jid")) if (m_cbServer.FindString(jid, -1, true) == CB_ERR) m_cbServer.AddString(jid); } @@ -2202,7 +2202,7 @@ void CJabberDlgAccMgrUI::QueryServerListThread(void *arg) TCHAR *ptszText = mir_a2t(result->pData); XmlNode node(ptszText, NULL, NULL); if (node) { - HXML queryNode = XmlGetChild(node, _T("query")); + HXML queryNode = XmlGetChild(node, L"query"); if (queryNode && IsWindow(hwnd)) { SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)queryNode); bIsError = false; diff --git a/protocols/JabberG/src/jabber_password.cpp b/protocols/JabberG/src/jabber_password.cpp index d75d0afec1..f81d00a074 100644 --- a/protocols/JabberG/src/jabber_password.cpp +++ b/protocols/JabberG/src/jabber_password.cpp @@ -74,8 +74,8 @@ static INT_PTR CALLBACK JabberChangePasswordDlgProc(HWND hwndDlg, UINT msg, WPAR XmlNodeIq iq(ppro->AddIQ(&CJabberProto::OnIqResultSetPassword, JABBER_IQ_TYPE_SET, _A2T(ppro->m_ThreadInfo->conn.server))); HXML q = iq << XQUERY(JABBER_FEAT_REGISTER); - q << XCHILD(_T("username"), ppro->m_ThreadInfo->conn.username); - q << XCHILD(_T("password"), newPasswd); + q << XCHILD(L"username", ppro->m_ThreadInfo->conn.username); + q << XCHILD(L"password", newPasswd); ppro->m_ThreadInfo->send(iq); } DestroyWindow(hwndDlg); diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index c957183889..4e0fac80ed 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -39,7 +39,7 @@ BOOL CJabberProto::OnIqRequestPrivacyLists(HXML, CJabberIqInfo *pInfo) } else m_pDlgPrivacyLists->SetStatusText(TranslateT("Warning: privacy lists were changed on server.")); - m_ThreadInfo->send( XmlNodeIq(_T("result"), pInfo)); + m_ThreadInfo->send( XmlNodeIq(L"result", pInfo)); } return TRUE; } @@ -73,11 +73,11 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*) if (iqNode == NULL) return; - const TCHAR *type = XmlGetAttrValue(iqNode, _T("type")); + const TCHAR *type = XmlGetAttrValue(iqNode, L"type"); if (type == NULL) return; - if ( mir_tstrcmp(type, _T("result"))) + if ( mir_tstrcmp(type, L"result")) return; HXML query = XmlGetChild(iqNode , "query"); @@ -86,7 +86,7 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*) HXML list = XmlGetChild(query, "list"); if (list == NULL) return; - TCHAR *szListName = (TCHAR*)XmlGetAttrValue(list, _T("name")); + TCHAR *szListName = (TCHAR*)XmlGetAttrValue(list, L"name"); if (!szListName) return; @@ -100,26 +100,26 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*) } HXML item; - for (int i = 1; (item = XmlGetNthChild(list, _T("item"), i)) != NULL; i++) { - const TCHAR *itemType = XmlGetAttrValue(item, _T("type")); + for (int i = 1; (item = XmlGetNthChild(list, L"item", i)) != NULL; i++) { + const TCHAR *itemType = XmlGetAttrValue(item, L"type"); PrivacyListRuleType nItemType = Else; if (itemType) { - if (!mir_tstrcmpi(itemType, _T("jid"))) + if (!mir_tstrcmpi(itemType, L"jid")) nItemType = Jid; - else if (!mir_tstrcmpi(itemType, _T("group"))) + else if (!mir_tstrcmpi(itemType, L"group")) nItemType = Group; - else if (!mir_tstrcmpi(itemType, _T("subscription"))) + else if (!mir_tstrcmpi(itemType, L"subscription")) nItemType = Subscription; } - const TCHAR *itemValue = XmlGetAttrValue(item, _T("value")); + const TCHAR *itemValue = XmlGetAttrValue(item, L"value"); - const TCHAR *itemAction = XmlGetAttrValue(item, _T("action")); + const TCHAR *itemAction = XmlGetAttrValue(item, L"action"); BOOL bAllow = TRUE; - if (itemAction && !mir_tstrcmpi(itemAction, _T("deny"))) + if (itemAction && !mir_tstrcmpi(itemAction, L"deny")) bAllow = FALSE; - const TCHAR *itemOrder = XmlGetAttrValue(item, _T("order")); + const TCHAR *itemOrder = XmlGetAttrValue(item, L"order"); DWORD dwOrder = 0; if (itemOrder) dwOrder = _ttoi(itemOrder); @@ -179,13 +179,13 @@ void CJabberProto::OnIqResultPrivacyListActive(HXML iqNode, CJabberIqInfo *pInfo if (iqNode == NULL) return; - const TCHAR *type = XmlGetAttrValue(iqNode, _T("type")); + const TCHAR *type = XmlGetAttrValue(iqNode, L"type"); if (type == NULL) return; CMString szText; - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { mir_cslock lck(m_privacyListManager.m_cs); if (pList) { m_privacyListManager.SetActiveListName(pList->GetListName()); @@ -214,7 +214,7 @@ void CJabberProto::OnIqResultPrivacyListDefault(HXML iqNode, CJabberIqInfo *pInf if (iqNode == NULL) return; - const TCHAR *type = XmlGetAttrValue(iqNode, _T("type")); + const TCHAR *type = XmlGetAttrValue(iqNode, L"type"); if (type == NULL) return; @@ -222,7 +222,7 @@ void CJabberProto::OnIqResultPrivacyListDefault(HXML iqNode, CJabberIqInfo *pInf szText[0] = 0; { mir_cslock lck(m_privacyListManager.m_cs); - if (!mir_tstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, L"result")) { CPrivacyList *pList = (CPrivacyList *)pInfo->GetUserData(); if (pList) { m_privacyListManager.SetDefaultListName(pList->GetListName()); @@ -258,11 +258,11 @@ void CJabberProto::OnIqResultPrivacyLists(HXML iqNode, CJabberIqInfo *pInfo) m_privacyListManager.RemoveAllLists(); for (int i = 1; ; i++) { - HXML list = XmlGetNthChild(query, _T("list"), i); + HXML list = XmlGetNthChild(query, L"list", i); if (list == NULL) break; - const TCHAR *listName = XmlGetAttrValue(list, _T("name")); + const TCHAR *listName = XmlGetAttrValue(list, L"name"); if (listName) { m_privacyListManager.AddList((TCHAR*)listName); @@ -270,20 +270,20 @@ void CJabberProto::OnIqResultPrivacyLists(HXML iqNode, CJabberIqInfo *pInfo) if (m_pDlgPrivacyLists) m_ThreadInfo->send( XmlNodeIq( AddIQ(&CJabberProto::OnIqResultPrivacyList, JABBER_IQ_TYPE_GET)) - << XQUERY(JABBER_FEAT_PRIVACY_LISTS) << XCHILD(_T("list")) << XATTR(_T("name"), listName)); + << XQUERY(JABBER_FEAT_PRIVACY_LISTS) << XCHILD(L"list") << XATTR(L"name", listName)); } } const TCHAR *szName = NULL; HXML node = XmlGetChild(query , "active"); if (node) - szName = XmlGetAttrValue(node, _T("name")); + szName = XmlGetAttrValue(node, L"name"); m_privacyListManager.SetActiveListName(szName); szName = NULL; node = XmlGetChild(query , "default"); if (node) - szName = XmlGetAttrValue(node, _T("name")); + szName = XmlGetAttrValue(node, L"name"); m_privacyListManager.SetDefaultListName(szName); } UI_SAFE_NOTIFY(m_pDlgPrivacyLists, WM_JABBER_REFRESH); @@ -367,7 +367,7 @@ public: SendDlgItemMessage(m_hwnd, IDC_ICO_PRESENCEIN, STM_SETICON, (WPARAM)m_proto->LoadIconEx("pl_prin_allow"), 0); SendDlgItemMessage(m_hwnd, IDC_ICO_PRESENCEOUT, STM_SETICON, (WPARAM)m_proto->LoadIconEx("pl_prout_allow"), 0); - TCHAR *szTypes[] = { _T("JID"), _T("Group"), _T("Subscription"), _T("Any") }; + TCHAR *szTypes[] = { L"JID", L"Group", L"Subscription", L"Any" }; int i, nTypes[] = { Jid, Group, Subscription, Else }; for (i=0; i < _countof(szTypes); i++) { LRESULT nItem = SendDlgItemMessage(m_hwnd, IDC_COMBO_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szTypes[i])); @@ -377,7 +377,7 @@ public: } SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUE, CB_RESETCONTENT, 0, 0); - TCHAR *szSubscriptions[] = { _T("none"), _T("from"), _T("to"), _T("both") }; + TCHAR *szSubscriptions[] = { L"none", L"from", L"to", L"both" }; for (i=0; i < _countof(szSubscriptions); i++) { LRESULT nItem = SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szSubscriptions[i])); SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUE, CB_SETITEMDATA, nItem, (LPARAM)szSubscriptions[i]); @@ -507,7 +507,7 @@ public: if (nCurSel != CB_ERR) m_pRule->SetValue((TCHAR*)SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUE, CB_GETITEMDATA, nCurSel, 0)); else - m_pRule->SetValue(_T("none")); + m_pRule->SetValue(L"none"); break; default: @@ -991,16 +991,16 @@ void CJabberDlgPrivacyLists::ShowAdvancedList(CPrivacyList *pList) TCHAR szTypeValue[ 512 ]; switch (pRule->GetType()) { case Jid: - mir_sntprintf(szTypeValue, _T("If Jabber ID is '%s' then"), pRule->GetValue()); + mir_sntprintf(szTypeValue, L"If Jabber ID is '%s' then", pRule->GetValue()); break; case Group: - mir_sntprintf(szTypeValue, _T("If group is '%s' then"), pRule->GetValue()); + mir_sntprintf(szTypeValue, L"If group is '%s' then", pRule->GetValue()); break; case Subscription: - mir_sntprintf(szTypeValue, _T("If subscription is '%s' then"), pRule->GetValue()); + mir_sntprintf(szTypeValue, L"If subscription is '%s' then", pRule->GetValue()); break; case Else: - mir_sntprintf(szTypeValue, _T("Else")); + mir_sntprintf(szTypeValue, L"Else"); break; } @@ -1011,29 +1011,29 @@ void CJabberDlgPrivacyLists::ShowAdvancedList(CPrivacyList *pList) if (!dwPackets) dwPackets = JABBER_PL_RULE_TYPE_ALL; if (dwPackets == JABBER_PL_RULE_TYPE_ALL) - mir_tstrcpy(szPackets, _T("all")); + mir_tstrcpy(szPackets, L"all"); else { if (dwPackets & JABBER_PL_RULE_TYPE_MESSAGE) - mir_tstrcat(szPackets, _T("messages")); + mir_tstrcat(szPackets, L"messages"); if (dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_IN) { if (mir_tstrlen(szPackets)) - mir_tstrcat(szPackets, _T(", ")); - mir_tstrcat(szPackets, _T("presence-in")); + mir_tstrcat(szPackets, L", "); + mir_tstrcat(szPackets, L"presence-in"); } if (dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_OUT) { if (mir_tstrlen(szPackets)) - mir_tstrcat(szPackets, _T(", ")); - mir_tstrcat(szPackets, _T("presence-out")); + mir_tstrcat(szPackets, L", "); + mir_tstrcat(szPackets, L"presence-out"); } if (dwPackets & JABBER_PL_RULE_TYPE_IQ) { if (mir_tstrlen(szPackets)) - mir_tstrcat(szPackets, _T(", ")); - mir_tstrcat(szPackets, _T("queries")); + mir_tstrcat(szPackets, L", "); + mir_tstrcat(szPackets, L"queries"); } } TCHAR szListItem[ 512 ]; - mir_sntprintf(szListItem, _T("%s %s %s"), szTypeValue, pRule->GetAction() ? _T("allow") : _T("deny"), szPackets); + mir_sntprintf(szListItem, L"%s %s %s", szTypeValue, pRule->GetAction() ? L"allow" : L"deny", szPackets); LRESULT nItemId = SendDlgItemMessage(m_hwnd, IDC_PL_RULES_LIST, LB_ADDSTRING, 0, (LPARAM)szListItem); SendDlgItemMessage(m_hwnd, IDC_PL_RULES_LIST, LB_SETITEMDATA, nItemId, (LPARAM)pRule); @@ -1081,25 +1081,25 @@ void CJabberDlgPrivacyLists::DrawRuleAction(HDC hdc, COLORREF clLine1, COLORREF, if (pRule->GetPackets() & JABBER_PL_RULE_TYPE_PRESENCE_IN) { --itemCount; if (needComma) - DrawNextRulePart(hdc, clLine1, itemCount ? _T(", ") : TranslateT(" and "), rc); + DrawNextRulePart(hdc, clLine1, itemCount ? L", " : TranslateT(" and "), rc); needComma = true; DrawNextRulePart(hdc, clLine1, TranslateT("incoming presences"), rc); } if (pRule->GetPackets() & JABBER_PL_RULE_TYPE_PRESENCE_OUT) { --itemCount; if (needComma) - DrawNextRulePart(hdc, clLine1, itemCount ? _T(", ") : TranslateT(" and "), rc); + DrawNextRulePart(hdc, clLine1, itemCount ? L", " : TranslateT(" and "), rc); needComma = true; DrawNextRulePart(hdc, clLine1, TranslateT("outgoing presences"), rc); } if (pRule->GetPackets() & JABBER_PL_RULE_TYPE_IQ) { --itemCount; if (needComma) - DrawNextRulePart(hdc, clLine1, itemCount ? _T(", ") : TranslateT(" and "), rc); + DrawNextRulePart(hdc, clLine1, itemCount ? L", " : TranslateT(" and "), rc); needComma = true; DrawNextRulePart(hdc, clLine1, TranslateT("queries"), rc); } - DrawNextRulePart(hdc, clLine1, _T("."), rc); + DrawNextRulePart(hdc, clLine1, L".", rc); } } @@ -1385,10 +1385,10 @@ void CJabberDlgPrivacyLists::CListApplyList(HWND hwndList, CPrivacyList *pList) break; case Subscription: - if (!mir_tstrcmp(pRule->GetValue(), _T("none"))) hItem = clc_info.hItemSubNone; - else if (!mir_tstrcmp(pRule->GetValue(), _T("from"))) hItem = clc_info.hItemSubFrom; - else if (!mir_tstrcmp(pRule->GetValue(), _T("to"))) hItem = clc_info.hItemSubTo; - else if (!mir_tstrcmp(pRule->GetValue(), _T("both"))) hItem = clc_info.hItemSubBoth; + if (!mir_tstrcmp(pRule->GetValue(), L"none")) hItem = clc_info.hItemSubNone; + else if (!mir_tstrcmp(pRule->GetValue(), L"from")) hItem = clc_info.hItemSubFrom; + else if (!mir_tstrcmp(pRule->GetValue(), L"to")) hItem = clc_info.hItemSubTo; + else if (!mir_tstrcmp(pRule->GetValue(), L"both")) hItem = clc_info.hItemSubBoth; break; case Else: @@ -1484,28 +1484,28 @@ void CJabberDlgPrivacyLists::CListBuildList(HWND hwndList, CPrivacyList *pList) } hItem = clc_info.hItemSubBoth; - szJid = _T("both"); + szJid = L"both"; if (dwPackets = CListGetPackets(hwndList, hItem, true)) pList->AddRule(Subscription, szJid, TRUE, dwOrder++, dwPackets); if (dwPackets = CListGetPackets(hwndList, hItem, false)) pList->AddRule(Subscription, szJid, FALSE, dwOrder++, dwPackets); hItem = clc_info.hItemSubFrom; - szJid = _T("from"); + szJid = L"from"; if (dwPackets = CListGetPackets(hwndList, hItem, true)) pList->AddRule(Subscription, szJid, TRUE, dwOrder++, dwPackets); if (dwPackets = CListGetPackets(hwndList, hItem, false)) pList->AddRule(Subscription, szJid, FALSE, dwOrder++, dwPackets); hItem = clc_info.hItemSubNone; - szJid = _T("none"); + szJid = L"none"; if (dwPackets = CListGetPackets(hwndList, hItem, true)) pList->AddRule(Subscription, szJid, TRUE, dwOrder++, dwPackets); if (dwPackets = CListGetPackets(hwndList, hItem, false)) pList->AddRule(Subscription, szJid, FALSE, dwOrder++, dwPackets); hItem = clc_info.hItemSubTo; - szJid = _T("to"); + szJid = L"to"; if (dwPackets = CListGetPackets(hwndList, hItem, true)) pList->AddRule(Subscription, szJid, TRUE, dwOrder++, dwPackets); if (dwPackets = CListGetPackets(hwndList, hItem, false)) @@ -1637,7 +1637,7 @@ void CJabberDlgPrivacyLists::btnAddJid_OnClick(CCtrlButton *) int len = GetWindowTextLength(GetDlgItem(m_hwnd, IDC_NEWJID))+1; TCHAR *buf = (TCHAR *)_alloca(sizeof(TCHAR) * len); GetDlgItemText(m_hwnd, IDC_NEWJID, buf, len); - SetDlgItemText(m_hwnd, IDC_NEWJID, _T("")); + SetDlgItemText(m_hwnd, IDC_NEWJID, L""); CListAddContact(GetDlgItem(m_hwnd, IDC_CLIST), buf); } @@ -1658,9 +1658,9 @@ void CJabberDlgPrivacyLists::btnActivate_OnClick(CCtrlButton *) SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_ACTIVATE), GWLP_USERDATA, (LONG_PTR)pList); XmlNodeIq iq(m_proto->AddIQ(&CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList)); HXML query = iq << XQUERY(JABBER_FEAT_PRIVACY_LISTS); - HXML active = query << XCHILD(_T("active")); + HXML active = query << XCHILD(L"active"); if (pList) - active << XATTR(_T("name"), pList->GetListName()); + active << XATTR(L"name", pList->GetListName()); lck.unlock(); SetStatusText(TranslateT(JABBER_PL_BUSY_MSG)); @@ -1685,9 +1685,9 @@ void CJabberDlgPrivacyLists::btnSetDefault_OnClick(CCtrlButton *) XmlNodeIq iq(m_proto->AddIQ(&CJabberProto::OnIqResultPrivacyListDefault, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList)); HXML query = iq << XQUERY(JABBER_FEAT_PRIVACY_LISTS); - HXML defaultTag = query << XCHILD(_T("default")); + HXML defaultTag = query << XCHILD(L"default"); if (pList) - XmlAddAttr(defaultTag, _T("name"), pList->GetListName()); + XmlAddAttr(defaultTag, L"name", pList->GetListName()); lck.unlock(); SetStatusText(TranslateT(JABBER_PL_BUSY_MSG)); @@ -1766,7 +1766,7 @@ void CJabberDlgPrivacyLists::btnAddRule_OnClick(CCtrlButton*) CPrivacyList *pList = GetSelectedList(m_hwnd); if (pList) { - CPrivacyListRule* pRule = new CPrivacyListRule(m_proto, Jid, _T(""), FALSE); + CPrivacyListRule* pRule = new CPrivacyListRule(m_proto, Jid, L"", FALSE); CJabberDlgPrivacyRule dlgPrivacyRule(m_proto, m_hwnd, pRule); int nResult = dlgPrivacyRule.DoModal(); if (nResult) { @@ -1917,38 +1917,38 @@ void CJabberDlgPrivacyLists::btnApply_OnClick(CCtrlButton *) XmlNodeIq iq(m_proto->AddIQ(&CJabberProto::OnIqResultPrivacyListModify, JABBER_IQ_TYPE_SET, NULL, 0, -1, pUserData)); HXML query = iq << XQUERY(JABBER_FEAT_PRIVACY_LISTS); - HXML listTag = query << XCHILD(_T("list")) << XATTR(_T("name"), pList->GetListName()); + HXML listTag = query << XCHILD(L"list") << XATTR(L"name", pList->GetListName()); while (pRule) { - HXML itemTag = listTag << XCHILD(_T("item")); + HXML itemTag = listTag << XCHILD(L"item"); switch (pRule->GetType()) { case Jid: - itemTag << XATTR(_T("type"), _T("jid")); + itemTag << XATTR(L"type", L"jid"); break; case Group: - itemTag << XATTR(_T("type"), _T("group")); + itemTag << XATTR(L"type", L"group"); break; case Subscription: - itemTag << XATTR(_T("type"), _T("subscription")); + itemTag << XATTR(L"type", L"subscription"); break; } if (pRule->GetType() != Else) - itemTag << XATTR(_T("value"), pRule->GetValue()); + itemTag << XATTR(L"value", pRule->GetValue()); if (pRule->GetAction()) - itemTag << XATTR(_T("action"), _T("allow")); + itemTag << XATTR(L"action", L"allow"); else - itemTag << XATTR(_T("action"), _T("deny")); - itemTag << XATTRI(_T("order"), pRule->GetOrder()); + itemTag << XATTR(L"action", L"deny"); + itemTag << XATTRI(L"order", pRule->GetOrder()); DWORD dwPackets = pRule->GetPackets(); if (dwPackets != JABBER_PL_RULE_TYPE_ALL) { if (dwPackets & JABBER_PL_RULE_TYPE_IQ) - itemTag << XCHILD(_T("iq")); + itemTag << XCHILD(L"iq"); if (dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_IN) - itemTag << XCHILD(_T("presence-in")); + itemTag << XCHILD(L"presence-in"); if (dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_OUT) - itemTag << XCHILD(_T("presence-out")); + itemTag << XCHILD(L"presence-out"); if (dwPackets & JABBER_PL_RULE_TYPE_MESSAGE) - itemTag << XCHILD(_T("message")); + itemTag << XCHILD(L"message"); } pRule = pRule->GetNext(); } @@ -2076,9 +2076,9 @@ INT_PTR __cdecl CJabberProto::menuSetPrivacyList(WPARAM, LPARAM, LPARAM iList) XmlNodeIq iq(AddIQ(&CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList)); HXML query = iq << XQUERY(JABBER_FEAT_PRIVACY_LISTS); - HXML active = query << XCHILD(_T("active")); + HXML active = query << XCHILD(L"active"); if (pList) - active << XATTR(_T("name"), pList->GetListName()); + active << XATTR(L"name", pList->GetListName()); lck.unlock(); m_ThreadInfo->send(iq); diff --git a/protocols/JabberG/src/jabber_privacy.h b/protocols/JabberG/src/jabber_privacy.h index 6c12682db2..6f48cebd11 100644 --- a/protocols/JabberG/src/jabber_privacy.h +++ b/protocols/JabberG/src/jabber_privacy.h @@ -58,7 +58,7 @@ class CPrivacyListRule protected: friend class CPrivacyList; public: - CPrivacyListRule(CJabberProto *ppro, PrivacyListRuleType type = Else, const TCHAR *szValue = _T(""), BOOL bAction = TRUE, DWORD dwOrder = 90, DWORD dwPackets = 0) + CPrivacyListRule(CJabberProto *ppro, PrivacyListRuleType type = Else, const TCHAR *szValue = L"", BOOL bAction = TRUE, DWORD dwOrder = 90, DWORD dwPackets = 0) { m_proto = ppro; m_szValue = mir_tstrdup(szValue); diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index b64ac73c55..96bbe0c424 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -147,7 +147,7 @@ CJabberProto::CJabberProto(const char *aProtoName, const TCHAR *aUserName) : db_set_resident(m_szModuleName, "Grant"); if ((m_tszSelectedLang = getTStringA("XmlLang")) == NULL) - m_tszSelectedLang = mir_tstrdup(_T("en")); + m_tszSelectedLang = mir_tstrdup(L"en"); } CJabberProto::~CJabberProto() @@ -297,7 +297,7 @@ int __cdecl CJabberProto::OnPreShutdown(WPARAM, LPARAM) MCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags) { - debugLog(_T("AddToListByJID jid = %s"), newJid); + debugLog(L"AddToListByJID jid = %s", newJid); MCONTACT hContact = DBCreateContact(newJid, NULL, true, false); if (flags & PALF_TEMPORARY) @@ -371,18 +371,18 @@ int CJabberProto::Authorize(MEVENT hDbEvent) char *lastName = firstName + mir_strlen(firstName) + 1; char *jid = lastName + mir_strlen(lastName) + 1; - debugLog(_T("Send 'authorization allowed' to %s"), jid); + debugLog(L"Send 'authorization allowed' to %s", jid); TCHAR *newJid = (dbei.flags & DBEF_UTF) ? mir_utf8decodeT(jid) : mir_a2t(jid); - m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), newJid) << XATTR(_T("type"), _T("subscribed"))); + m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", newJid) << XATTR(L"type", L"subscribed")); // Automatically add this user to my roster if option is enabled if (m_options.AutoAdd == TRUE) { JABBER_LIST_ITEM *item; if ((item = ListGetItemPtr(LIST_ROSTER, newJid)) == NULL || (item->subscription != SUB_BOTH && item->subscription != SUB_TO)) { - debugLog(_T("Try adding contact automatically jid = %s"), jid); + debugLog(L"Try adding contact automatically jid = %s", jid); if (MCONTACT hContact = AddToListByJID(newJid, 0)) { // Trigger actual add by removing the "NotOnList" added by AddToListByJID() // See AddToListByJID() and JabberDbSettingChanged(). @@ -430,7 +430,7 @@ int CJabberProto::AuthDeny(MEVENT hDbEvent, const TCHAR*) debugLogA("Send 'authorization denied' to %s", jid); ptrT newJid(dbei.flags & DBEF_UTF ? mir_utf8decodeT(jid) : mir_a2t(jid)); - m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), newJid) << XATTR(_T("type"), _T("unsubscribed"))); + m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", newJid) << XATTR(L"type", L"unsubscribed")); return 0; } @@ -502,16 +502,16 @@ int __cdecl CJabberProto::FileDeny(MCONTACT, HANDLE hTransfer, const TCHAR *) switch (ft->type) { case FT_OOB: - m_ThreadInfo->send(XmlNodeIq(_T("error"), ft->szId, ft->jid) << XCHILD(_T("error"), _T("File transfer refused")) << XATTRI(_T("code"), 406)); + m_ThreadInfo->send(XmlNodeIq(L"error", ft->szId, ft->jid) << XCHILD(L"error", L"File transfer refused") << XATTRI(L"code", 406)); break; case FT_BYTESTREAM: case FT_IBB: m_ThreadInfo->send( - XmlNodeIq(_T("error"), ft->szId, ft->jid) - << XCHILD(_T("error"), _T("File transfer refused")) << XATTRI(_T("code"), 403) << XATTR(_T("type"), _T("cancel")) - << XCHILDNS(_T("forbidden"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")) - << XCHILD(_T("text"), _T("File transfer refused")) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"))); + XmlNodeIq(L"error", ft->szId, ft->jid) + << XCHILD(L"error", L"File transfer refused") << XATTRI(L"code", 403) << XATTR(L"type", L"cancel") + << XCHILDNS(L"forbidden", L"urn:ietf:params:xml:ns:xmpp-stanzas") + << XCHILD(L"text", L"File transfer refused") << XATTR(L"xmlns", L"urn:ietf:params:xml:ns:xmpp-stanzas")); break; } delete ft; @@ -580,7 +580,7 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/) if (m_ThreadInfo) { m_ThreadInfo->send( XmlNodeIq(AddIQ(&CJabberProto::OnIqResultEntityTime, JABBER_IQ_TYPE_GET, jid, JABBER_IQ_PARSE_HCONTACT)) - << XCHILDNS(_T("time"), JABBER_FEAT_ENTITY_TIME)); + << XCHILDNS(L"time", JABBER_FEAT_ENTITY_TIME)); // XEP-0012, last logoff time XmlNodeIq iq2(AddIQ(&CJabberProto::OnIqResultLastActivity, JABBER_IQ_TYPE_GET, jid, JABBER_IQ_PARSE_FROM)); @@ -610,7 +610,7 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/) for (int i = 0; i < item->arResources.getCount(); i++) { pResourceStatus r(item->arResources[i]); TCHAR tmp[JABBER_MAX_JID_LEN]; - mir_sntprintf(tmp, _T("%s/%s"), szBareJid, r->m_tszResourceName); + mir_sntprintf(tmp, L"%s/%s", szBareJid, r->m_tszResourceName); if (r->m_jcbCachedCaps & JABBER_CAPS_DISCO_INFO) { XmlNodeIq iq5(AddIQ(&CJabberProto::OnIqResultCapsDiscoInfoSI, JABBER_IQ_TYPE_GET, tmp, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE | JABBER_IQ_PARSE_HCONTACT)); @@ -661,8 +661,8 @@ void __cdecl CJabberProto::BasicSearchThread(JABBER_SEARCH_BASIC *jsb) psr.cbSize = sizeof(psr); psr.flags = PSR_TCHAR; psr.nick.t = jsb->jid; - psr.firstName.t = _T(""); - psr.lastName.t = _T(""); + psr.firstName.t = L""; + psr.lastName.t = L""; psr.id.t = jsb->jid; ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)jsb->hSearch, (LPARAM)&psr); @@ -672,7 +672,7 @@ void __cdecl CJabberProto::BasicSearchThread(JABBER_SEARCH_BASIC *jsb) HANDLE __cdecl CJabberProto::SearchBasic(const TCHAR *szJid) { - debugLog(_T("JabberBasicSearch called with lParam = '%s'"), szJid); + debugLog(L"JabberBasicSearch called with lParam = '%s'", szJid); JABBER_SEARCH_BASIC *jsb; if (!m_bJabberOnline || (jsb = (JABBER_SEARCH_BASIC*)mir_alloc(sizeof(JABBER_SEARCH_BASIC))) == NULL) @@ -689,19 +689,19 @@ HANDLE __cdecl CJabberProto::SearchBasic(const TCHAR *szJid) mir_free(szServer); szServer = getTStringA(NULL, "LoginServer"); if (szServer == NULL) - szServer = mir_tstrdup(_T("jabber.org")); - else if (numericjid && !mir_tstrcmpi(szServer, _T("S.ms"))) { + szServer = mir_tstrdup(L"jabber.org"); + else if (numericjid && !mir_tstrcmpi(szServer, L"S.ms")) { mir_free(szServer); - szServer = mir_tstrdup(_T("sms")); + szServer = mir_tstrdup(L"sms"); } - mir_sntprintf(jsb->jid, _T("%s@%s"), szJid, szServer); + mir_sntprintf(jsb->jid, L"%s@%s", szJid, szServer); } else _tcsncpy_s(jsb->jid, szJid, _TRUNCATE); mir_free(szServer); } else _tcsncpy_s(jsb->jid, szJid, _TRUNCATE); - debugLog(_T("Adding '%s' without validation"), jsb->jid); + debugLog(L"Adding '%s' without validation", jsb->jid); jsb->hSearch = SerialNext(); ForkThread((MyThreadFunc)&CJabberProto::BasicSearchThread, jsb); return (HANDLE)jsb->hSearch; @@ -719,7 +719,7 @@ HANDLE __cdecl CJabberProto::SearchByEmail(const TCHAR *email) LPCSTR jid = szServerName == 0 ? "users.jabber.org" : szServerName; CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultSetSearch, JABBER_IQ_TYPE_SET, _A2T(jid)); - m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(_T("jabber:iq:search")) << XCHILD(_T("email"), email)); + m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(L"jabber:iq:search") << XCHILD(L"email", email)); return (HANDLE)pInfo->GetIqId(); } @@ -739,31 +739,31 @@ HANDLE __cdecl CJabberProto::SearchByName(const TCHAR *nick, const TCHAR *firstN (bIsExtFormat) ? &CJabberProto::OnIqResultExtSearch : &CJabberProto::OnIqResultSetSearch, JABBER_IQ_TYPE_SET, _A2T(szServerName == 0 ? "users.jabber.org" : szServerName)); XmlNodeIq iq(pInfo); - HXML query = iq << XQUERY(_T("jabber:iq:search")); + HXML query = iq << XQUERY(L"jabber:iq:search"); if (bIsExtFormat) { if (m_tszSelectedLang) - iq << XATTR(_T("xml:lang"), m_tszSelectedLang); + iq << XATTR(L"xml:lang", m_tszSelectedLang); - HXML x = query << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("submit")); + HXML x = query << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"submit"); if (nick[0] != '\0') - x << XCHILD(_T("field")) << XATTR(_T("var"), _T("user")) << XATTR(_T("value"), nick); + x << XCHILD(L"field") << XATTR(L"var", L"user") << XATTR(L"value", nick); if (firstName[0] != '\0') - x << XCHILD(_T("field")) << XATTR(_T("var"), _T("fn")) << XATTR(_T("value"), firstName); + x << XCHILD(L"field") << XATTR(L"var", L"fn") << XATTR(L"value", firstName); if (lastName[0] != '\0') - x << XCHILD(_T("field")) << XATTR(_T("var"), _T("given")) << XATTR(_T("value"), lastName); + x << XCHILD(L"field") << XATTR(L"var", L"given") << XATTR(L"value", lastName); } else { if (nick[0] != '\0') - query << XCHILD(_T("nick"), nick); + query << XCHILD(L"nick", nick); if (firstName[0] != '\0') - query << XCHILD(_T("first"), firstName); + query << XCHILD(L"first", firstName); if (lastName[0] != '\0') - query << XCHILD(_T("last"), lastName); + query << XCHILD(L"last", lastName); } m_ThreadInfo->send(iq); @@ -798,16 +798,16 @@ int __cdecl CJabberProto::SendContacts(MCONTACT hContact, int, int nContacts, MC if (~jcb & JABBER_CAPS_ROSTER_EXCHANGE) return 0; - XmlNode m(_T("message")); - HXML x = m << XCHILDNS(_T("x"), JABBER_FEAT_ROSTER_EXCHANGE); + XmlNode m(L"message"); + HXML x = m << XCHILDNS(L"x", JABBER_FEAT_ROSTER_EXCHANGE); for (int i = 0; i < nContacts; i++) { ptrT jid(getTStringA(hContactsList[i], "jid")); if (jid != NULL) - x << XCHILD(_T("item")) << XATTR(_T("action"), _T("add")) << XATTR(_T("jid"), jid); + x << XCHILD(L"item") << XATTR(L"action", L"add") << XATTR(L"jid", jid); } - m << XATTR(_T("to"), szClientJid) << XATTRID(SerialNext()); + m << XATTR(L"to", szClientJid) << XATTRID(SerialNext()); m_ThreadInfo->send(m); return 1; } @@ -873,7 +873,7 @@ HANDLE __cdecl CJabberProto::SendFile(MCONTACT hContact, const TCHAR *szDescript int i, j; for (i = j = 0; i < ft->std.totalFiles; i++) { if (_tstati64(ppszFiles[i], &statbuf)) - debugLog(_T("'%s' is an invalid filename"), ppszFiles[i]); + debugLog(L"'%s' is an invalid filename", ppszFiles[i]); else { ft->std.ptszFiles[j] = mir_tstrdup(ppszFiles[i]); ft->fileSize[j] = statbuf.st_size; @@ -954,16 +954,16 @@ int __cdecl CJabberProto::SendMsg(MCONTACT hContact, int, const char* pszSrc) TCHAR *msgType; if (ListGetItemPtr(LIST_CHATROOM, szClientJid) && _tcschr(szClientJid, '/') == NULL) - msgType = _T("groupchat"); + msgType = L"groupchat"; else - msgType = _T("chat"); + msgType = L"chat"; - XmlNode m(_T("message")); XmlAddAttr(m, _T("type"), msgType); + XmlNode m(L"message"); XmlAddAttr(m, L"type", msgType); if (!isEncrypted) - m << XCHILD(_T("body"), msg); + m << XCHILD(L"body", msg); else { - m << XCHILD(_T("body"), _T("[This message is encrypted.]")); - m << XCHILD(_T("x"), msg) << XATTR(_T("xmlns"), _T("jabber:x:encrypted")); + m << XCHILD(L"body", L"[This message is encrypted.]"); + m << XCHILD(L"x", msg) << XATTR(L"xmlns", L"jabber:x:encrypted"); } mir_free(msg); @@ -977,7 +977,7 @@ int __cdecl CJabberProto::SendMsg(MCONTACT hContact, int, const char* pszSrc) jcb = JABBER_RESOURCE_CAPS_NONE; if (jcb & JABBER_CAPS_CHATSTATES) - m << XCHILDNS(_T("active"), JABBER_FEAT_CHATSTATES); + m << XCHILDNS(L"active", JABBER_FEAT_CHATSTATES); if ( // if message delivery check disabled by entity caps manager @@ -985,29 +985,29 @@ int __cdecl CJabberProto::SendMsg(MCONTACT hContact, int, const char* pszSrc) // if client knows nothing about delivery !(jcb & (JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_RECEIPTS)) || // if message sent to groupchat - !mir_tstrcmp(msgType, _T("groupchat")) || + !mir_tstrcmp(msgType, L"groupchat") || // if message delivery check disabled in settings !m_options.MsgAck || !getByte(hContact, "MsgAck", TRUE)) { - if (!mir_tstrcmp(msgType, _T("groupchat"))) - XmlAddAttr(m, _T("to"), szClientJid); + if (!mir_tstrcmp(msgType, L"groupchat")) + XmlAddAttr(m, L"to", szClientJid); else { id = SerialNext(); - XmlAddAttr(m, _T("to"), szClientJid); XmlAddAttrID(m, id); + XmlAddAttr(m, L"to", szClientJid); XmlAddAttrID(m, id); } m_ThreadInfo->send(m); ForkThread(&CJabberProto::SendMessageAckThread, new TFakeAckParams(hContact, 0, id)); } else { - XmlAddAttr(m, _T("to"), szClientJid); XmlAddAttrID(m, id); + XmlAddAttr(m, L"to", szClientJid); XmlAddAttrID(m, id); // message receipts XEP priority if (jcb & JABBER_CAPS_MESSAGE_RECEIPTS) - m << XCHILDNS(_T("request"), JABBER_FEAT_MESSAGE_RECEIPTS); + m << XCHILDNS(L"request", JABBER_FEAT_MESSAGE_RECEIPTS); else if (jcb & JABBER_CAPS_MESSAGE_EVENTS) { - HXML x = m << XCHILDNS(_T("x"), JABBER_FEAT_MESSAGE_EVENTS); - x << XCHILD(_T("delivered")); x << XCHILD(_T("offline")); + HXML x = m << XCHILDNS(L"x", JABBER_FEAT_MESSAGE_EVENTS); + x << XCHILD(L"delivered"); x << XCHILD(L"offline"); } m_ThreadInfo->send(m); @@ -1038,7 +1038,7 @@ int __cdecl CJabberProto::SetApparentMode(MCONTACT hContact, int mode) switch (mode) { case ID_STATUS_ONLINE: if (m_iStatus == ID_STATUS_INVISIBLE || oldMode == ID_STATUS_OFFLINE) - m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), jid)); + m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", jid)); break; case ID_STATUS_OFFLINE: if (m_iStatus != ID_STATUS_INVISIBLE || oldMode == ID_STATUS_ONLINE) @@ -1124,11 +1124,11 @@ void __cdecl CJabberProto::GetAwayMsgThread(void *param) for (int i = 0; i < item->arResources.getCount(); i++) { JABBER_RESOURCE_STATUS *r = item->arResources[i]; if (r->m_tszStatusMessage) { - if (str[0] != '\0') mir_tstrcat(str, _T("\r\n")); + if (str[0] != '\0') mir_tstrcat(str, L"\r\n"); if (msgCount > 1) { - mir_tstrcat(str, _T("(")); + mir_tstrcat(str, L"("); mir_tstrcat(str, r->m_tszResourceName); - mir_tstrcat(str, _T("): ")); + mir_tstrcat(str, L"): "); } mir_tstrcat(str, r->m_tszStatusMessage); } @@ -1162,7 +1162,7 @@ HANDLE __cdecl CJabberProto::GetAwayMsg(MCONTACT hContact) int __cdecl CJabberProto::SetAwayMsg(int status, const TCHAR *msg) { - debugLog(_T("SetAwayMsg called, wParam=%d lParam=%s"), status, msg); + debugLog(L"SetAwayMsg called, wParam=%d lParam=%s", status, msg); TCHAR **szMsg; mir_cslockfull lck(m_csModeMsgMutex); @@ -1229,32 +1229,32 @@ int __cdecl CJabberProto::UserIsTyping(MCONTACT hContact, int type) if (jcb & JABBER_RESOURCE_CAPS_ERROR) jcb = JABBER_RESOURCE_CAPS_NONE; - XmlNode m(_T("message")); XmlAddAttr(m, _T("to"), szClientJid); + XmlNode m(L"message"); XmlAddAttr(m, L"to", szClientJid); if (jcb & JABBER_CAPS_CHATSTATES) { - m << XATTR(_T("type"), _T("chat")) << XATTRID(SerialNext()); + m << XATTR(L"type", L"chat") << XATTRID(SerialNext()); switch (type) { case PROTOTYPE_SELFTYPING_OFF: - m << XCHILDNS(_T("paused"), JABBER_FEAT_CHATSTATES); + m << XCHILDNS(L"paused", JABBER_FEAT_CHATSTATES); m_ThreadInfo->send(m); break; case PROTOTYPE_SELFTYPING_ON: - m << XCHILDNS(_T("composing"), JABBER_FEAT_CHATSTATES); + m << XCHILDNS(L"composing", JABBER_FEAT_CHATSTATES); m_ThreadInfo->send(m); break; } } else if (jcb & JABBER_CAPS_MESSAGE_EVENTS) { - HXML x = m << XCHILDNS(_T("x"), JABBER_FEAT_MESSAGE_EVENTS); + HXML x = m << XCHILDNS(L"x", JABBER_FEAT_MESSAGE_EVENTS); if (item->messageEventIdStr != NULL) - x << XCHILD(_T("id"), item->messageEventIdStr); + x << XCHILD(L"id", item->messageEventIdStr); switch (type) { case PROTOTYPE_SELFTYPING_OFF: m_ThreadInfo->send(m); break; case PROTOTYPE_SELFTYPING_ON: - x << XCHILD(_T("composing")); + x << XCHILD(L"composing"); m_ThreadInfo->send(m); break; } diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index 492d24b3df..c851f55959 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -36,7 +36,7 @@ CJabberAdhocSession::CJabberAdhocSession(CJabberProto* global) m_bAutofreeUserData = FALSE; m_dwStage = 0; ppro = global; - m_szSessionId.Format(_T("%u%u"), ppro->SerialNext(), GetTickCount()); + m_szSessionId.Format(L"%u%u", ppro->SerialNext(), GetTickCount()); m_dwStartTime = GetTickCount(); } @@ -58,7 +58,7 @@ BOOL CJabberProto::HandleAdhocCommandRequest(HXML iqNode, CJabberIqInfo *pInfo) return TRUE; } - const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), _T("node")); + const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), L"node"); if (!szNode) return TRUE; @@ -72,8 +72,8 @@ BOOL CJabberAdhocManager::HandleItemsRequest(HXML, CJabberIqInfo *pInfo, const T return FALSE; if (!mir_tstrcmp(szNode, JABBER_FEAT_COMMANDS)) { - XmlNodeIq iq(_T("result"), pInfo); - HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_ITEMS) << XATTR(_T("node"), JABBER_FEAT_COMMANDS); + XmlNodeIq iq(L"result", pInfo); + HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_ITEMS) << XATTR(L"node", JABBER_FEAT_COMMANDS); { mir_cslock lck(m_cs); @@ -83,8 +83,8 @@ BOOL CJabberAdhocManager::HandleItemsRequest(HXML, CJabberIqInfo *pInfo, const T if (!szJid) szJid = m_pProto->m_ThreadInfo->fullJID; - resultQuery << XCHILD(_T("item")) << XATTR(_T("jid"), szJid) - << XATTR(_T("node"), pNode->GetNode()) << XATTR(_T("name"), pNode->GetName()); + resultQuery << XCHILD(L"item") << XATTR(L"jid", szJid) + << XATTR(L"node", pNode->GetNode()) << XATTR(L"name", pNode->GetName()); pNode = pNode->GetNext(); } @@ -103,15 +103,15 @@ BOOL CJabberAdhocManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, const TC // FIXME: same code twice if (!mir_tstrcmp(szNode, JABBER_FEAT_COMMANDS)) { - XmlNodeIq iq(_T("result"), pInfo); - HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), JABBER_FEAT_COMMANDS); - resultQuery << XCHILD(_T("identity")) << XATTR(_T("name"), _T("Ad-hoc commands")) - << XATTR(_T("category"), _T("automation")) << XATTR(_T("type"), _T("command-node")); + XmlNodeIq iq(L"result", pInfo); + HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", JABBER_FEAT_COMMANDS); + resultQuery << XCHILD(L"identity") << XATTR(L"name", L"Ad-hoc commands") + << XATTR(L"category", L"automation") << XATTR(L"type", L"command-node"); - resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_COMMANDS); - resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_DATA_FORMS); - resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_DISCO_INFO); - resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_DISCO_ITEMS); + resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_COMMANDS); + resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_DATA_FORMS); + resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_DISCO_INFO); + resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_DISCO_ITEMS); m_pProto->m_ThreadInfo->send(iq); return TRUE; @@ -122,14 +122,14 @@ BOOL CJabberAdhocManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, const TC if (pNode == NULL) return FALSE; - XmlNodeIq iq(_T("result"), pInfo); - HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), JABBER_FEAT_DISCO_INFO); - resultQuery << XCHILD(_T("identity")) << XATTR(_T("name"), pNode->GetName()) - << XATTR(_T("category"), _T("automation")) << XATTR(_T("type"), _T("command-node")); + XmlNodeIq iq(L"result", pInfo); + HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", JABBER_FEAT_DISCO_INFO); + resultQuery << XCHILD(L"identity") << XATTR(L"name", pNode->GetName()) + << XATTR(L"category", L"automation") << XATTR(L"type", L"command-node"); - resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_COMMANDS); - resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_DATA_FORMS); - resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_DISCO_INFO); + resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_COMMANDS); + resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_DATA_FORMS); + resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_DISCO_INFO); lck.unlock(); m_pProto->m_ThreadInfo->send(iq); return TRUE; @@ -147,14 +147,14 @@ BOOL CJabberAdhocManager::HandleCommandRequest(HXML iqNode, CJabberIqInfo *pInfo lck.unlock(); m_pProto->m_ThreadInfo->send( - XmlNodeIq(_T("error"), pInfo) - << XCHILD(_T("error")) << XATTR(_T("type"), _T("cancel")) - << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"))); + XmlNodeIq(L"error", pInfo) + << XCHILD(L"error") << XATTR(L"type", L"cancel") + << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas")); return FALSE; } - const TCHAR *szSessionId = XmlGetAttrValue(commandNode, _T("sessionid")); + const TCHAR *szSessionId = XmlGetAttrValue(commandNode, L"sessionid"); CJabberAdhocSession* pSession = NULL; if (szSessionId) { @@ -162,10 +162,10 @@ BOOL CJabberAdhocManager::HandleCommandRequest(HXML iqNode, CJabberIqInfo *pInfo if (!pSession) { lck.unlock(); - XmlNodeIq iq(_T("error"), pInfo); - HXML errorNode = iq << XCHILD(_T("error")) << XATTR(_T("type"), _T("modify")); - errorNode << XCHILDNS(_T("bad-request"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")); - errorNode << XCHILDNS(_T("bad-sessionid"), JABBER_FEAT_COMMANDS); + XmlNodeIq iq(L"error", pInfo); + HXML errorNode = iq << XCHILD(L"error") << XATTR(L"type", L"modify"); + errorNode << XCHILDNS(L"bad-request", L"urn:ietf:params:xml:ns:xmpp-stanzas"); + errorNode << XCHILDNS(L"bad-sessionid", JABBER_FEAT_COMMANDS); m_pProto->m_ThreadInfo->send(iq); return FALSE; } @@ -177,9 +177,9 @@ BOOL CJabberAdhocManager::HandleCommandRequest(HXML iqNode, CJabberIqInfo *pInfo lck.unlock(); m_pProto->m_ThreadInfo->send( - XmlNodeIq(_T("error"), pInfo) - << XCHILD(_T("error")) << XATTR(_T("type"), _T("cancel")) - << XCHILDNS(_T("forbidden"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"))); + XmlNodeIq(L"error", pInfo) + << XCHILD(L"error") << XATTR(L"type", L"cancel") + << XCHILDNS(L"forbidden", L"urn:ietf:params:xml:ns:xmpp-stanzas")); return FALSE; } @@ -190,20 +190,20 @@ BOOL CJabberAdhocManager::HandleCommandRequest(HXML iqNode, CJabberIqInfo *pInfo if (nResultCode == JABBER_ADHOC_HANDLER_STATUS_COMPLETED) { m_pProto->m_ThreadInfo->send( - XmlNodeIq(_T("result"), pInfo) - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), szNode) - << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("completed")) - << XCHILD(_T("note"), TranslateT("Command completed successfully")) << XATTR(_T("type"), _T("info"))); + XmlNodeIq(L"result", pInfo) + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", szNode) + << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"completed") + << XCHILD(L"note", TranslateT("Command completed successfully")) << XATTR(L"type", L"info")); RemoveSession(pSession); pSession = NULL; } else if (nResultCode == JABBER_ADHOC_HANDLER_STATUS_CANCEL) { m_pProto->m_ThreadInfo->send( - XmlNodeIq(_T("result"), pInfo) - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), szNode) - << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("canceled")) - << XCHILD(_T("note"), TranslateT("Error occurred during processing command")) << XATTR(_T("type"), _T("error"))); + XmlNodeIq(L"result", pInfo) + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", szNode) + << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"canceled") + << XCHILD(L"note", TranslateT("Error occurred during processing command")) << XATTR(L"type", L"error")); RemoveSession(pSession); pSession = NULL; @@ -257,74 +257,74 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc // first form pSession->SetStage(1); - XmlNodeIq iq(_T("result"), pInfo); + XmlNodeIq iq(L"result", pInfo); HXML xNode = iq - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_SET_STATUS) - << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing")) - << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form")); + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_SET_STATUS) + << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"executing") + << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form"); - xNode << XCHILD(_T("title"), TranslateT("Change Status")); - xNode << XCHILD(_T("instructions"), TranslateT("Choose the status and status message")); + xNode << XCHILD(L"title", TranslateT("Change Status")); + xNode << XCHILD(L"instructions", TranslateT("Choose the status and status message")); - xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE")) - << XATTR(_T("value"), JABBER_FEAT_RC); + xNode << XCHILD(L"field") << XATTR(L"type", L"hidden") << XATTR(L"var", L"FORM_TYPE") + << XATTR(L"value", JABBER_FEAT_RC); - HXML fieldNode = xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Status")) - << XATTR(_T("type"), _T("list-single")) << XATTR(_T("var"), _T("status")); + HXML fieldNode = xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Status")) + << XATTR(L"type", L"list-single") << XATTR(L"var", L"status"); - fieldNode << XCHILD(_T("required")); + fieldNode << XCHILD(L"required"); int status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0); switch (status) { case ID_STATUS_INVISIBLE: - fieldNode << XCHILD(_T("value"), _T("invisible")); + fieldNode << XCHILD(L"value", L"invisible"); break; case ID_STATUS_AWAY: case ID_STATUS_ONTHEPHONE: case ID_STATUS_OUTTOLUNCH: - fieldNode << XCHILD(_T("value"), _T("away")); + fieldNode << XCHILD(L"value", L"away"); break; case ID_STATUS_NA: - fieldNode << XCHILD(_T("value"), _T("xa")); + fieldNode << XCHILD(L"value", L"xa"); break; case ID_STATUS_DND: case ID_STATUS_OCCUPIED: - fieldNode << XCHILD(_T("value"), _T("dnd")); + fieldNode << XCHILD(L"value", L"dnd"); break; case ID_STATUS_FREECHAT: - fieldNode << XCHILD(_T("value"), _T("chat")); + fieldNode << XCHILD(L"value", L"chat"); break; case ID_STATUS_ONLINE: default: - fieldNode << XCHILD(_T("value"), _T("online")); + fieldNode << XCHILD(L"value", L"online"); break; } - fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Free for chat")) << XCHILD(_T("value"), _T("chat")); - fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Online")) << XCHILD(_T("value"), _T("online")); - fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Away")) << XCHILD(_T("value"), _T("away")); - fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Extended away (Not available)")) << XCHILD(_T("value"), _T("xa")); - fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Do not disturb")) << XCHILD(_T("value"), _T("dnd")); - fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Invisible")) << XCHILD(_T("value"), _T("invisible")); - fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Offline")) << XCHILD(_T("value"), _T("offline")); + fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Free for chat")) << XCHILD(L"value", L"chat"); + fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Online")) << XCHILD(L"value", L"online"); + fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Away")) << XCHILD(L"value", L"away"); + fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Extended away (Not available)")) << XCHILD(L"value", L"xa"); + fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Do not disturb")) << XCHILD(L"value", L"dnd"); + fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Invisible")) << XCHILD(L"value", L"invisible"); + fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Offline")) << XCHILD(L"value", L"offline"); // priority TCHAR szPriority[ 256 ]; - mir_sntprintf(szPriority, _T("%d"), (int)getDword("Priority", 5)); - xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Priority")) << XATTR(_T("type"), _T("text-single")) - << XATTR(_T("var"), _T("status-priority")) << XCHILD(_T("value"), szPriority); + mir_sntprintf(szPriority, L"%d", (int)getDword("Priority", 5)); + xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Priority")) << XATTR(L"type", L"text-single") + << XATTR(L"var", L"status-priority") << XCHILD(L"value", szPriority); // status message text - xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Status message")) - << XATTR(_T("type"), _T("text-multi")) << XATTR(_T("var"), _T("status-message")); + xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Status message")) + << XATTR(L"type", L"text-multi") << XATTR(L"var", L"status-message"); // global status - fieldNode = xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Change global status")) - << XATTR(_T("type"), _T("boolean")) << XATTR(_T("var"), _T("status-global")); + fieldNode = xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Change global status")) + << XATTR(L"type", L"boolean") << XATTR(L"var", L"status-global"); ptrT tszStatusMsg((TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGT, status, 0)); if (tszStatusMsg) - fieldNode << XCHILD(_T("value"), tszStatusMsg); + fieldNode << XCHILD(L"value", tszStatusMsg); m_ThreadInfo->send(iq); return JABBER_ADHOC_HANDLER_STATUS_EXECUTING; @@ -337,7 +337,7 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc if (!xNode) return JABBER_ADHOC_HANDLER_STATUS_CANCEL; - HXML fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("status")), valueNode; + HXML fieldNode = XmlGetChildByTag(xNode, "field", "var", L"status"), valueNode; if (!fieldNode) return JABBER_ADHOC_HANDLER_STATUS_CANCEL; @@ -346,19 +346,19 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc return JABBER_ADHOC_HANDLER_STATUS_CANCEL; int status; - if (!mir_tstrcmp(ptszValue, _T("away"))) status = ID_STATUS_AWAY; - else if (!mir_tstrcmp(ptszValue, _T("xa"))) status = ID_STATUS_NA; - else if (!mir_tstrcmp(ptszValue, _T("dnd"))) status = ID_STATUS_DND; - else if (!mir_tstrcmp(ptszValue, _T("chat"))) status = ID_STATUS_FREECHAT; - else if (!mir_tstrcmp(ptszValue, _T("online"))) status = ID_STATUS_ONLINE; - else if (!mir_tstrcmp(ptszValue, _T("invisible"))) status = ID_STATUS_INVISIBLE; - else if (!mir_tstrcmp(ptszValue, _T("offline"))) status = ID_STATUS_OFFLINE; + if (!mir_tstrcmp(ptszValue, L"away")) status = ID_STATUS_AWAY; + else if (!mir_tstrcmp(ptszValue, L"xa")) status = ID_STATUS_NA; + else if (!mir_tstrcmp(ptszValue, L"dnd")) status = ID_STATUS_DND; + else if (!mir_tstrcmp(ptszValue, L"chat")) status = ID_STATUS_FREECHAT; + else if (!mir_tstrcmp(ptszValue, L"online")) status = ID_STATUS_ONLINE; + else if (!mir_tstrcmp(ptszValue, L"invisible")) status = ID_STATUS_INVISIBLE; + else if (!mir_tstrcmp(ptszValue, L"offline")) status = ID_STATUS_OFFLINE; else return JABBER_ADHOC_HANDLER_STATUS_CANCEL; int priority = -9999; - fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("status-priority")); + fieldNode = XmlGetChildByTag(xNode, "field", "var", L"status-priority"); if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value"))) if (ptszValue = XmlGetText(valueNode)) priority = _ttoi(ptszValue); @@ -367,7 +367,7 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc setDword("Priority", priority); const TCHAR *szStatusMessage = NULL; - fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("status-message")); + fieldNode = XmlGetChildByTag(xNode, "field", "var", L"status-message"); if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value"))) szStatusMessage = XmlGetText(valueNode); @@ -375,9 +375,9 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc int nNoDlg = db_get_b(NULL, "SRAway", StatusModeToDbSetting(status, "NoDlg"), 0); db_set_b(NULL, "SRAway", StatusModeToDbSetting(status, "NoDlg"), 1); - db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Msg"), szStatusMessage ? szStatusMessage : _T("")); + db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Msg"), szStatusMessage ? szStatusMessage : L""); - fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("status-global")); + fieldNode = XmlGetChildByTag(xNode, "field", "var", L"status-global"); if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value"))) { if ((ptszValue = XmlGetText(valueNode)) != NULL && _ttoi(ptszValue)) CallService(MS_CLIST_SETSTATUSMODE, status, NULL); @@ -400,32 +400,32 @@ int CJabberProto::AdhocOptionsHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe // first form pSession->SetStage(1); - XmlNodeIq iq(_T("result"), pInfo); + XmlNodeIq iq(L"result", pInfo); HXML xNode = iq - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_SET_OPTIONS) - << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing")) - << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form")); + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_SET_OPTIONS) + << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"executing") + << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form"); - xNode << XCHILD(_T("title"), TranslateT("Set Options")); - xNode << XCHILD(_T("instructions"), TranslateT("Set the desired options")); + xNode << XCHILD(L"title", TranslateT("Set Options")); + xNode << XCHILD(L"instructions", TranslateT("Set the desired options")); - xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE")) - << XATTR(_T("value"), JABBER_FEAT_RC); + xNode << XCHILD(L"field") << XATTR(L"type", L"hidden") << XATTR(L"var", L"FORM_TYPE") + << XATTR(L"value", JABBER_FEAT_RC); // Automatically Accept File Transfers TCHAR szTmpBuff[ 1024 ]; - mir_sntprintf(szTmpBuff, _T("%d"), db_get_b(NULL, "SRFile", "AutoAccept", 0)); - xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Automatically Accept File Transfers")) - << XATTR(_T("type"), _T("boolean")) << XATTR(_T("var"), _T("auto-files")) << XCHILD(_T("value"), szTmpBuff); + mir_sntprintf(szTmpBuff, L"%d", db_get_b(NULL, "SRFile", "AutoAccept", 0)); + xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Automatically Accept File Transfers")) + << XATTR(L"type", L"boolean") << XATTR(L"var", L"auto-files") << XCHILD(L"value", szTmpBuff); // Use sounds - mir_sntprintf(szTmpBuff, _T("%d"), db_get_b(NULL, "Skin", "UseSound", 0)); - xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Play sounds")) - << XATTR(_T("type"), _T("boolean")) << XATTR(_T("var"), _T("sounds")) << XCHILD(_T("value"), szTmpBuff); + mir_sntprintf(szTmpBuff, L"%d", db_get_b(NULL, "Skin", "UseSound", 0)); + xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Play sounds")) + << XATTR(L"type", L"boolean") << XATTR(L"var", L"sounds") << XCHILD(L"value", szTmpBuff); // Disable remote controlling - xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Disable remote controlling (check twice what you are doing)")) - << XATTR(_T("type"), _T("boolean")) << XATTR(_T("var"), _T("enable-rc")) << XCHILD(_T("value"), _T("0")); + xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Disable remote controlling (check twice what you are doing)")) + << XATTR(L"type", L"boolean") << XATTR(L"var", L"enable-rc") << XCHILD(L"value", L"0"); m_ThreadInfo->send(iq); return JABBER_ADHOC_HANDLER_STATUS_EXECUTING; @@ -439,19 +439,19 @@ int CJabberProto::AdhocOptionsHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe return JABBER_ADHOC_HANDLER_STATUS_CANCEL; // Automatically Accept File Transfers - HXML fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("auto-files")), valueNode; + HXML fieldNode = XmlGetChildByTag(xNode, "field", "var", L"auto-files"), valueNode; if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value"))) if (XmlGetText(valueNode)) db_set_b(NULL, "SRFile", "AutoAccept", (BYTE)_ttoi(XmlGetText(valueNode))); // Use sounds - fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("sounds")); + fieldNode = XmlGetChildByTag(xNode, "field", "var", L"sounds"); if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value"))) if (XmlGetText(valueNode)) db_set_b(NULL, "Skin", "UseSound", (BYTE)_ttoi(XmlGetText(valueNode))); // Disable remote controlling - fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("enable-rc")); + fieldNode = XmlGetChildByTag(xNode, "field", "var", L"enable-rc"); if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value"))) if (XmlGetText(valueNode) && _ttoi(XmlGetText(valueNode))) m_options.EnableRemoteControl = 0; @@ -498,10 +498,10 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe mir_sntprintf(szMsg, TranslateT("There is no messages to forward")); m_ThreadInfo->send( - XmlNodeIq(_T("result"), pInfo) - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_FORWARD) - << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("completed")) - << XCHILD(_T("note"), szMsg) << XATTR(_T("type"), _T("info"))); + XmlNodeIq(L"result", pInfo) + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_FORWARD) + << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"completed") + << XCHILD(L"note", szMsg) << XATTR(L"type", L"info")); return JABBER_ADHOC_HANDLER_STATUS_REMOVE_SESSION; } @@ -509,24 +509,24 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe // first form pSession->SetStage(1); - XmlNodeIq iq(_T("result"), pInfo); + XmlNodeIq iq(L"result", pInfo); HXML xNode = iq - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_FORWARD) - << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing")) - << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form")); + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_FORWARD) + << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"executing") + << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form"); - xNode << XCHILD(_T("title"), TranslateT("Forward options")); + xNode << XCHILD(L"title", TranslateT("Forward options")); mir_sntprintf(szMsg, TranslateT("%d message(s) to be forwarded"), nUnreadEvents); - xNode << XCHILD(_T("instructions"), szMsg); + xNode << XCHILD(L"instructions", szMsg); - xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE")) - << XCHILD(_T("value"), JABBER_FEAT_RC); + xNode << XCHILD(L"field") << XATTR(L"type", L"hidden") << XATTR(L"var", L"FORM_TYPE") + << XCHILD(L"value", JABBER_FEAT_RC); // remove clist events - xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Mark messages as read")) << XATTR(_T("type"), _T("boolean")) - << XATTR(_T("var"), _T("remove-clist-events")) << XCHILD(_T("value"), - m_options.RcMarkMessagesAsRead == 1 ? _T("1") : _T("0")); + xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Mark messages as read")) << XATTR(L"type", L"boolean") + << XATTR(L"var", L"remove-clist-events") << XCHILD(L"value", + m_options.RcMarkMessagesAsRead == 1 ? L"1" : L"0"); m_ThreadInfo->send(iq); return JABBER_ADHOC_HANDLER_STATUS_EXECUTING; @@ -542,7 +542,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe BOOL bRemoveCListEvents = TRUE; // remove clist events - HXML fieldNode = XmlGetChildByTag(xNode,"field", "var", _T("remove-clist-events")), valueNode; + HXML fieldNode = XmlGetChildByTag(xNode,"field", "var", L"remove-clist-events"), valueNode; if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value"))) if (XmlGetText(valueNode) && !_ttoi(XmlGetText(valueNode))) bRemoveCListEvents = FALSE; @@ -573,29 +573,29 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe if (szEventText == NULL) continue; - XmlNode msg(_T("message")); - msg << XATTR(_T("to"), pInfo->GetFrom()) << XATTRID(SerialNext()) - << XCHILD(_T("body"), szEventText); + XmlNode msg(L"message"); + msg << XATTR(L"to", pInfo->GetFrom()) << XATTRID(SerialNext()) + << XCHILD(L"body", szEventText); - HXML addressesNode = msg << XCHILDNS(_T("addresses"), JABBER_FEAT_EXT_ADDRESSING); + HXML addressesNode = msg << XCHILDNS(L"addresses", JABBER_FEAT_EXT_ADDRESSING); TCHAR szOFrom[JABBER_MAX_JID_LEN]; size_t cbBlob = mir_strlen((LPSTR)dbei.pBlob)+1; if (cbBlob < dbei.cbBlob) { // rest of message contains a sender's resource ptrT szOResource( mir_utf8decodeT((LPSTR)dbei.pBlob + cbBlob+1)); - mir_sntprintf(szOFrom, _T("%s/%s"), tszJid, szOResource); + mir_sntprintf(szOFrom, L"%s/%s", tszJid, szOResource); } else _tcsncpy_s(szOFrom, tszJid, _TRUNCATE); - addressesNode << XCHILD(_T("address")) << XATTR(_T("type"), _T("ofrom")) << XATTR(_T("jid"), szOFrom); - addressesNode << XCHILD(_T("address")) << XATTR(_T("type"), _T("oto")) << XATTR(_T("jid"), m_ThreadInfo->fullJID); + addressesNode << XCHILD(L"address") << XATTR(L"type", L"ofrom") << XATTR(L"jid", szOFrom); + addressesNode << XCHILD(L"address") << XATTR(L"type", L"oto") << XATTR(L"jid", m_ThreadInfo->fullJID); time_t ltime = (time_t)dbei.timestamp; struct tm *gmt = gmtime(<ime); TCHAR stime[512]; - mir_sntprintf(stime, _T("%.4i-%.2i-%.2iT%.2i:%.2i:%.2iZ"), gmt->tm_year + 1900, gmt->tm_mon + 1, gmt->tm_mday, + mir_sntprintf(stime, L"%.4i-%.2i-%.2iT%.2i:%.2i:%.2iZ", gmt->tm_year + 1900, gmt->tm_mon + 1, gmt->tm_mday, gmt->tm_hour, gmt->tm_min, gmt->tm_sec); - msg << XCHILDNS(_T("delay"), _T("urn:xmpp:delay")) << XATTR(_T("stamp"), stime); + msg << XCHILDNS(L"delay", L"urn:xmpp:delay") << XATTR(L"stamp", stime); m_ThreadInfo->send(msg); @@ -610,10 +610,10 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe mir_sntprintf(szMsg, TranslateT("%d message(s) forwarded"), nEventsSent); m_ThreadInfo->send( - XmlNodeIq(_T("result"), pInfo) - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_FORWARD) - << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("completed")) - << XCHILD(_T("note"), szMsg) << XATTR(_T("type"), _T("info"))); + XmlNodeIq(L"result", pInfo) + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_FORWARD) + << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"completed") + << XCHILD(L"note", szMsg) << XATTR(L"type", L"info")); return JABBER_ADHOC_HANDLER_STATUS_REMOVE_SESSION; } @@ -632,10 +632,10 @@ int CJabberProto::AdhocLockWSHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSes mir_sntprintf(szMsg, TranslateT("Error %d occurred during workstation lock"), GetLastError()); m_ThreadInfo->send( - XmlNodeIq(_T("result"), pInfo) - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_WS_LOCK) - << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("completed")) - << XCHILD(_T("note"), szMsg) << XATTR(_T("type"), bOk ? _T("info") : _T("error"))); + XmlNodeIq(L"result", pInfo) + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_WS_LOCK) + << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"completed") + << XCHILD(L"note", szMsg) << XATTR(L"type", bOk ? L"info" : L"error")); return JABBER_ADHOC_HANDLER_STATUS_REMOVE_SESSION; } @@ -651,21 +651,21 @@ int CJabberProto::AdhocQuitMirandaHandler(HXML, CJabberIqInfo *pInfo, CJabberAdh // first form pSession->SetStage(1); - XmlNodeIq iq(_T("result"), pInfo); + XmlNodeIq iq(L"result", pInfo); HXML xNode = iq - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_QUIT_MIRANDA) - << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing")) - << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form")); + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_QUIT_MIRANDA) + << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"executing") + << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form"); - xNode << XCHILD(_T("title"), TranslateT("Confirmation needed")); - xNode << XCHILD(_T("instructions"), TranslateT("Please confirm Miranda NG shutdown")); + xNode << XCHILD(L"title", TranslateT("Confirmation needed")); + xNode << XCHILD(L"instructions", TranslateT("Please confirm Miranda NG shutdown")); - xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE")) - << XCHILD(_T("value"), JABBER_FEAT_RC); + xNode << XCHILD(L"field") << XATTR(L"type", L"hidden") << XATTR(L"var", L"FORM_TYPE") + << XCHILD(L"value", JABBER_FEAT_RC); // I Agree checkbox - xNode << XCHILD(_T("field")) << XATTR(_T("label"), _T("I agree")) << XATTR(_T("type"), _T("boolean")) - << XATTR(_T("var"), _T("allow-shutdown")) << XCHILD(_T("value"), _T("0")); + xNode << XCHILD(L"field") << XATTR(L"label", L"I agree") << XATTR(L"type", L"boolean") + << XATTR(L"var", L"allow-shutdown") << XCHILD(L"value", L"0"); m_ThreadInfo->send(iq); return JABBER_ADHOC_HANDLER_STATUS_EXECUTING; @@ -681,7 +681,7 @@ int CJabberProto::AdhocQuitMirandaHandler(HXML, CJabberIqInfo *pInfo, CJabberAdh HXML fieldNode, valueNode; // I Agree checkbox - fieldNode = XmlGetChildByTag(xNode,"field", "var", _T("allow-shutdown")); + fieldNode = XmlGetChildByTag(xNode,"field", "var", L"allow-shutdown"); if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value"))) if (XmlGetText(valueNode) && _ttoi(XmlGetText(valueNode))) CallFunctionAsync(JabberQuitMirandaIMThread, 0); @@ -712,38 +712,38 @@ int CJabberProto::AdhocLeaveGroupchatsHandler(HXML, CJabberIqInfo *pInfo, CJabbe mir_sntprintf(szMsg, TranslateT("There is no group chats to leave")); m_ThreadInfo->send( - XmlNodeIq(_T("result"), pInfo) - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_LEAVE_GROUPCHATS) - << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("completed")) - << XCHILD(_T("note"), szMsg) << XATTR(_T("type"), _T("info"))); + XmlNodeIq(L"result", pInfo) + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_LEAVE_GROUPCHATS) + << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"completed") + << XCHILD(L"note", szMsg) << XATTR(L"type", L"info")); return JABBER_ADHOC_HANDLER_STATUS_REMOVE_SESSION; } pSession->SetStage(1); - XmlNodeIq iq(_T("result"), pInfo); + XmlNodeIq iq(L"result", pInfo); HXML xNode = iq - << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_LEAVE_GROUPCHATS) - << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing")) - << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form")); + << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_LEAVE_GROUPCHATS) + << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"executing") + << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form"); - xNode << XCHILD(_T("title"), TranslateT("Leave group chats")); - xNode << XCHILD(_T("instructions"), TranslateT("Choose the group chats you want to leave")); + xNode << XCHILD(L"title", TranslateT("Leave group chats")); + xNode << XCHILD(L"instructions", TranslateT("Choose the group chats you want to leave")); - xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE")) - << XATTR(_T("value"), JABBER_FEAT_RC); + xNode << XCHILD(L"field") << XATTR(L"type", L"hidden") << XATTR(L"var", L"FORM_TYPE") + << XATTR(L"value", JABBER_FEAT_RC); // Groupchats - HXML fieldNode = xNode << XCHILD(_T("field")) << XATTR(_T("label"), NULL) << XATTR(_T("type"), _T("list-multi")) << XATTR(_T("var"), _T("groupchats")); - fieldNode << XCHILD(_T("required")); + HXML fieldNode = xNode << XCHILD(L"field") << XATTR(L"label", NULL) << XATTR(L"type", L"list-multi") << XATTR(L"var", L"groupchats"); + fieldNode << XCHILD(L"required"); { mir_cslock lck(m_csLists); LISTFOREACH_NODEF(i, this, LIST_CHATROOM) { JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i); if (item != NULL) - fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), item->jid) << XCHILD(_T("value"), item->jid); + fieldNode << XCHILD(L"option") << XATTR(L"label", item->jid) << XCHILD(L"value", item->jid); } } @@ -759,11 +759,11 @@ int CJabberProto::AdhocLeaveGroupchatsHandler(HXML, CJabberIqInfo *pInfo, CJabbe return JABBER_ADHOC_HANDLER_STATUS_CANCEL; // Groupchat list here: - HXML fieldNode = XmlGetChildByTag(xNode,"field", "var", _T("groupchats")); + HXML fieldNode = XmlGetChildByTag(xNode,"field", "var", L"groupchats"); if (fieldNode) { for (i=0; i < XmlGetChildCount(fieldNode); i++) { HXML valueNode = XmlGetChild(fieldNode, i); - if (valueNode && XmlGetName(valueNode) && XmlGetText(valueNode) && !mir_tstrcmp(XmlGetName(valueNode), _T("value"))) { + if (valueNode && XmlGetName(valueNode) && XmlGetText(valueNode) && !mir_tstrcmp(XmlGetName(valueNode), L"value")) { JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, XmlGetText(valueNode)); if (item) GcQuit(item, 0, NULL); diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index fde6109462..3c033d178c 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -105,8 +105,8 @@ static int JabberSearchAddField(HWND hwndDlg, Data* FieldDat) int Order = (FieldDat->bHidden) ? -1 : FieldDat->Order; - HWND hwndLabel = CreateWindowEx(0, _T("STATIC"), (LPCTSTR)TranslateTS(FieldDat->Label), WS_CHILD, CornerX, CornerY + Order * 40, width, 13, hwndParent, NULL, hInst, 0); - HWND hwndVar = CreateWindowEx(0 | WS_EX_CLIENTEDGE, _T("EDIT"), (LPCTSTR)FieldDat->defValue, WS_CHILD | WS_TABSTOP, CornerX + 5, CornerY + Order * 40 + 14, width, 20, hwndParent, NULL, hInst, 0); + HWND hwndLabel = CreateWindowEx(0, L"STATIC", (LPCTSTR)TranslateTS(FieldDat->Label), WS_CHILD, CornerX, CornerY + Order * 40, width, 13, hwndParent, NULL, hInst, 0); + HWND hwndVar = CreateWindowEx(0 | WS_EX_CLIENTEDGE, L"EDIT", (LPCTSTR)FieldDat->defValue, WS_CHILD | WS_TABSTOP, CornerX + 5, CornerY + Order * 40 + 14, width, 20, hwndParent, NULL, hInst, 0); SendMessage(hwndLabel, WM_SETFONT, (WPARAM)hFont, 0); SendMessage(hwndVar, WM_SETFONT, (WPARAM)hFont, 0); if (!FieldDat->bHidden) { @@ -137,19 +137,19 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo*) if (!searchHandleDlg) return; - LPCTSTR type = XmlGetAttrValue(iqNode, _T("type")); + LPCTSTR type = XmlGetAttrValue(iqNode, L"type"); if (type == NULL) return; - if (!mir_tstrcmp(type, _T("result"))) { - HXML queryNode = XmlGetNthChild(iqNode, _T("query"), 1); + if (!mir_tstrcmp(type, L"result")) { + HXML queryNode = XmlGetNthChild(iqNode, L"query", 1); HXML xNode = XmlGetChildByTag(queryNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS); ShowWindow(searchHandleDlg, SW_HIDE); if (xNode) { //1. Form PostMessage(searchHandleDlg, WM_USER + 11, (WPARAM)xmlCopyNode(xNode), 0); - HXML xcNode = XmlGetNthChild(xNode, _T("instructions"), 1); + HXML xcNode = XmlGetNthChild(xNode, L"instructions", 1); if (xcNode) SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, XmlGetText(xcNode)); } @@ -160,7 +160,7 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo*) if (!chNode) break; - if (!mir_tstrcmpi(XmlGetName(chNode), _T("instructions")) && XmlGetText(chNode)) + if (!mir_tstrcmpi(XmlGetName(chNode), L"instructions") && XmlGetText(chNode)) SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, TranslateTS(XmlGetText(chNode))); else if (XmlGetName(chNode)) { Data *MyData = (Data*)malloc(sizeof(Data)); @@ -177,22 +177,22 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo*) } } - const TCHAR *szFrom = XmlGetAttrValue(iqNode, _T("from")); + const TCHAR *szFrom = XmlGetAttrValue(iqNode, L"from"); if (szFrom) SearchAddToRecent(szFrom, searchHandleDlg); PostMessage(searchHandleDlg, WM_USER + 10, 0, 0); ShowWindow(searchHandleDlg, SW_SHOW); } - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { const TCHAR *code = NULL; const TCHAR *description = NULL; TCHAR buff[255]; HXML errorNode = XmlGetChild(iqNode, "error"); if (errorNode) { - code = XmlGetAttrValue(errorNode, _T("code")); + code = XmlGetAttrValue(errorNode, L"code"); description = XmlGetText(errorNode); } - mir_sntprintf(buff, TranslateT("Error %s %s\r\nPlease select other server"), code ? code : _T(""), description ? description : _T("")); + mir_sntprintf(buff, TranslateT("Error %s %s\r\nPlease select other server"), code ? code : L"", description ? description : L""); SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, buff); } else SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, TranslateT("Error: unknown reply received\r\nPlease select other server")); @@ -203,7 +203,7 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo*) // The pmFields is the pointer to map of <field Name, field Label> Not unical but ordered // This can help to made result parser routines more simple -static TCHAR *nickfields[] = { _T("nick"), _T("nickname"), _T("fullname"), _T("name"), _T("given"), _T("first"), _T("jid"), NULL }; +static TCHAR *nickfields[] = { L"nick", L"nickname", L"fullname", L"name", L"given", L"first", L"jid", NULL }; void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_MAP * pmAllFields) { @@ -260,8 +260,8 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M for (int j = 0; j < nFieldCount; j++) { TCHAR *var = ListOfFields[j]; TCHAR *value = pmUserData->operator [](var); - Results.pszFields[j] = value ? value : (TCHAR *)_T(" "); - if (!mir_tstrcmpi(var, _T("jid")) && value) + Results.pszFields[j] = value ? value : (TCHAR *)L" "; + if (!mir_tstrcmpi(var, L"jid") && value) Results.psr.id.t = value; } @@ -271,7 +271,7 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M if (nick) { if (mir_tstrcmpi(nick, Results.psr.id.t)) - mir_sntprintf(buff, _T("%s (%s)"), nick, Results.psr.id.t); + mir_sntprintf(buff, L"%s (%s)", nick, Results.psr.id.t); else _tcsncpy_s(buff, nick, _TRUNCATE); @@ -307,23 +307,23 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo*) U_TCHAR_MAP mColumnsNames(10); LIST<void> SearchResults(2); - if (((id = JabberGetPacketID(iqNode)) == -1) || ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL)) { + if (((id = JabberGetPacketID(iqNode)) == -1) || ((type = XmlGetAttrValue(iqNode, L"type")) == NULL)) { ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); return; } - if (!mir_tstrcmp(type, _T("result"))) { - HXML queryNode = XmlGetNthChild(iqNode, _T("query"), 1); + if (!mir_tstrcmp(type, L"result")) { + HXML queryNode = XmlGetNthChild(iqNode, L"query", 1); HXML xNode = XmlGetChildByTag(queryNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS); if (xNode) { //1. Form search results info - HXML reportNode = XmlGetNthChild(xNode, _T("reported"), 1); + HXML reportNode = XmlGetNthChild(xNode, L"reported", 1); if (reportNode) { int i = 1; - while (HXML fieldNode = XmlGetNthChild(reportNode, _T("field"), i++)) { - TCHAR *var = (TCHAR*)XmlGetAttrValue(fieldNode, _T("var")); + while (HXML fieldNode = XmlGetNthChild(reportNode, L"field", i++)) { + TCHAR *var = (TCHAR*)XmlGetAttrValue(fieldNode, L"var"); if (var) { - TCHAR *Label = (TCHAR*)XmlGetAttrValue(fieldNode, _T("label")); + TCHAR *Label = (TCHAR*)XmlGetAttrValue(fieldNode, L"label"); mColumnsNames.insert(var, (Label != NULL) ? Label : var); } } @@ -331,12 +331,12 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo*) int i = 1; HXML itemNode; - while (itemNode = XmlGetNthChild(xNode, _T("item"), i++)) { + while (itemNode = XmlGetNthChild(xNode, L"item", i++)) { U_TCHAR_MAP *pUserColumn = new U_TCHAR_MAP(10); int j = 1; - while (HXML fieldNode = XmlGetNthChild(itemNode, _T("field"), j++)) { - if (TCHAR* var = (TCHAR*)XmlGetAttrValue(fieldNode, _T("var"))) { - if (TCHAR* Text = (TCHAR*)XmlGetText(XmlGetChild(fieldNode, _T("value")))) { + while (HXML fieldNode = XmlGetNthChild(itemNode, L"field", j++)) { + if (TCHAR* var = (TCHAR*)XmlGetAttrValue(fieldNode, L"var")) { + if (TCHAR* Text = (TCHAR*)XmlGetText(XmlGetChild(fieldNode, L"value"))) { if (!mColumnsNames[var]) mColumnsNames.insert(var, var); pUserColumn->insert(var, Text); @@ -350,14 +350,14 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo*) else { //2. Field list search results info int i = 1; - while (HXML itemNode = XmlGetNthChild(queryNode, _T("item"), i++)) { + while (HXML itemNode = XmlGetNthChild(queryNode, L"item", i++)) { U_TCHAR_MAP *pUserColumn = new U_TCHAR_MAP(10); - TCHAR *jid = (TCHAR*)XmlGetAttrValue(itemNode, _T("jid")); + TCHAR *jid = (TCHAR*)XmlGetAttrValue(itemNode, L"jid"); TCHAR *keyReturned; - mColumnsNames.insertCopyKey(_T("jid"), _T("jid"), &keyReturned, CopyKey, DestroyKey); - mColumnsNames.insert(_T("jid"), keyReturned); - pUserColumn->insertCopyKey(_T("jid"), jid, NULL, CopyKey, DestroyKey); + mColumnsNames.insertCopyKey(L"jid", L"jid", &keyReturned, CopyKey, DestroyKey); + mColumnsNames.insert(L"jid", keyReturned); + pUserColumn->insertCopyKey(L"jid", jid, NULL, CopyKey, DestroyKey); for (int j = 0;; j++) { HXML child = XmlGetChild(itemNode, j); @@ -368,7 +368,7 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo*) if (szColumnName) { LPCTSTR ptszChild = XmlGetText(child); if (ptszChild && *ptszChild) { - mColumnsNames.insertCopyKey((TCHAR*)szColumnName, _T(""), &keyReturned, CopyKey, DestroyKey); + mColumnsNames.insertCopyKey((TCHAR*)szColumnName, L"", &keyReturned, CopyKey, DestroyKey); mColumnsNames.insert((TCHAR*)szColumnName, keyReturned); pUserColumn->insertCopyKey((TCHAR*)szColumnName, (TCHAR*)ptszChild, NULL, CopyKey, DestroyKey); } @@ -379,17 +379,17 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo*) } } } - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { const TCHAR *code = NULL; const TCHAR *description = NULL; TCHAR buff[255]; HXML errorNode = XmlGetChild(iqNode, "error"); if (errorNode) { - code = XmlGetAttrValue(errorNode, _T("code")); + code = XmlGetAttrValue(errorNode, L"code"); description = XmlGetText(errorNode); } - mir_sntprintf(buff, TranslateT("Error %s %s\r\nTry to specify more detailed"), code ? code : _T(""), description ? description : _T("")); + mir_sntprintf(buff, TranslateT("Error %s %s\r\nTry to specify more detailed"), code ? code : L"", description ? description : L""); ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); if (searchHandleDlg) SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, buff); @@ -477,7 +477,7 @@ int CJabberProto::SearchRenewFields(HWND hwndDlg, JabberSearchData *dat) searchHandleDlg = hwndDlg; CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultGetSearchFields, JABBER_IQ_TYPE_GET, szServerName); - m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(_T("jabber:iq:search"))); + m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(L"jabber:iq:search")); return pInfo->GetIqId(); } @@ -715,7 +715,7 @@ HWND __cdecl CJabberProto::CreateExtendedSearchUI(HWND parent) { if (parent && hInst) { ptrT szServer(getTStringA("LoginServer")); - if (szServer == NULL || mir_tstrcmpi(szServer, _T("S.ms"))) + if (szServer == NULL || mir_tstrcmpi(szServer, L"S.ms")) return CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SEARCHUSER), parent, JabberSearchAdvancedDlgProc, (LPARAM)this); } @@ -748,10 +748,10 @@ HWND __cdecl CJabberProto::SearchAdvanced(HWND hwndDlg) // formating query CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultAdvancedSearch, JABBER_IQ_TYPE_SET, szServerName); XmlNodeIq iq(pInfo); - HXML query = iq << XQUERY(_T("jabber:iq:search")); + HXML query = iq << XQUERY(L"jabber:iq:search"); if (m_tszSelectedLang) - iq << XATTR(_T("xml:lang"), m_tszSelectedLang); // i'm sure :) + iq << XATTR(L"xml:lang", m_tszSelectedLang); // i'm sure :) // next can be 2 cases: // Forms: XEP-0055 Example 7 diff --git a/protocols/JabberG/src/jabber_search.h b/protocols/JabberG/src/jabber_search.h index b8247ac8f4..ef96830e7b 100644 --- a/protocols/JabberG/src/jabber_search.h +++ b/protocols/JabberG/src/jabber_search.h @@ -208,7 +208,7 @@ public: if (rv->_value) return rv->_value; else - return _T(""); + return L""; } else return NULL; diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index 66a879d302..1308ba8a40 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -36,11 +36,11 @@ TNtlmAuth::TNtlmAuth(ThreadData *info, const char* mechanism, const TCHAR *hostn const TCHAR *szProvider; if (!mir_strcmp(mechanism, "GSS-SPNEGO")) - szProvider = _T("Negotiate"); + szProvider = L"Negotiate"; else if (!mir_strcmp(mechanism, "GSSAPI")) - szProvider = _T("GSSAPI"); + szProvider = L"GSSAPI"; else if (!mir_strcmp(mechanism, "NTLM")) - szProvider = _T("NTLM"); + szProvider = L"NTLM"; else { LBL_Invalid: bIsValid = false; @@ -48,7 +48,7 @@ LBL_Invalid: return; } - TCHAR szSpn[1024] = _T(""); + TCHAR szSpn[1024] = L""; if (mir_strcmp(mechanism, "NTLM")) if (!getSpn(szSpn, _countof(szSpn)) && !mir_strcmp(mechanism, "GSSAPI")) goto LBL_Invalid; @@ -65,7 +65,7 @@ TNtlmAuth::~TNtlmAuth() bool TNtlmAuth::getSpn(TCHAR* szSpn, size_t dwSpnLen) { - TCHAR szFullUserName[128] = _T(""); + TCHAR szFullUserName[128] = L""; ULONG szFullUserNameLen = _countof(szFullUserName); if (!GetUserNameEx(NameDnsDomain, szFullUserName, &szFullUserNameLen)) { szFullUserName[0] = 0; @@ -79,7 +79,7 @@ bool TNtlmAuth::getSpn(TCHAR* szSpn, size_t dwSpnLen) if (szHostName && szHostName[0]) { TCHAR *szFullUserNameU = _tcsupr(mir_tstrdup(szFullUserName)); - mir_sntprintf(szSpn, dwSpnLen, _T("xmpp/%s/%s@%s"), szHostName, szFullUserName, szFullUserNameU); + mir_sntprintf(szSpn, dwSpnLen, L"xmpp/%s/%s@%s", szHostName, szFullUserName, szFullUserNameU); mir_free(szFullUserNameU); } else { @@ -91,7 +91,7 @@ bool TNtlmAuth::getSpn(TCHAR* szSpn, size_t dwSpnLen) connectHost = host->h_name; TCHAR *connectHostT = mir_a2t(connectHost); - mir_sntprintf(szSpn, dwSpnLen, _T("xmpp/%s@%s"), connectHostT, _tcsupr(szFullUserName)); + mir_sntprintf(szSpn, dwSpnLen, L"xmpp/%s@%s", connectHostT, _tcsupr(szFullUserName)); mir_free(connectHostT); } @@ -116,7 +116,7 @@ char* TNtlmAuth::getChallenge(const TCHAR *challenge) if (!hProvider) return NULL; - ptrA text((!mir_tstrcmp(challenge, _T("="))) ? mir_strdup("") : mir_t2a(challenge)); + ptrA text((!mir_tstrcmp(challenge, L"=")) ? mir_strdup("") : mir_t2a(challenge)); if (info->conn.password[0] != 0) return Netlib_NtlmCreateResponse2(hProvider, text, info->conn.username, info->conn.password, &complete); diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 0c9abaf40a..bfdee3d9c7 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -153,15 +153,15 @@ INT_PTR __cdecl CJabberProto::JabberGetAvatarInfo(WPARAM wParam, LPARAM lParam) TCHAR szJid[JABBER_MAX_JID_LEN]; szJid[0] = 0; if (item->arResources.getCount() != NULL && !isXVcard) if (TCHAR *bestResName = ListGetBestClientResourceNamePtr(tszJid)) - mir_sntprintf(szJid, _T("%s/%s"), tszJid, bestResName); + mir_sntprintf(szJid, L"%s/%s", tszJid, bestResName); if (szJid[0] == 0) _tcsncpy_s(szJid, tszJid, _TRUNCATE); - debugLog(_T("Rereading %s for %s"), isXVcard ? JABBER_FEAT_VCARD_TEMP : JABBER_FEAT_AVATAR, szJid); + debugLog(L"Rereading %s for %s", isXVcard ? JABBER_FEAT_VCARD_TEMP : JABBER_FEAT_AVATAR, szJid); m_ThreadInfo->send((isXVcard) ? - XmlNodeIq( AddIQ(&CJabberProto::OnIqResultGetVCardAvatar, JABBER_IQ_TYPE_GET, szJid)) << XCHILDNS(_T("vCard"), JABBER_FEAT_VCARD_TEMP) : + XmlNodeIq( AddIQ(&CJabberProto::OnIqResultGetVCardAvatar, JABBER_IQ_TYPE_GET, szJid)) << XCHILDNS(L"vCard", JABBER_FEAT_VCARD_TEMP) : XmlNodeIq( AddIQ(&CJabberProto::OnIqResultGetClientAvatar, JABBER_IQ_TYPE_GET, szJid)) << XQUERY(JABBER_FEAT_AVATAR)); return GAIR_WAITFOR; } @@ -299,7 +299,7 @@ INT_PTR __cdecl CJabberProto::JabberSetAvatar(WPARAM, LPARAM lParam) m_options.AvatarType = ProtoGetBufferFormat(pResult); GetAvatarFileName(NULL, tFileName, MAX_PATH); - FILE *out = _tfopen(tFileName, _T("wb")); + FILE *out = _tfopen(tFileName, L"wb"); if (out != NULL) { fwrite(pResult, dwPngSize, 1, out); fclose(out); @@ -320,7 +320,7 @@ INT_PTR __cdecl CJabberProto::JabberSetNickname(WPARAM wParam, LPARAM lParam) TCHAR *nickname = (wParam & SMNN_UNICODE) ? mir_u2t((WCHAR*)lParam) : mir_a2t((char*)lParam); setTString("Nick", nickname); - SetServerVcard(FALSE, _T("")); + SetServerVcard(FALSE, L""); return 0; } @@ -341,13 +341,13 @@ static const TCHAR *JabberEnum2AffilationStr[] = { LPGENT("None"), LPGENT("Outca static void appendString(bool bIsTipper, const TCHAR *tszTitle, const TCHAR *tszValue, CMString &out) { if (!out.IsEmpty()) - out.Append(bIsTipper ? _T("\n") : _T("\r\n")); + out.Append(bIsTipper ? L"\n" : L"\r\n"); if (bIsTipper) - out.AppendFormat(_T("<b>%s</b>\t%s"), TranslateTS(tszTitle), tszValue); + out.AppendFormat(L"<b>%s</b>\t%s", TranslateTS(tszTitle), tszValue); else { TCHAR *p = TranslateTS(tszTitle); - out.AppendFormat(_T("%s%s\t%s"), p, mir_tstrlen(p) <= 7 ? _T("\t") : _T(""), tszValue); + out.AppendFormat(L"%s%s\t%s", p, mir_tstrlen(p) <= 7 ? L"\t" : L"", tszValue); } } @@ -434,7 +434,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) *(szSecondParam++) = 0; // no command or message command - if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, _T("message")))) { + if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, L"message"))) { // message if (!ServiceExists(MS_MSG_SENDMESSAGEW)) return 1; @@ -447,7 +447,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) return 1; if (szSecondParam) { //there are parameters to message - szMsgBody = _tcsstr(szSecondParam, _T("body=")); + szMsgBody = _tcsstr(szSecondParam, L"body="); if (szMsgBody) { szMsgBody += 5; TCHAR *szDelim = _tcschr(szMsgBody, _T(';')); @@ -461,7 +461,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) return 0; } - if (!mir_tstrcmpi(szCommand, _T("roster"))) { + if (!mir_tstrcmpi(szCommand, L"roster")) { if (!HContactFromJID(szJid)) { PROTOSEARCHRESULT psr = { 0 }; psr.cbSize = sizeof(psr); @@ -479,21 +479,21 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) } // chat join invitation - if (!mir_tstrcmpi(szCommand, _T("join"))) { + if (!mir_tstrcmpi(szCommand, L"join")) { GroupchatJoinRoomByJid(NULL, szJid); return 0; } // service discovery request - if (!mir_tstrcmpi(szCommand, _T("disco"))) { + if (!mir_tstrcmpi(szCommand, L"disco")) { OnMenuHandleServiceDiscovery(0, (LPARAM)szJid); return 0; } // ad-hoc commands - if (!mir_tstrcmpi(szCommand, _T("command"))) { + if (!mir_tstrcmpi(szCommand, L"command")) { if (szSecondParam) { - if (!_tcsnicmp(szSecondParam, _T("node="), 5)) { + if (!_tcsnicmp(szSecondParam, L"node=", 5)) { szSecondParam += 5; if (!*szSecondParam) szSecondParam = NULL; @@ -506,7 +506,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) } // send file - if (!mir_tstrcmpi(szCommand, _T("sendfile"))) { + if (!mir_tstrcmpi(szCommand, L"sendfile")) { MCONTACT hContact = HContactFromJID(szJid, false); if (hContact == NULL) hContact = DBCreateContact(szJid, szJid, true, true); @@ -532,13 +532,13 @@ INT_PTR __cdecl CJabberProto::JabberSendNudge(WPARAM hContact, LPARAM) TCHAR tszJid[JABBER_MAX_JID_LEN]; TCHAR *szResource = ListGetBestClientResourceNamePtr(jid); if (szResource) - mir_sntprintf(tszJid, _T("%s/%s"), jid, szResource); + mir_sntprintf(tszJid, L"%s/%s", jid, szResource); else _tcsncpy_s(tszJid, jid, _TRUNCATE); m_ThreadInfo->send( - XmlNode(_T("message")) << XATTR(_T("type"), _T("headline")) << XATTR(_T("to"), tszJid) - << XCHILDNS(_T("attention"), JABBER_FEAT_ATTENTION)); + XmlNode(L"message") << XATTR(L"type", L"headline") << XATTR(L"to", tszJid) + << XCHILDNS(L"attention", JABBER_FEAT_ATTENTION)); return 0; } @@ -548,29 +548,29 @@ BOOL CJabberProto::SendHttpAuthReply(CJabberHttpAuthParams *pParams, BOOL bAutho return FALSE; if (pParams->m_nType == CJabberHttpAuthParams::IQ) { - XmlNodeIq iq(bAuthorized ? _T("result") : _T("error"), pParams->m_szIqId, pParams->m_szFrom); + XmlNodeIq iq(bAuthorized ? L"result" : L"error", pParams->m_szIqId, pParams->m_szFrom); if (!bAuthorized) { - iq << XCHILDNS(_T("confirm"), JABBER_FEAT_HTTP_AUTH) << XATTR(_T("id"), pParams->m_szId) - << XATTR(_T("method"), pParams->m_szMethod) << XATTR(_T("url"), pParams->m_szUrl); - iq << XCHILD(_T("error")) << XATTRI(_T("code"), 401) << XATTR(_T("type"), _T("auth")) - << XCHILDNS(_T("not-authorized"), _T("urn:ietf:params:xml:xmpp-stanzas")); + iq << XCHILDNS(L"confirm", JABBER_FEAT_HTTP_AUTH) << XATTR(L"id", pParams->m_szId) + << XATTR(L"method", pParams->m_szMethod) << XATTR(L"url", pParams->m_szUrl); + iq << XCHILD(L"error") << XATTRI(L"code", 401) << XATTR(L"type", L"auth") + << XCHILDNS(L"not-authorized", L"urn:ietf:params:xml:xmpp-stanzas"); } m_ThreadInfo->send(iq); } else if (pParams->m_nType == CJabberHttpAuthParams::MSG) { - XmlNode msg(_T("message")); - msg << XATTR(_T("to"), pParams->m_szFrom); + XmlNode msg(L"message"); + msg << XATTR(L"to", pParams->m_szFrom); if (!bAuthorized) - msg << XATTR(_T("type"), _T("error")); + msg << XATTR(L"type", L"error"); if (pParams->m_szThreadId) - msg << XCHILD(_T("thread"), pParams->m_szThreadId); + msg << XCHILD(L"thread", pParams->m_szThreadId); - msg << XCHILDNS(_T("confirm"), JABBER_FEAT_HTTP_AUTH) << XATTR(_T("id"), pParams->m_szId) - << XATTR(_T("method"), pParams->m_szMethod) << XATTR(_T("url"), pParams->m_szUrl); + msg << XCHILDNS(L"confirm", JABBER_FEAT_HTTP_AUTH) << XATTR(L"id", pParams->m_szId) + << XATTR(L"method", pParams->m_szMethod) << XATTR(L"url", pParams->m_szUrl); if (!bAuthorized) - msg << XCHILD(_T("error")) << XATTRI(_T("code"), 401) << XATTR(_T("type"), _T("auth")) - << XCHILDNS(_T("not-authorized"), _T("urn:ietf:params:xml:xmpp-stanzas")); + msg << XCHILD(L"error") << XATTRI(L"code", 401) << XATTR(L"type", L"auth") + << XCHILDNS(L"not-authorized", L"urn:ietf:params:xml:xmpp-stanzas"); m_ThreadInfo->send(msg); } diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 312422bae7..328ada850e 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -191,16 +191,16 @@ void CJabberProto::xmlStreamInitializeNow(ThreadData *info) m_szXmlStreamToBeInitialized = NULL; } - HXML n = xmlCreateNode(_T("xml"), NULL, 1) << XATTR(_T("version"), _T("1.0")) << XATTR(_T("encoding"), _T("UTF-8")); + HXML n = xmlCreateNode(L"xml", NULL, 1) << XATTR(L"version", L"1.0") << XATTR(L"encoding", L"UTF-8"); - HXML stream = n << XCHILDNS(_T("stream:stream"), _T("jabber:client")) << XATTR(_T("to"), _A2T(info->conn.server)) - << XATTR(_T("xmlns:stream"), _T("http://etherx.jabber.org/streams")); + HXML stream = n << XCHILDNS(L"stream:stream", L"jabber:client") << XATTR(L"to", _A2T(info->conn.server)) + << XATTR(L"xmlns:stream", L"http://etherx.jabber.org/streams"); if (m_tszSelectedLang) - XmlAddAttr(stream, _T("xml:lang"), m_tszSelectedLang); + XmlAddAttr(stream, L"xml:lang", m_tszSelectedLang); if (!m_options.Disable3920auth) - XmlAddAttr(stream, _T("version"), _T("1.0")); + XmlAddAttr(stream, L"version", L"1.0"); LPTSTR xmlQuery = xmlToString(n, NULL); T2Utf buf(xmlQuery); @@ -279,17 +279,17 @@ LBL_FatalError: if (m_options.HostNameAsResource) { DWORD dwCompNameLen = _countof(info.resource) - 1; if (!GetComputerName(info.resource, &dwCompNameLen)) - mir_tstrcpy(info.resource, _T("Miranda")); + mir_tstrcpy(info.resource, L"Miranda"); } else { if ((tszValue = getTStringA("Resource")) != NULL) _tcsncpy_s(info.resource, tszValue, _TRUNCATE); else - mir_tstrcpy(info.resource, _T("Miranda")); + mir_tstrcpy(info.resource, L"Miranda"); } TCHAR jidStr[512]; - mir_sntprintf(jidStr, _T("%s@%S/%s"), info.conn.username, info.conn.server, info.resource); + mir_sntprintf(jidStr, L"%s@%S/%s", info.conn.username, info.conn.server, info.resource); _tcsncpy_s(info.fullJID, jidStr, _TRUNCATE); if (m_options.UseDomainLogin) // in the case of NTLM auth we have no need in password @@ -298,7 +298,7 @@ LBL_FatalError: if (m_savedPassword != NULL) _tcsncpy_s(info.conn.password, m_savedPassword, _TRUNCATE); else { - mir_sntprintf(jidStr, _T("%s@%S"), info.conn.username, info.conn.server); + mir_sntprintf(jidStr, L"%s@%S", info.conn.username, info.conn.server); JabberPasswordDlgParam param; param.pro = this; @@ -392,7 +392,7 @@ LBL_FatalError: if (!info.bIsReg) { size_t len = mir_tstrlen(info.conn.username) + mir_strlen(info.conn.server) + 1; m_szJabberJID = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1)); - mir_sntprintf(m_szJabberJID, len + 1, _T("%s@%S"), info.conn.username, info.conn.server); + mir_sntprintf(m_szJabberJID, len + 1, L"%s@%S", info.conn.username, info.conn.server); m_bSendKeepAlive = m_options.KeepAlive != 0; setTString("jid", m_szJabberJID); // store jid in database @@ -400,7 +400,7 @@ LBL_FatalError: } xmlStreamInitializeNow(&info); - const TCHAR *tag = _T("stream:stream"); + const TCHAR *tag = L"stream:stream"; debugLogA("Entering main recv loop"); int datalen = 0; @@ -424,7 +424,7 @@ LBL_FatalError: if (info.jabberServerCaps & JABBER_CAPS_PING) { CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnPingReply, JABBER_IQ_TYPE_GET, NULL, 0, -1, this); pInfo->SetTimeout(m_options.ConnectionKeepAliveTimeout); - info.send(XmlNodeIq(pInfo) << XATTR(_T("from"), info.fullJID) << XCHILDNS(_T("ping"), JABBER_FEAT_PING)); + info.send(XmlNodeIq(pInfo) << XATTR(L"from", info.fullJID) << XCHILDNS(L"ping", JABBER_FEAT_PING)); } else info.send(" \t "); continue; @@ -489,7 +489,7 @@ recvRest: if (m_szXmlStreamToBeInitialized) { xmlStreamInitializeNow(&info); - tag = _T("stream:stream"); + tag = L"stream:stream"; } if (root && datalen) goto recvRest; @@ -551,7 +551,7 @@ recvRest: void CJabberProto::PerformRegistration(ThreadData *info) { iqIdRegGetReg = SerialNext(); - info->send(XmlNodeIq(_T("get"), iqIdRegGetReg, NULL) << XQUERY(JABBER_FEAT_REGISTER)); + info->send(XmlNodeIq(L"get", iqIdRegGetReg, NULL) << XQUERY(JABBER_FEAT_REGISTER)); SendMessage(info->conn.reg_hwndDlg, WM_JABBER_REGDLG_UPDATE, 50, (LPARAM)TranslateT("Requesting registration instruction...")); } @@ -560,7 +560,7 @@ void CJabberProto::PerformIqAuth(ThreadData *info) { if (!info->bIsReg) { info->send(XmlNodeIq(AddIQ(&CJabberProto::OnIqResultGetAuth, JABBER_IQ_TYPE_GET)) - << XQUERY(_T("jabber:iq:auth")) << XCHILD(_T("username"), info->conn.username)); + << XQUERY(L"jabber:iq:auth") << XCHILD(L"username", info->conn.username)); } else PerformRegistration(info); } @@ -569,17 +569,17 @@ void CJabberProto::PerformIqAuth(ThreadData *info) void CJabberProto::OnProcessStreamOpening(HXML node, ThreadData *info) { - if (mir_tstrcmp(XmlGetName(node), _T("stream:stream"))) + if (mir_tstrcmp(XmlGetName(node), L"stream:stream")) return; if (!info->bIsReg) { - const TCHAR *sid = XmlGetAttrValue(node, _T("id")); + const TCHAR *sid = XmlGetAttrValue(node, L"id"); if (sid != NULL) info->szStreamId = mir_t2a(sid); } // old server - disable SASL then - if (XmlGetAttrValue(node, _T("version")) == NULL) + if (XmlGetAttrValue(node, L"version") == NULL) info->proto->m_options.Disable3920auth = TRUE; if (info->proto->m_options.Disable3920auth) @@ -665,8 +665,8 @@ void CJabberProto::PerformAuthentication(ThreadData *info) info->auth = auth; if (!request) request = auth->getInitialRequest(); - info->send(XmlNode(_T("auth"), _A2T(request)) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-sasl")) - << XATTR(_T("mechanism"), _A2T(auth->getName()))); + info->send(XmlNode(L"auth", _A2T(request)) << XATTR(L"xmlns", L"urn:ietf:params:xml:ns:xmpp-sasl") + << XATTR(L"mechanism", _A2T(auth->getName()))); mir_free(request); } @@ -682,29 +682,29 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info) if (!n) break; - if (!mir_tstrcmp(XmlGetName(n), _T("starttls"))) { + if (!mir_tstrcmp(XmlGetName(n), L"starttls")) { if (!info->conn.useSSL && m_options.UseTLS) { debugLogA("Requesting TLS"); - info->send(XmlNode(XmlGetName(n)) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-tls"))); + info->send(XmlNode(XmlGetName(n)) << XATTR(L"xmlns", L"urn:ietf:params:xml:ns:xmpp-tls")); return; } } - if (!mir_tstrcmp(XmlGetName(n), _T("compression")) && m_options.EnableZlib == TRUE) { + if (!mir_tstrcmp(XmlGetName(n), L"compression") && m_options.EnableZlib == TRUE) { debugLogA("Server compression available"); for (int k = 0;; k++) { HXML c = XmlGetChild(n, k); if (!c) break; - if (!mir_tstrcmp(XmlGetName(c), _T("method"))) { - if (!mir_tstrcmp(XmlGetText(c), _T("zlib")) && info->zlibInit() == TRUE) { + if (!mir_tstrcmp(XmlGetName(c), L"method")) { + if (!mir_tstrcmp(XmlGetText(c), L"zlib") && info->zlibInit() == TRUE) { debugLogA("Requesting Zlib compression"); - info->send(XmlNode(_T("compress")) << XATTR(_T("xmlns"), _T("http://jabber.org/protocol/compress")) - << XCHILD(_T("method"), _T("zlib"))); + info->send(XmlNode(L"compress") << XATTR(L"xmlns", L"http://jabber.org/protocol/compress") + << XCHILD(L"method", L"zlib")); return; } } } } - if (!mir_tstrcmp(XmlGetName(n), _T("mechanisms"))) { + if (!mir_tstrcmp(XmlGetName(n), L"mechanisms")) { m_AuthMechs.isPlainAvailable = false; m_AuthMechs.isPlainOldAvailable = false; m_AuthMechs.isMd5Available = false; @@ -721,26 +721,26 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info) if (!c) break; - if (!mir_tstrcmp(XmlGetName(c), _T("mechanism"))) { + if (!mir_tstrcmp(XmlGetName(c), L"mechanism")) { LPCTSTR ptszMechanism = XmlGetText(c); - if (!mir_tstrcmp(ptszMechanism, _T("PLAIN"))) m_AuthMechs.isPlainOldAvailable = m_AuthMechs.isPlainAvailable = true; - else if (!mir_tstrcmp(ptszMechanism, _T("DIGEST-MD5"))) m_AuthMechs.isMd5Available = true; - else if (!mir_tstrcmp(ptszMechanism, _T("SCRAM-SHA-1"))) m_AuthMechs.isScramAvailable = true; - else if (!mir_tstrcmp(ptszMechanism, _T("NTLM"))) m_AuthMechs.isNtlmAvailable = true; - else if (!mir_tstrcmp(ptszMechanism, _T("GSS-SPNEGO"))) m_AuthMechs.isSpnegoAvailable = true; - else if (!mir_tstrcmp(ptszMechanism, _T("GSSAPI"))) m_AuthMechs.isKerberosAvailable = true; + if (!mir_tstrcmp(ptszMechanism, L"PLAIN")) m_AuthMechs.isPlainOldAvailable = m_AuthMechs.isPlainAvailable = true; + else if (!mir_tstrcmp(ptszMechanism, L"DIGEST-MD5")) m_AuthMechs.isMd5Available = true; + else if (!mir_tstrcmp(ptszMechanism, L"SCRAM-SHA-1")) m_AuthMechs.isScramAvailable = true; + else if (!mir_tstrcmp(ptszMechanism, L"NTLM")) m_AuthMechs.isNtlmAvailable = true; + else if (!mir_tstrcmp(ptszMechanism, L"GSS-SPNEGO")) m_AuthMechs.isSpnegoAvailable = true; + else if (!mir_tstrcmp(ptszMechanism, L"GSSAPI")) m_AuthMechs.isKerberosAvailable = true; } - else if (!mir_tstrcmp(XmlGetName(c), _T("hostname"))) { - const TCHAR *mech = XmlGetAttrValue(c, _T("mechanism")); - if (mech && mir_tstrcmpi(mech, _T("GSSAPI")) == 0) { + else if (!mir_tstrcmp(XmlGetName(c), L"hostname")) { + const TCHAR *mech = XmlGetAttrValue(c, L"mechanism"); + if (mech && mir_tstrcmpi(mech, L"GSSAPI") == 0) { m_AuthMechs.m_gssapiHostName = mir_tstrdup(XmlGetText(c)); } } } } - else if (!mir_tstrcmp(XmlGetName(n), _T("register"))) isRegisterAvailable = true; - else if (!mir_tstrcmp(XmlGetName(n), _T("auth"))) m_AuthMechs.isAuthAvailable = true; - else if (!mir_tstrcmp(XmlGetName(n), _T("session"))) m_AuthMechs.isSessionAvailable = true; + else if (!mir_tstrcmp(XmlGetName(n), L"register")) isRegisterAvailable = true; + else if (!mir_tstrcmp(XmlGetName(n), L"auth")) m_AuthMechs.isAuthAvailable = true; + else if (!mir_tstrcmp(XmlGetName(n), L"session")) m_AuthMechs.isSessionAvailable = true; } if (areMechanismsDefined) { @@ -755,8 +755,8 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info) if (info->auth) { //We are already logged-in info->send( XmlNodeIq(AddIQ(&CJabberProto::OnIqResultBind, JABBER_IQ_TYPE_SET)) - << XCHILDNS(_T("bind"), _T("urn:ietf:params:xml:ns:xmpp-bind")) - << XCHILD(_T("resource"), info->resource)); + << XCHILDNS(L"bind", L"urn:ietf:params:xml:ns:xmpp-bind") + << XCHILD(L"resource", info->resource)); if (m_AuthMechs.isSessionAvailable) info->bIsSessionAvailable = TRUE; @@ -772,8 +772,8 @@ void CJabberProto::OnProcessFailure(HXML node, ThreadData *info) { const TCHAR *type; //failure xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\" - if ((type = XmlGetAttrValue(node, _T("xmlns"))) == NULL) return; - if (!mir_tstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) { + if ((type = XmlGetAttrValue(node, L"xmlns")) == NULL) return; + if (!mir_tstrcmp(type, L"urn:ietf:params:xml:ns:xmpp-sasl")) { PerformAuthentication(info); } } @@ -799,13 +799,13 @@ void CJabberProto::OnProcessError(HXML node, ThreadData *info) const TCHAR *name = XmlGetName(n); const TCHAR *desc = XmlGetText(n); if (desc) - pos += mir_sntprintf(buff + pos, 1024 - pos, _T("%s: %s\r\n"), name, desc); + pos += mir_sntprintf(buff + pos, 1024 - pos, L"%s: %s\r\n", name, desc); else - pos += mir_sntprintf(buff + pos, 1024 - pos, _T("%s\r\n"), name); + pos += mir_sntprintf(buff + pos, 1024 - pos, L"%s\r\n", name); - if (!mir_tstrcmp(name, _T("conflict"))) + if (!mir_tstrcmp(name, L"conflict")) ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION); - else if (!mir_tstrcmp(name, _T("see-other-host"))) { + else if (!mir_tstrcmp(name, L"see-other-host")) { skipMsg = true; } } @@ -820,10 +820,10 @@ void CJabberProto::OnProcessSuccess(HXML node, ThreadData *info) // int iqId; // RECVED: <success ... // ACTION: if successfully logged in, continue by requesting roster list and set my initial status - if ((type = XmlGetAttrValue(node, _T("xmlns"))) == NULL) + if ((type = XmlGetAttrValue(node, L"xmlns")) == NULL) return; - if (!mir_tstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) { + if (!mir_tstrcmp(type, L"urn:ietf:params:xml:ns:xmpp-sasl")) { if (!info->auth->validateLogin(XmlGetText(node))) { info->send("</stream:stream>"); return; @@ -836,7 +836,7 @@ void CJabberProto::OnProcessSuccess(HXML node, ThreadData *info) xmlStreamInitialize("after successful sasl"); } - else debugLog(_T("Success: unknown action %s."), type); + else debugLog(L"Success: unknown action %s.", type); } void CJabberProto::OnProcessChallenge(HXML node, ThreadData *info) @@ -846,11 +846,11 @@ void CJabberProto::OnProcessChallenge(HXML node, ThreadData *info) return; } - if (mir_tstrcmp(XmlGetAttrValue(node, _T("xmlns")), _T("urn:ietf:params:xml:ns:xmpp-sasl"))) + if (mir_tstrcmp(XmlGetAttrValue(node, L"xmlns"), L"urn:ietf:params:xml:ns:xmpp-sasl")) return; char* challenge = info->auth->getChallenge(XmlGetText(node)); - info->send(XmlNode(_T("response"), _A2T(challenge)) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-sasl"))); + info->send(XmlNode(L"response", _A2T(challenge)) << XATTR(L"xmlns", L"urn:ietf:params:xml:ns:xmpp-sasl")); mir_free(challenge); } @@ -858,34 +858,34 @@ void CJabberProto::OnProcessProtocol(HXML node, ThreadData *info) { OnConsoleProcessXml(node, JCPF_IN); - if (!mir_tstrcmp(XmlGetName(node), _T("proceed"))) + if (!mir_tstrcmp(XmlGetName(node), L"proceed")) OnProcessProceed(node, info); - else if (!mir_tstrcmp(XmlGetName(node), _T("compressed"))) + else if (!mir_tstrcmp(XmlGetName(node), L"compressed")) OnProcessCompressed(node, info); - else if (!mir_tstrcmp(XmlGetName(node), _T("stream:features"))) + else if (!mir_tstrcmp(XmlGetName(node), L"stream:features")) OnProcessFeatures(node, info); - else if (!mir_tstrcmp(XmlGetName(node), _T("stream:stream"))) + else if (!mir_tstrcmp(XmlGetName(node), L"stream:stream")) OnProcessStreamOpening(node, info); - else if (!mir_tstrcmp(XmlGetName(node), _T("success"))) + else if (!mir_tstrcmp(XmlGetName(node), L"success")) OnProcessSuccess(node, info); - else if (!mir_tstrcmp(XmlGetName(node), _T("failure"))) + else if (!mir_tstrcmp(XmlGetName(node), L"failure")) OnProcessFailure(node, info); - else if (!mir_tstrcmp(XmlGetName(node), _T("stream:error"))) + else if (!mir_tstrcmp(XmlGetName(node), L"stream:error")) OnProcessError(node, info); - else if (!mir_tstrcmp(XmlGetName(node), _T("challenge"))) + else if (!mir_tstrcmp(XmlGetName(node), L"challenge")) OnProcessChallenge(node, info); else if (!info->bIsReg) { - if (!mir_tstrcmp(XmlGetName(node), _T("message"))) + if (!mir_tstrcmp(XmlGetName(node), L"message")) OnProcessMessage(node, info); - else if (!mir_tstrcmp(XmlGetName(node), _T("presence"))) + else if (!mir_tstrcmp(XmlGetName(node), L"presence")) OnProcessPresence(node, info); - else if (!mir_tstrcmp(XmlGetName(node), _T("iq"))) + else if (!mir_tstrcmp(XmlGetName(node), L"iq")) OnProcessIq(node); else debugLogA("Invalid top-level tag (only <message/> <presence/> and <iq/> allowed)"); } else { - if (!mir_tstrcmp(XmlGetName(node), _T("iq"))) + if (!mir_tstrcmp(XmlGetName(node), L"iq")) OnProcessRegIq(node, info); else debugLogA("Invalid top-level tag (only <iq/> allowed)"); @@ -895,10 +895,10 @@ void CJabberProto::OnProcessProtocol(HXML node, ThreadData *info) void CJabberProto::OnProcessProceed(HXML node, ThreadData *info) { const TCHAR *type; - if ((type = XmlGetAttrValue(node, _T("xmlns"))) != NULL && !mir_tstrcmp(type, _T("error"))) + if ((type = XmlGetAttrValue(node, L"xmlns")) != NULL && !mir_tstrcmp(type, L"error")) return; - if (!mir_tstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-tls"))) { + if (!mir_tstrcmp(type, L"urn:ietf:params:xml:ns:xmpp-tls")) { debugLogA("Starting TLS..."); char* gtlk = strstr(info->conn.manualHost, "google.com"); @@ -922,10 +922,10 @@ void CJabberProto::OnProcessCompressed(HXML node, ThreadData *info) { debugLogA("Compression confirmed"); - const TCHAR *type = XmlGetAttrValue(node, _T("xmlns")); - if (type != NULL && !mir_tstrcmp(type, _T("error"))) + const TCHAR *type = XmlGetAttrValue(node, L"xmlns"); + if (type != NULL && !mir_tstrcmp(type, L"error")) return; - if (mir_tstrcmp(type, _T("http://jabber.org/protocol/compress"))) + if (mir_tstrcmp(type, L"http://jabber.org/protocol/compress")) return; debugLogA("Starting Zlib stream compression..."); @@ -938,7 +938,7 @@ void CJabberProto::OnProcessCompressed(HXML node, ThreadData *info) void CJabberProto::OnProcessPubsubEvent(HXML node) { - const TCHAR *from = XmlGetAttrValue(node, _T("from")); + const TCHAR *from = XmlGetAttrValue(node, L"from"); if (!from) return; @@ -960,7 +960,7 @@ void CJabberProto::OnProcessPubsubEvent(HXML node) return; } - HXML tuneNode = XPath(itemsNode, _T("item/tune[@xmlns='") JABBER_FEAT_USER_TUNE _T("']")); + HXML tuneNode = XPath(itemsNode, L"item/tune[@xmlns='" JABBER_FEAT_USER_TUNE L"']"); if (!tuneNode) return; @@ -974,7 +974,7 @@ void CJabberProto::OnProcessPubsubEvent(HXML node) szLengthInTime[0] = 0; if (szLength) { int nLength = _ttoi(szLength); - mir_sntprintf(szLengthInTime, _T("%02d:%02d:%02d"), nLength / 3600, (nLength / 60) % 60, nLength % 60); + mir_sntprintf(szLengthInTime, L"%02d:%02d:%02d", nLength / 3600, (nLength / 60) % 60, nLength % 60); } SetContactTune(hContact, szArtist, szLength ? szLengthInTime : NULL, szSource, szTitle, szTrack); @@ -1026,21 +1026,21 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) { HXML xNode, n; - if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("message"))) + if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"message")) return; - LPCTSTR from, type = XmlGetAttrValue(node, _T("type")); - if ((from = XmlGetAttrValue(node, _T("from"))) == NULL) + LPCTSTR from, type = XmlGetAttrValue(node, L"type"); + if ((from = XmlGetAttrValue(node, L"from")) == NULL) return; - LPCTSTR idStr = XmlGetAttrValue(node, _T("id")); + LPCTSTR idStr = XmlGetAttrValue(node, L"id"); pResourceStatus pFromResource(ResourceInfoFromJID(from)); // Message receipts delivery request. Reply here, before a call to HandleMessagePermanent() to make sure message receipts are handled for external plugins too. - if ((!type || mir_tstrcmpi(type, _T("error"))) && XmlGetChildByTag(node, "request", "xmlns", JABBER_FEAT_MESSAGE_RECEIPTS)) { + if ((!type || mir_tstrcmpi(type, L"error")) && XmlGetChildByTag(node, "request", "xmlns", JABBER_FEAT_MESSAGE_RECEIPTS)) { info->send( - XmlNode(_T("message")) << XATTR(_T("to"), from) << XATTR(_T("id"), idStr) - << XCHILDNS(_T("received"), JABBER_FEAT_MESSAGE_RECEIPTS) << XATTR(_T("id"), idStr)); + XmlNode(L"message") << XATTR(L"to", from) << XATTR(L"id", idStr) + << XCHILDNS(L"received", JABBER_FEAT_MESSAGE_RECEIPTS) << XATTR(L"id", idStr)); if (pFromResource) pFromResource->m_jcbManualDiscoveredCaps |= JABBER_CAPS_MESSAGE_RECEIPTS; @@ -1071,19 +1071,19 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) TCHAR *szTmp = (TCHAR *)alloca(sizeof(TCHAR) * cbLen); szTmp[0] = 0; if (szMessage) - mir_tstrcat(szTmp, _T("Subject: ")); + mir_tstrcat(szTmp, L"Subject: "); mir_tstrcat(szTmp, ptszSubject); if (szMessage) { - mir_tstrcat(szTmp, _T("\r\n")); + mir_tstrcat(szTmp, L"\r\n"); mir_tstrcat(szTmp, szMessage); } szMessage = szTmp; } if (szMessage && (n = XmlGetChildByTag(node, "addresses", "xmlns", JABBER_FEAT_EXT_ADDRESSING))) { - HXML addressNode = XmlGetChildByTag(n, "address", "type", _T("ofrom")); + HXML addressNode = XmlGetChildByTag(n, "address", "type", L"ofrom"); if (addressNode) { - const TCHAR *szJid = XmlGetAttrValue(addressNode, _T("jid")); + const TCHAR *szJid = XmlGetAttrValue(addressNode, L"jid"); if (szJid) { size_t cbLen = mir_tstrlen(szMessage) + 1000; TCHAR *p = (TCHAR*)alloca(sizeof(TCHAR) * cbLen); @@ -1161,9 +1161,9 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) } if ((n = XmlGetChildByTag(node, "confirm", "xmlns", JABBER_FEAT_HTTP_AUTH)) && m_options.AcceptHttpAuth) { - const TCHAR *szId = XmlGetAttrValue(n, _T("id")); - const TCHAR *szMethod = XmlGetAttrValue(n, _T("method")); - const TCHAR *szUrl = XmlGetAttrValue(n, _T("url")); + const TCHAR *szId = XmlGetAttrValue(n, L"id"); + const TCHAR *szMethod = XmlGetAttrValue(n, L"method"); + const TCHAR *szUrl = XmlGetAttrValue(n, L"url"); if (!szId || !szMethod || !szUrl) return; @@ -1187,10 +1187,10 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) // parsing extensions for (int i = 0; (xNode = XmlGetChild(node, i)) != NULL; i++) { - if ((xNode = XmlGetNthChild(node, _T("x"), i + 1)) == NULL) + if ((xNode = XmlGetNthChild(node, L"x", i + 1)) == NULL) continue; - const TCHAR *ptszXmlns = XmlGetAttrValue(xNode, _T("xmlns")); + const TCHAR *ptszXmlns = XmlGetAttrValue(xNode, L"xmlns"); if (ptszXmlns == NULL) continue; @@ -1198,16 +1198,16 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) if (OnIncomingNote(from, XmlGetChild(xNode, "note"))) return; } - else if (!mir_tstrcmp(ptszXmlns, _T("jabber:x:encrypted"))) { + else if (!mir_tstrcmp(ptszXmlns, L"jabber:x:encrypted")) { LPCTSTR ptszText = XmlGetText(xNode); if (ptszText == NULL) return; //XEP-0027 is not strict enough, different clients have different implementations //additional validation is required - TCHAR *prolog = _T("-----BEGIN PGP MESSAGE-----"); - TCHAR *prolog_newline = _T("\r\n\r\n"); - TCHAR *epilog = _T("\r\n-----END PGP MESSAGE-----\r\n"); + TCHAR *prolog = L"-----BEGIN PGP MESSAGE-----"; + TCHAR *prolog_newline = L"\r\n\r\n"; + TCHAR *epilog = L"\r\n-----END PGP MESSAGE-----\r\n"; size_t len = 0; TCHAR *tempstring = nullptr; @@ -1215,19 +1215,19 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) { len = mir_tstrlen(prolog) + mir_tstrlen(prolog_newline) + mir_tstrlen(ptszText) + mir_tstrlen(epilog) + 3; tempstring = (TCHAR*)_alloca(sizeof(TCHAR)*len); - mir_sntprintf(tempstring, len, _T("%s%s%s%s"), prolog, prolog_newline, ptszText, epilog); + mir_sntprintf(tempstring, len, L"%s%s%s%s", prolog, prolog_newline, ptszText, epilog); } else { len = mir_tstrlen(ptszText) + 3; tempstring = (TCHAR*)_alloca(sizeof(TCHAR)*len); - mir_sntprintf(tempstring, len, _T("%s"), ptszText); + mir_sntprintf(tempstring, len, L"%s", ptszText); } szMessage = tempstring; } else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_DELAY) && msgTime == 0) { - const TCHAR *ptszTimeStamp = XmlGetAttrValue(xNode, _T("stamp")); + const TCHAR *ptszTimeStamp = XmlGetAttrValue(xNode, L"stamp"); if (ptszTimeStamp != NULL) msgTime = JabberIsoToUnixTime(ptszTimeStamp); } @@ -1266,10 +1266,10 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) if (!isDelivered && (n = XmlGetChild(xNode, "delivered")) != NULL) { isDelivered = true; - XmlNode m(_T("message")); m << XATTR(_T("to"), from); - HXML x = m << XCHILDNS(_T("x"), JABBER_FEAT_MESSAGE_EVENTS); - x << XCHILD(_T("delivered")); - x << XCHILD(_T("id"), idStr); + XmlNode m(L"message"); m << XATTR(L"to", from); + HXML x = m << XCHILDNS(L"x", JABBER_FEAT_MESSAGE_EVENTS); + x << XCHILD(L"delivered"); + x << XCHILD(L"id", idStr); info->send(m); } if (item != NULL && XmlGetChild(xNode, "composing") != NULL) { @@ -1286,17 +1286,17 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) TCHAR *szTmp = (TCHAR *)alloca(sizeof(TCHAR)* cbLen); mir_tstrcpy(szTmp, ptszUrl); if (szMessage) { - mir_tstrcat(szTmp, _T("\r\n")); + mir_tstrcat(szTmp, L"\r\n"); mir_tstrcat(szTmp, szMessage); } szMessage = szTmp; } } else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_MUC_USER)) { - HXML inviteNode = XmlGetChild(xNode, _T("invite")); + HXML inviteNode = XmlGetChild(xNode, L"invite"); if (inviteNode != NULL) { - inviteFromJid = XmlGetAttrValue(inviteNode, _T("from")); - inviteReason = XmlGetText(XmlGetChild(inviteNode, _T("reason"))); + inviteFromJid = XmlGetAttrValue(inviteNode, L"from"); + inviteReason = XmlGetText(XmlGetChild(inviteNode, L"reason")); inviteRoomJid = from; if (inviteReason == NULL) inviteReason = szMessage; @@ -1306,24 +1306,24 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) } else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_ROSTER_EXCHANGE) && item != NULL && (item->subscription == SUB_BOTH || item->subscription == SUB_TO)) { - TCHAR chkJID[JABBER_MAX_JID_LEN] = _T("@"); + TCHAR chkJID[JABBER_MAX_JID_LEN] = L"@"; JabberStripJid(from, chkJID + 1, _countof(chkJID) - 1); for (int j = 1;; j++) { - HXML iNode = XmlGetNthChild(xNode, _T("item"), j); + HXML iNode = XmlGetNthChild(xNode, L"item", j); if (iNode == NULL) break; - const TCHAR *action = XmlGetAttrValue(iNode, _T("action")); - const TCHAR *jid = XmlGetAttrValue(iNode, _T("jid")); - const TCHAR *nick = XmlGetAttrValue(iNode, _T("name")); - const TCHAR *group = XmlGetText(XmlGetChild(iNode, _T("group"))); + const TCHAR *action = XmlGetAttrValue(iNode, L"action"); + const TCHAR *jid = XmlGetAttrValue(iNode, L"jid"); + const TCHAR *nick = XmlGetAttrValue(iNode, L"name"); + const TCHAR *group = XmlGetText(XmlGetChild(iNode, L"group")); if (action && jid && _tcsstr(jid, chkJID)) { - if (!mir_tstrcmp(action, _T("add"))) { + if (!mir_tstrcmp(action, L"add")) { MCONTACT cc = DBCreateContact(jid, nick, false, false); if (group) db_set_ts(cc, "CList", "Group", group); } - else if (!mir_tstrcmp(action, _T("delete"))) { + else if (!mir_tstrcmp(action, L"delete")) { MCONTACT cc = HContactFromJID(jid); if (cc) CallService(MS_DB_CONTACT_DELETE, cc, 0); @@ -1332,7 +1332,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) } } else if (!isChatRoomInvitation && !mir_tstrcmp(ptszXmlns, JABBER_FEAT_DIRECT_MUC_INVITE)) { - inviteRoomJid = XmlGetAttrValue(xNode, _T("jid")); + inviteRoomJid = XmlGetAttrValue(xNode, L"jid"); inviteFromJid = from; if (inviteReason == NULL) inviteReason = XmlGetText(xNode); @@ -1367,7 +1367,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) CMString tmp(szMessage); tmp += ExtractImage(node); - tmp.Replace(_T("\n"), _T("\r\n")); + tmp.Replace(L"\n", L"\r\n"); ptrA buf(mir_utf8encodeW(tmp)); if (item != NULL) { @@ -1403,11 +1403,11 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) // XEP-0115: Entity Capabilities void CJabberProto::OnProcessPresenceCapabilites(HXML node) { - const TCHAR *from = XmlGetAttrValue(node, _T("from")); + const TCHAR *from = XmlGetAttrValue(node, L"from"); if (from == NULL) return; - debugLog(_T("presence: for jid %s"), from); + debugLog(L"presence: for jid %s", from); pResourceStatus r(ResourceInfoFromJID(from)); if (r == NULL) @@ -1418,9 +1418,9 @@ void CJabberProto::OnProcessPresenceCapabilites(HXML node) if ((n = XmlGetChildByTag(node, "c", "xmlns", JABBER_FEAT_ENTITY_CAPS)) != NULL || (n = XmlGetChild(node, "c")) != NULL) { - const TCHAR *szNode = XmlGetAttrValue(n, _T("node")); - const TCHAR *szVer = XmlGetAttrValue(n, _T("ver")); - const TCHAR *szExt = XmlGetAttrValue(n, _T("ext")); + const TCHAR *szNode = XmlGetAttrValue(n, L"node"); + const TCHAR *szVer = XmlGetAttrValue(n, L"ver"); + const TCHAR *szExt = XmlGetAttrValue(n, L"ext"); if (szNode && szVer) { r->m_tszCapsNode = mir_tstrdup(szNode); r->m_tszCapsVer = mir_tstrdup(szVer); @@ -1472,7 +1472,7 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid) item->getTemp()->m_iStatus = status; if (nSelectedResource != -1) { pResourceStatus r(item->arResources[nSelectedResource]); - debugLog(_T("JabberUpdateJidDbSettings: updating jid %s to rc %s"), item->jid, r->m_tszResourceName); + debugLog(L"JabberUpdateJidDbSettings: updating jid %s to rc %s", item->jid, r->m_tszResourceName); if (r->m_tszStatusMessage) db_set_ts(hContact, "CList", "StatusMsg", r->m_tszStatusMessage); else @@ -1497,10 +1497,10 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid) void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) { - if (!node || !XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("presence"))) + if (!node || !XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"presence")) return; - LPCTSTR from = XmlGetAttrValue(node, _T("from")); + LPCTSTR from = XmlGetAttrValue(node, L"from"); if (from == NULL) return; @@ -1522,31 +1522,31 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) if (!mir_tstrcmpi(szBareFrom, szBareOurJid)) bSelfPresence = true; - LPCTSTR type = XmlGetAttrValue(node, _T("type")); - if (type == NULL || !mir_tstrcmp(type, _T("available"))) { + LPCTSTR type = XmlGetAttrValue(node, L"type"); + if (type == NULL || !mir_tstrcmp(type, L"available")) { ptrT nick(JabberNickFromJID(from)); if (nick == NULL) return; if ((hContact = HContactFromJID(from)) == NULL) { if (!mir_tstrcmpi(info->fullJID, from) || (!bSelfPresence && !ListGetItemPtr(LIST_ROSTER, from))) { - debugLog(_T("SKIP Receive presence online from %s (who is not in my roster and not in list - skiping)"), from); + debugLog(L"SKIP Receive presence online from %s (who is not in my roster and not in list - skiping)", from); return; } hContact = DBCreateContact(from, nick, true, true); } if (!ListGetItemPtr(LIST_ROSTER, from)) { - debugLog(_T("Receive presence online from %s (who is not in my roster)"), from); + debugLog(L"Receive presence online from %s (who is not in my roster)", from); ListAdd(LIST_ROSTER, from, hContact); } DBCheckIsTransportedContact(from, hContact); int status = ID_STATUS_ONLINE; if (HXML showNode = XmlGetChild(node, "show")) { if (LPCTSTR show = XmlGetText(showNode)) { - if (!mir_tstrcmp(show, _T("away"))) status = ID_STATUS_AWAY; - else if (!mir_tstrcmp(show, _T("xa"))) status = ID_STATUS_NA; - else if (!mir_tstrcmp(show, _T("dnd"))) status = ID_STATUS_DND; - else if (!mir_tstrcmp(show, _T("chat"))) status = ID_STATUS_FREECHAT; + if (!mir_tstrcmp(show, L"away")) status = ID_STATUS_AWAY; + else if (!mir_tstrcmp(show, L"xa")) status = ID_STATUS_NA; + else if (!mir_tstrcmp(show, L"dnd")) status = ID_STATUS_DND; + else if (!mir_tstrcmp(show, L"chat")) status = ID_STATUS_FREECHAT; } } @@ -1564,15 +1564,15 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) if (_tcschr(from, '@') == NULL) { UI_SAFE_NOTIFY(m_pDlgServiceDiscovery, WM_JABBER_TRANSPORT_REFRESH); } - debugLog(_T("%s (%s) online, set contact status to %s"), nick, from, pcli->pfnGetStatusModeDescription(status, 0)); + debugLog(L"%s (%s) online, set contact status to %s", nick, from, pcli->pfnGetStatusModeDescription(status, 0)); HXML xNode; if (m_options.EnableAvatars) { bool bHasAvatar = false, bRemovedAvatar = false; debugLogA("Avatar enabled"); - for (int i = 1; (xNode = XmlGetNthChild(node, _T("x"), i)) != NULL; i++) { - if (!mir_tstrcmp(XmlGetAttrValue(xNode, _T("xmlns")), _T("jabber:x:avatar"))) { + for (int i = 1; (xNode = XmlGetNthChild(node, L"x", i)) != NULL; i++) { + if (!mir_tstrcmp(XmlGetAttrValue(xNode, L"xmlns"), L"jabber:x:avatar")) { LPCTSTR ptszHash = XmlGetText(XmlGetChild(xNode, "hash")); if (ptszHash != NULL) { delSetting(hContact, "AvatarXVcard"); @@ -1590,8 +1590,8 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) } if (!bHasAvatar) { //no jabber:x:avatar. try vcard-temp:x:update debugLogA("Not hasXAvatar"); - for (int i = 1; (xNode = XmlGetNthChild(node, _T("x"), i)) != NULL; i++) { - if (!mir_tstrcmp(XmlGetAttrValue(xNode, _T("xmlns")), _T("vcard-temp:x:update"))) { + for (int i = 1; (xNode = XmlGetNthChild(node, L"x", i)) != NULL; i++) { + if (!mir_tstrcmp(XmlGetAttrValue(xNode, L"xmlns"), L"vcard-temp:x:update")) { if ((xNode = XmlGetChild(xNode, "photo")) != NULL) { LPCTSTR txt = XmlGetText(xNode); if (txt != NULL && txt[0] != 0) { @@ -1619,7 +1619,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) return; } - if (!mir_tstrcmp(type, _T("unavailable"))) { + if (!mir_tstrcmp(type, L"unavailable")) { hContact = HContactFromJID(from); JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, from); if (item != NULL) { @@ -1639,7 +1639,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) item->getTemp()->m_tszStatusMessage = mir_tstrdup(XmlGetText(XmlGetChild(node, "status"))); } } - else debugLog(_T("SKIP Receive presence offline from %s (who is not in my roster)"), from); + else debugLog(L"SKIP Receive presence offline from %s (who is not in my roster)", from); UpdateJidDbSettings(from); @@ -1650,7 +1650,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) return; } - if (!mir_tstrcmp(type, _T("subscribe"))) { + if (!mir_tstrcmp(type, L"subscribe")) { if (hContact = HContactFromJID(from)) AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_SUBSCRIBE); @@ -1659,7 +1659,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) if (xNick != NULL) { LPCTSTR xszNick = XmlGetText(xNick); if (xszNick != NULL && *xszNick) { - debugLog(_T("Grabbed nick from presence: %s"), xszNick); + debugLog(L"Grabbed nick from presence: %s", xszNick); tszNick = mir_tstrdup(xszNick); } } @@ -1667,12 +1667,12 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) // automatically send authorization allowed to agent/transport if (_tcschr(from, '@') == NULL || m_options.AutoAcceptAuthorization) { ListAdd(LIST_ROSTER, from, hContact); - info->send(XmlNode(_T("presence")) << XATTR(_T("to"), from) << XATTR(_T("type"), _T("subscribed"))); + info->send(XmlNode(L"presence") << XATTR(L"to", from) << XATTR(L"type", L"subscribed")); if (m_options.AutoAdd == TRUE) { JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, from); if (item == NULL || (item->subscription != SUB_BOTH && item->subscription != SUB_TO)) { - debugLog(_T("Try adding contact automatically jid = %s"), from); + debugLog(L"Try adding contact automatically jid = %s", from); if ((hContact = AddToListByJID(from, 0)) != NULL) { if (item) item->hContact = hContact; @@ -1684,25 +1684,25 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) RebuildInfoFrame(); } else { - debugLog(_T("%s (%s) requests authorization"), tszNick, from); + debugLog(L"%s (%s) requests authorization", tszNick, from); DBAddAuthRequest(from, tszNick); } return; } - if (!mir_tstrcmp(type, _T("unsubscribe"))) + if (!mir_tstrcmp(type, L"unsubscribe")) if (hContact = HContactFromJID(from)) AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBE); - if (!mir_tstrcmp(type, _T("unsubscribed"))) + if (!mir_tstrcmp(type, L"unsubscribed")) if (hContact = HContactFromJID(from)) AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBED); - if (!mir_tstrcmp(type, _T("error"))) + if (!mir_tstrcmp(type, L"error")) if (hContact = HContactFromJID(from)) AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_ERROR); - if (!mir_tstrcmp(type, _T("subscribed"))) { + if (!mir_tstrcmp(type, L"subscribed")) { if (hContact = HContactFromJID(from)) AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_SUBSCRIBED); @@ -1753,41 +1753,41 @@ void CJabberProto::OnIqResultVersion(HXML /*node*/, CJabberIqInfo *pInfo) BOOL CJabberProto::OnProcessJingle(HXML node) { LPCTSTR type; - HXML child = XmlGetChildByTag(node, _T("jingle"), _T("xmlns"), JABBER_FEAT_JINGLE); + HXML child = XmlGetChildByTag(node, L"jingle", L"xmlns", JABBER_FEAT_JINGLE); if (child) { - if ((type = XmlGetAttrValue(node, _T("type"))) == NULL) return FALSE; - if ((!mir_tstrcmp(type, _T("get")) || !mir_tstrcmp(type, _T("set")))) { - LPCTSTR szAction = XmlGetAttrValue(child, _T("action")); - LPCTSTR idStr = XmlGetAttrValue(node, _T("id")); - LPCTSTR from = XmlGetAttrValue(node, _T("from")); - if (szAction && !mir_tstrcmp(szAction, _T("session-initiate"))) { + if ((type = XmlGetAttrValue(node, L"type")) == NULL) return FALSE; + if ((!mir_tstrcmp(type, L"get") || !mir_tstrcmp(type, L"set"))) { + LPCTSTR szAction = XmlGetAttrValue(child, L"action"); + LPCTSTR idStr = XmlGetAttrValue(node, L"id"); + LPCTSTR from = XmlGetAttrValue(node, L"from"); + if (szAction && !mir_tstrcmp(szAction, L"session-initiate")) { // if this is a Jingle 'session-initiate' and noone processed it yet, reply with "unsupported-applications" - m_ThreadInfo->send(XmlNodeIq(_T("result"), idStr, from)); + m_ThreadInfo->send(XmlNodeIq(L"result", idStr, from)); - XmlNodeIq iq(_T("set"), SerialNext(), from); - HXML jingleNode = iq << XCHILDNS(_T("jingle"), JABBER_FEAT_JINGLE); + XmlNodeIq iq(L"set", SerialNext(), from); + HXML jingleNode = iq << XCHILDNS(L"jingle", JABBER_FEAT_JINGLE); - jingleNode << XATTR(_T("action"), _T("session-terminate")); - LPCTSTR szInitiator = XmlGetAttrValue(child, _T("initiator")); + jingleNode << XATTR(L"action", L"session-terminate"); + LPCTSTR szInitiator = XmlGetAttrValue(child, L"initiator"); if (szInitiator) - jingleNode << XATTR(_T("initiator"), szInitiator); - LPCTSTR szSid = XmlGetAttrValue(child, _T("sid")); + jingleNode << XATTR(L"initiator", szInitiator); + LPCTSTR szSid = XmlGetAttrValue(child, L"sid"); if (szSid) - jingleNode << XATTR(_T("sid"), szSid); + jingleNode << XATTR(L"sid", szSid); - jingleNode << XCHILD(_T("reason")) - << XCHILD(_T("unsupported-applications")); + jingleNode << XCHILD(L"reason") + << XCHILD(L"unsupported-applications"); m_ThreadInfo->send(iq); return TRUE; } else { // if it's something else than 'session-initiate' and noone processed it yet, reply with "unknown-session" - XmlNodeIq iq(_T("error"), idStr, from); - HXML errNode = iq << XCHILD(_T("error")); - errNode << XATTR(_T("type"), _T("cancel")); - errNode << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")); - errNode << XCHILDNS(_T("unknown-session"), _T("urn:xmpp:jingle:errors:1")); + XmlNodeIq iq(L"error", idStr, from); + HXML errNode = iq << XCHILD(L"error"); + errNode << XATTR(L"type", L"cancel"); + errNode << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas"); + errNode << XCHILDNS(L"unknown-session", L"urn:xmpp:jingle:errors:1"); m_ThreadInfo->send(iq); return TRUE; } @@ -1801,13 +1801,13 @@ void CJabberProto::OnProcessIq(HXML node) HXML queryNode; const TCHAR *type, *xmlns; - if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("iq"))) return; - if ((type = XmlGetAttrValue(node, _T("type"))) == NULL) return; + if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"iq")) return; + if ((type = XmlGetAttrValue(node, L"type")) == NULL) return; int id = JabberGetPacketID(node); queryNode = XmlGetChild(node, "query"); - xmlns = XmlGetAttrValue(queryNode, _T("xmlns")); + xmlns = XmlGetAttrValue(queryNode, L"xmlns"); // new match by id if (m_iqManager.HandleIq(id, node)) @@ -1822,7 +1822,7 @@ void CJabberProto::OnProcessIq(HXML node) return; // RECVED: <iq type='error'> ... - if (!mir_tstrcmp(type, _T("error"))) { + if (!mir_tstrcmp(type, L"error")) { TCHAR tszBuf[20]; _itot(id, tszBuf, 10); @@ -1839,15 +1839,15 @@ void CJabberProto::OnProcessIq(HXML node) } } } - else if ((!mir_tstrcmp(type, _T("get")) || !mir_tstrcmp(type, _T("set")))) { - XmlNodeIq iq(_T("error"), id, XmlGetAttrValue(node, _T("from"))); + else if ((!mir_tstrcmp(type, L"get") || !mir_tstrcmp(type, L"set"))) { + XmlNodeIq iq(L"error", id, XmlGetAttrValue(node, L"from")); HXML pFirstChild = XmlGetChild(node, 0); if (pFirstChild) XmlAddChild(iq, pFirstChild); - iq << XCHILD(_T("error")) << XATTR(_T("type"), _T("cancel")) - << XCHILDNS(_T("service-unavailable"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")); + iq << XCHILD(L"error") << XATTR(L"type", L"cancel") + << XCHILDNS(L"service-unavailable", L"urn:ietf:params:xml:ns:xmpp-stanzas"); m_ThreadInfo->send(iq); } } @@ -1857,9 +1857,9 @@ void CJabberProto::SetRegConfig(HXML node, void *from) { if (m_regInfo && from) { TCHAR text[MAX_PATH]; - mir_sntprintf(text, _T("%s@%S"), m_regInfo->conn.username, m_regInfo->conn.server); - XmlNodeIq iq(_T("set"), SerialNext(), (TCHAR*)from); - iq << XATTR(_T("from"), text); + mir_sntprintf(text, L"%s@%S", m_regInfo->conn.username, m_regInfo->conn.server); + XmlNodeIq iq(L"set", SerialNext(), (TCHAR*)from); + iq << XATTR(L"from", text); HXML query = iq << XQUERY(JABBER_FEAT_REGISTER); XmlAddChild(query, node); m_regInfo->send(iq); @@ -1868,28 +1868,28 @@ void CJabberProto::SetRegConfig(HXML node, void *from) void CJabberProto::OnProcessRegIq(HXML node, ThreadData *info) { - if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("iq"))) return; - LPCTSTR type = XmlGetAttrValue(node, _T("type")); + if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"iq")) return; + LPCTSTR type = XmlGetAttrValue(node, L"type"); if (type == NULL) return; int id = JabberGetPacketID(node); - LPCTSTR from = XmlGetAttrValue(node, _T("from")); + LPCTSTR from = XmlGetAttrValue(node, L"from"); if (from == NULL) return; - if (!mir_tstrcmp(type, _T("result"))) { - HXML queryNode = XmlGetChild(node, _T("query")); + if (!mir_tstrcmp(type, L"result")) { + HXML queryNode = XmlGetChild(node, L"query"); if (queryNode != NULL) { - LPCTSTR str = XmlGetAttrValue(queryNode, _T("xmlns")); + LPCTSTR str = XmlGetAttrValue(queryNode, L"xmlns"); if (!mir_tstrcmp(str, JABBER_FEAT_REGISTER)) { - HXML xNode = XmlGetChild(queryNode, _T("x")); + HXML xNode = XmlGetChild(queryNode, L"x"); if (xNode != NULL) { - str = XmlGetAttrValue(xNode, _T("xmlns")); + str = XmlGetAttrValue(xNode, L"xmlns"); if (!mir_tstrcmp(str, JABBER_FEAT_DATA_FORMS)) { m_regInfo = info; - FormCreateDialog(xNode, _T("Jabber register new user"), &CJabberProto::SetRegConfig, mir_tstrdup(from)); + FormCreateDialog(xNode, L"Jabber register new user", &CJabberProto::SetRegConfig, mir_tstrdup(from)); return; } } @@ -1900,10 +1900,10 @@ void CJabberProto::OnProcessRegIq(HXML node, ThreadData *info) if (id == iqIdRegGetReg) { iqIdRegSetReg = SerialNext(); - XmlNodeIq iq(_T("set"), iqIdRegSetReg); + XmlNodeIq iq(L"set", iqIdRegSetReg); HXML query = iq << XQUERY(JABBER_FEAT_REGISTER); - query << XCHILD(_T("password"), info->conn.password); - query << XCHILD(_T("username"), info->conn.username); + query << XCHILD(L"password", info->conn.password); + query << XCHILD(L"username", info->conn.username); info->send(iq); SendMessage(info->conn.reg_hwndDlg, WM_JABBER_REGDLG_UPDATE, 75, (LPARAM)TranslateT("Sending registration information...")); @@ -1917,7 +1917,7 @@ void CJabberProto::OnProcessRegIq(HXML node, ThreadData *info) } } - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { TCHAR *str = JabberErrorMsg(XmlGetChild(node, "error")); SendMessage(info->conn.reg_hwndDlg, WM_JABBER_REGDLG_UPDATE, 100, (LPARAM)str); mir_free(str); diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 7601a92287..a4f11912b4 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -174,7 +174,7 @@ static HTREEITEM sttFillInfoLine(HWND hwndTree, HTREEITEM htiRoot, HICON hIcon, TCHAR buf[256]; if (title) - mir_sntprintf(buf, _T("%s: %s"), title, value); + mir_sntprintf(buf, L"%s: %s", title, value); else mir_tstrncpy(buf, value, _countof(buf)); @@ -227,7 +227,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti HICON hIcon = NULL; if ( ServiceExists(MS_FP_GETCLIENTICONT)) { if (r->m_tszSoftware != NULL) { - mir_sntprintf(buf, _T("%s %s"), r->m_tszSoftware, r->m_tszSoftwareVersion); + mir_sntprintf(buf, L"%s %s", r->m_tszSoftware, r->m_tszSoftwareVersion); hIcon = Finger_GetClientIcon(buf, 0); } } @@ -251,7 +251,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti // Resource priority TCHAR szPriority[128]; - mir_sntprintf(szPriority, _T("%d"), (int)r->m_iPriority); + mir_sntprintf(szPriority, L"%d", (int)r->m_iPriority); sttFillInfoLine(hwndTree, htiResource, NULL, TranslateT("Resource priority"), szPriority, sttInfoLineId(resource, INFOLINE_PRIORITY)); // Idle @@ -269,7 +269,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti sttFillInfoLine(hwndTree, htiResource, NULL, TranslateT("Idle since"), buf, sttInfoLineId(resource, INFOLINE_IDLE)); // caps - mir_sntprintf(buf, _T("%s/%s"), item->jid, r->m_tszResourceName); + mir_sntprintf(buf, L"%s/%s", item->jid, r->m_tszResourceName); JabberCapsBits jcb = ppro->GetResourceCapabilites(buf, TRUE); if (!(jcb & JABBER_RESOURCE_CAPS_ERROR)) { @@ -279,7 +279,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti if (jcb & g_JabberFeatCapPairs[i].jcbCap) { TCHAR szDescription[ 1024 ]; if (g_JabberFeatCapPairs[i].tszDescription) - mir_sntprintf(szDescription, _T("%s (%s)"), TranslateTS(g_JabberFeatCapPairs[i].tszDescription), g_JabberFeatCapPairs[i].szFeature); + mir_sntprintf(szDescription, L"%s (%s)", TranslateTS(g_JabberFeatCapPairs[i].tszDescription), g_JabberFeatCapPairs[i].szFeature); else _tcsncpy_s(szDescription, g_JabberFeatCapPairs[i].szFeature, _TRUNCATE); sttFillInfoLine(hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i)); @@ -289,7 +289,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti if (jcb & ppro->m_lstJabberFeatCapPairsDynamic[j]->jcbCap) { TCHAR szDescription[ 1024 ]; if (ppro->m_lstJabberFeatCapPairsDynamic[j]->szDescription) - mir_sntprintf(szDescription, _T("%s (%s)"), TranslateTS(ppro->m_lstJabberFeatCapPairsDynamic[j]->szDescription), ppro->m_lstJabberFeatCapPairsDynamic[j]->szFeature); + mir_sntprintf(szDescription, L"%s (%s)", TranslateTS(ppro->m_lstJabberFeatCapPairsDynamic[j]->szDescription), ppro->m_lstJabberFeatCapPairsDynamic[j]->szFeature); else _tcsncpy_s(szDescription, ppro->m_lstJabberFeatCapPairsDynamic[j]->szFeature, _TRUNCATE); sttFillInfoLine(hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i)); @@ -320,7 +320,7 @@ static void sttFillAdvStatusInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM ht if (szAdvStatusIcon && szAdvStatusTitle && *szAdvStatusTitle) { TCHAR szText[2048]; if (szAdvStatusText && *szAdvStatusText) - mir_sntprintf(szText, _T("%s (%s)"), TranslateTS(szAdvStatusTitle), szAdvStatusText); + mir_sntprintf(szText, L"%s (%s)", TranslateTS(szAdvStatusTitle), szAdvStatusText); else _tcsncpy_s(szText, TranslateTS(szAdvStatusTitle), _TRUNCATE); sttFillInfoLine(hwndTree, htiRoot, IcoLib_GetIcon(szAdvStatusIcon), szTitle, szText, dwInfoLine); @@ -337,7 +337,7 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM sttCleanupInfo(hwndTree, 0); - HTREEITEM htiRoot = sttFillInfoLine(hwndTree, NULL, ppro->LoadIconEx("main"), _T("JID"), item->jid, sttInfoLineId(0, INFOLINE_NAME), true); + HTREEITEM htiRoot = sttFillInfoLine(hwndTree, NULL, ppro->LoadIconEx("main"), L"JID", item->jid, sttInfoLineId(0, INFOLINE_NAME), true); TCHAR buf[256]; if (MCONTACT hContact = ppro->HContactFromJID(item->jid)) { @@ -408,7 +408,7 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM static void sttGetNodeText(HWND hwndTree, HTREEITEM hti, UserInfoStringBuf *buf, int indent = 0) { for (int i = 0; i < indent; i++) - buf->append(_T("\t")); + buf->append(L"\t"); TVITEMEX tvi = { 0 }; tvi.mask = TVIF_HANDLE | TVIF_TEXT | TVIF_STATE; @@ -422,7 +422,7 @@ static void sttGetNodeText(HWND hwndTree, HTREEITEM hti, UserInfoStringBuf *buf, } buf->actualize(); - buf->append(_T("\r\n")); + buf->append(L"\r\n"); if (tvi.state & TVIS_EXPANDED) for (hti = TreeView_GetChild(hwndTree, hti); hti; hti = TreeView_GetNextSibling(hwndTree, hti)) @@ -481,7 +481,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa if (dat->item == NULL) { HWND hwndTree = GetDlgItem(hwndDlg, IDC_TV_INFO); TreeView_DeleteAllItems(hwndTree); - HTREEITEM htiRoot = sttFillInfoLine(hwndTree, NULL, dat->ppro->LoadIconEx("main"), _T("JID"), jid, sttInfoLineId(0, INFOLINE_NAME), true); + HTREEITEM htiRoot = sttFillInfoLine(hwndTree, NULL, dat->ppro->LoadIconEx("main"), L"JID", jid, sttInfoLineId(0, INFOLINE_NAME), true); sttFillInfoLine(hwndTree, htiRoot, dat->ppro->LoadIconEx("vcard"), NULL, TranslateT("Please switch online to see more details.")); break; @@ -539,7 +539,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa tvi.cchTextMax = _countof(szBuffer); tvi.pszText = szBuffer; if (TreeView_GetItem(hwndTree, &tvi)) { - if (TCHAR *str = _tcsstr(szBuffer, _T(": "))) + if (TCHAR *str = _tcsstr(szBuffer, L": ")) JabberCopyText(hwndDlg, str + 2); else JabberCopyText(hwndDlg, szBuffer); @@ -649,7 +649,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP item = photoInfo->ppro->ListGetItemPtr(LIST_ROSTER, jid); if (item != NULL) { if (item->photoFileName) { - photoInfo->ppro->debugLog(_T("Showing picture from %s"), item->photoFileName); + photoInfo->ppro->debugLog(L"Showing picture from %s", item->photoFileName); photoInfo->hBitmap = Bitmap_Load(item->photoFileName); FIP->FI_Premultiply(photoInfo->hBitmap); ShowWindow(GetDlgItem(hwndDlg, IDC_SAVE), SW_SHOW); @@ -677,19 +677,19 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP switch (ProtoGetAvatarFileFormat(item->photoFileName)) { case PA_FORMAT_BMP: - mir_sntprintf(szFilter, _T("BMP %s (*.bmp)%c*.BMP"), TranslateT("format"), 0); + mir_sntprintf(szFilter, L"BMP %s (*.bmp)%c*.BMP", TranslateT("format"), 0); break; case PA_FORMAT_GIF: - mir_sntprintf(szFilter, _T("GIF %s (*.gif)%c*.GIF"), TranslateT("format"), 0); + mir_sntprintf(szFilter, L"GIF %s (*.gif)%c*.GIF", TranslateT("format"), 0); break; case PA_FORMAT_JPEG: - mir_sntprintf(szFilter, _T("JPEG %s (*.jpg;*.jpeg)%c*.JPG;*.JPEG"), TranslateT("format"), 0); + mir_sntprintf(szFilter, L"JPEG %s (*.jpg;*.jpeg)%c*.JPG;*.JPEG", TranslateT("format"), 0); break; default: - mir_sntprintf(szFilter, _T("%s (*.*)%c*.*"), TranslateT("Unknown format"), 0); + mir_sntprintf(szFilter, L"%s (*.*)%c*.*", TranslateT("Unknown format"), 0); } TCHAR szFileName[MAX_PATH]; szFileName[0] = '\0'; @@ -701,7 +701,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP ofn.nMaxFile = _MAX_PATH; ofn.Flags = OFN_OVERWRITEPROMPT; if (GetSaveFileName(&ofn)) { - photoInfo->ppro->debugLog(_T("File selected is %s"), szFileName); + photoInfo->ppro->debugLog(L"File selected is %s", szFileName); CopyFile(item->photoFileName, szFileName, FALSE); } } diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 8b1f200a44..e4da6b2df3 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -69,7 +69,7 @@ MCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, bool bStripResource) TCHAR* __stdcall JabberNickFromJID(const TCHAR *jid) { if (jid == NULL) - return mir_tstrdup(_T("")); + return mir_tstrdup(L""); const TCHAR *p = _tcschr(jid, '@'); if (p == NULL) @@ -181,7 +181,7 @@ void __stdcall JabberHttpUrlDecode(TCHAR *str) if (str == NULL) return; for (p = q = (TCHAR*)str; *p != '\0'; p++, q++) { if (*p == '%' && *(p + 1) != '\0' && isxdigit(*(p + 1)) && *(p + 2) != '\0' && isxdigit(*(p + 2))) { - _stscanf((TCHAR*)p + 1, _T("%2x"), &code); + _stscanf((TCHAR*)p + 1, L"%2x", &code); *q = (unsigned char)code; p += 2; } @@ -258,24 +258,24 @@ TCHAR* __stdcall JabberErrorMsg(HXML errorNode, int* pErrorCode) if (errorNode == NULL) { if (pErrorCode) *pErrorCode = -1; - mir_sntprintf(errorStr, 256, _T("%s -1: %s"), TranslateT("Error"), TranslateT("Unknown error message")); + mir_sntprintf(errorStr, 256, L"%s -1: %s", TranslateT("Error"), TranslateT("Unknown error message")); return errorStr; } int errorCode = -1; - const TCHAR *str = XmlGetAttrValue(errorNode, _T("code")); + const TCHAR *str = XmlGetAttrValue(errorNode, L"code"); if (str != NULL) errorCode = _ttoi(str); str = XmlGetText(errorNode); if (str == NULL) - str = XmlGetText(XmlGetChild(errorNode, _T("text"))); + str = XmlGetText(XmlGetChild(errorNode, L"text")); if (str == NULL) { for (int i = 0;; i++) { HXML c = XmlGetChild(errorNode, i); if (c == NULL) break; - const TCHAR *attr = XmlGetAttrValue(c, _T("xmlns")); - if (attr && !mir_tstrcmp(attr, _T("urn:ietf:params:xml:ns:xmpp-stanzas"))) { + const TCHAR *attr = XmlGetAttrValue(c, L"xmlns"); + if (attr && !mir_tstrcmp(attr, L"urn:ietf:params:xml:ns:xmpp-stanzas")) { str = XmlGetName(c); break; } @@ -283,9 +283,9 @@ TCHAR* __stdcall JabberErrorMsg(HXML errorNode, int* pErrorCode) } if (str != NULL) - mir_sntprintf(errorStr, 256, _T("%s %d: %s\r\n%s"), TranslateT("Error"), errorCode, TranslateTS(JabberErrorStr(errorCode)), str); + mir_sntprintf(errorStr, 256, L"%s %d: %s\r\n%s", TranslateT("Error"), errorCode, TranslateTS(JabberErrorStr(errorCode)), str); else - mir_sntprintf(errorStr, 256, _T("%s %d: %s"), TranslateT("Error"), errorCode, TranslateTS(JabberErrorStr(errorCode))); + mir_sntprintf(errorStr, 256, L"%s %d: %s", TranslateT("Error"), errorCode, TranslateTS(JabberErrorStr(errorCode))); if (pErrorCode) *pErrorCode = errorCode; @@ -308,7 +308,7 @@ void CJabberProto::SendVisibleInvisiblePresence(BOOL invisible) WORD apparentMode = getWord(hContact, "ApparentMode", 0); if (invisible == TRUE && apparentMode == ID_STATUS_OFFLINE) - m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), item->jid) << XATTR(_T("type"), _T("invisible"))); + m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", item->jid) << XATTR(L"type", L"invisible")); else if (invisible == FALSE && apparentMode == ID_STATUS_ONLINE) SendPresenceTo(m_iStatus, item->jid, NULL); } @@ -354,7 +354,7 @@ time_t __stdcall JabberIsoToUnixTime(const TCHAR *stamp) for (; *p != '\0' && !isdigit(*p); p++); // Parse time - if (_stscanf(p, _T("%d:%d:%d"), ×tamp.tm_hour, ×tamp.tm_min, ×tamp.tm_sec) != 3) + if (_stscanf(p, L"%d:%d:%d", ×tamp.tm_hour, ×tamp.tm_min, ×tamp.tm_sec) != 3) return (time_t)0; timestamp.tm_isdst = 0; // DST is already present in _timezone below @@ -376,16 +376,16 @@ void CJabberProto::SendPresenceTo(int status, const TCHAR* to, HXML extra, const TCHAR szPriority[40]; _itot(iPriority, szPriority, 10); - XmlNode p(_T("presence")); p << XCHILD(_T("priority"), szPriority); + XmlNode p(L"presence"); p << XCHILD(L"priority", szPriority); if (to != NULL) - p << XATTR(_T("to"), to); + p << XATTR(L"to", to); if (extra) XmlAddChild(p, extra); // XEP-0115:Entity Capabilities - HXML c = p << XCHILDNS(_T("c"), JABBER_FEAT_ENTITY_CAPS) << XATTR(_T("node"), JABBER_CAPS_MIRANDA_NODE) - << XATTR(_T("ver"), szCoreVersion); + HXML c = p << XCHILDNS(L"c", JABBER_FEAT_ENTITY_CAPS) << XATTR(L"node", JABBER_CAPS_MIRANDA_NODE) + << XATTR(L"ver", szCoreVersion); LIST<TCHAR> arrExtCaps(5); if (bSecureIM) @@ -430,17 +430,17 @@ void CJabberProto::SendPresenceTo(int status, const TCHAR* to, HXML extra, const szExtCaps.AppendChar(' '); szExtCaps += arrExtCaps[i]; } - XmlAddAttr(c, _T("ext"), szExtCaps); + XmlAddAttr(c, L"ext", szExtCaps); } if (m_options.EnableAvatars) { - HXML x = p << XCHILDNS(_T("x"), _T("vcard-temp:x:update")); + HXML x = p << XCHILDNS(L"x", L"vcard-temp:x:update"); ptrA hashValue(getStringA("AvatarHash")); if (hashValue != NULL) // XEP-0153: vCard-Based Avatars - x << XCHILD(_T("photo"), _A2T(hashValue)); + x << XCHILD(L"photo", _A2T(hashValue)); else - x << XCHILD(_T("photo")); + x << XCHILD(L"photo"); } { mir_cslock lck(m_csModeMsgMutex); @@ -449,25 +449,25 @@ void CJabberProto::SendPresenceTo(int status, const TCHAR* to, HXML extra, const if (!msg) msg = m_modeMsgs.szOnline; break; case ID_STATUS_INVISIBLE: - p << XATTR(_T("type"), _T("invisible")); + p << XATTR(L"type", L"invisible"); break; case ID_STATUS_AWAY: case ID_STATUS_ONTHEPHONE: case ID_STATUS_OUTTOLUNCH: - p << XCHILD(_T("show"), _T("away")); + p << XCHILD(L"show", L"away"); if (!msg) msg = m_modeMsgs.szAway; break; case ID_STATUS_NA: - p << XCHILD(_T("show"), _T("xa")); + p << XCHILD(L"show", L"xa"); if (!msg) msg = m_modeMsgs.szNa; break; case ID_STATUS_DND: case ID_STATUS_OCCUPIED: - p << XCHILD(_T("show"), _T("dnd")); + p << XCHILD(L"show", L"dnd"); if (!msg) msg = m_modeMsgs.szDnd; break; case ID_STATUS_FREECHAT: - p << XCHILD(_T("show"), _T("chat")); + p << XCHILD(L"show", L"chat"); if (!msg) msg = m_modeMsgs.szFreechat; break; default: // Should not reach here @@ -475,7 +475,7 @@ void CJabberProto::SendPresenceTo(int status, const TCHAR* to, HXML extra, const } if (msg) - p << XCHILD(_T("status"), msg); + p << XCHILD(L"status", msg); } m_ThreadInfo->send(p); @@ -493,7 +493,7 @@ void CJabberProto::SendPresence(int status, bool bSendToAll) JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i); if (item != NULL && item->nick != NULL) { TCHAR text[1024]; - mir_sntprintf(text, _T("%s/%s"), item->jid, item->nick); + mir_sntprintf(text, L"%s/%s", item->jid, item->nick); SendPresenceTo(status == ID_STATUS_INVISIBLE ? ID_STATUS_ONLINE : status, text, NULL); } } @@ -505,7 +505,7 @@ void CJabberProto::SendPresence(int status, bool bSendToAll) int __stdcall JabberGetPacketID(HXML n) { - const TCHAR *str = XmlGetAttrValue(n, _T("id")); + const TCHAR *str = XmlGetAttrValue(n, L"id"); if (str) if (!_tcsncmp(str, _T(JABBER_IQID), _countof(JABBER_IQID) - 1)) return _ttoi(str + _countof(JABBER_IQID) - 1); @@ -516,7 +516,7 @@ int __stdcall JabberGetPacketID(HXML n) TCHAR* __stdcall JabberId2string(int id) { TCHAR text[100]; - mir_sntprintf(text, _T(JABBER_IQID) _T("%d"), id); + mir_sntprintf(text, _T(JABBER_IQID) L"%d", id); return mir_tstrdup(text); } @@ -543,7 +543,7 @@ TCHAR* CJabberProto::GetClientJID(const TCHAR *jid, TCHAR *dest, size_t destLen) mir_cslock lck(m_csLists); JABBER_LIST_ITEM *LI = ListGetItemPtr(LIST_ROSTER, jid); if (LI != NULL) { - if (LI->arResources.getCount() == 1 && !mir_tstrcmp(LI->arResources[0]->m_tszCapsNode, _T("http://talk.google.com/xmpp/bot/caps"))) { + if (LI->arResources.getCount() == 1 && !mir_tstrcmp(LI->arResources[0]->m_tszCapsNode, L"http://talk.google.com/xmpp/bot/caps")) { if (p) *p = 0; return dest; } @@ -551,7 +551,7 @@ TCHAR* CJabberProto::GetClientJID(const TCHAR *jid, TCHAR *dest, size_t destLen) if (p == NULL) { pResourceStatus r(LI->getBestResource()); if (r != NULL) - mir_sntprintf(dest, destLen, _T("%s/%s"), jid, r->m_tszResourceName); + mir_sntprintf(dest, destLen, L"%s/%s", jid, r->m_tszResourceName); } } @@ -582,17 +582,17 @@ TCHAR* __stdcall JabberStripJid(const TCHAR *jid, TCHAR *dest, size_t destLen) LPCTSTR __stdcall JabberGetPictureType(HXML node, const char *picBuf) { if (LPCTSTR ptszType = XmlGetText(XmlGetChild(node, "TYPE"))) - if (!mir_tstrcmp(ptszType, _T("image/jpeg")) || - !mir_tstrcmp(ptszType, _T("image/png")) || - !mir_tstrcmp(ptszType, _T("image/gif")) || - !mir_tstrcmp(ptszType, _T("image/bmp"))) + if (!mir_tstrcmp(ptszType, L"image/jpeg") || + !mir_tstrcmp(ptszType, L"image/png") || + !mir_tstrcmp(ptszType, L"image/gif") || + !mir_tstrcmp(ptszType, L"image/bmp")) return ptszType; switch (ProtoGetBufferFormat(picBuf)) { - case PA_FORMAT_GIF: return _T("image/gif"); - case PA_FORMAT_BMP: return _T("image/bmp"); - case PA_FORMAT_PNG: return _T("image/png"); - case PA_FORMAT_JPEG: return _T("image/jpeg"); + case PA_FORMAT_GIF: return L"image/gif"; + case PA_FORMAT_BMP: return L"image/bmp"; + case PA_FORMAT_PNG: return L"image/png"; + case PA_FORMAT_JPEG: return L"image/jpeg"; } return NULL; @@ -664,7 +664,7 @@ void CJabberProto::ComboLoadRecentStrings(HWND hwndDlg, UINT idcCombo, char *par } if (!SendDlgItemMessage(hwndDlg, idcCombo, CB_GETCOUNT, 0, 0)) - SendDlgItemMessage(hwndDlg, idcCombo, CB_ADDSTRING, 0, (LPARAM)_T("")); + SendDlgItemMessage(hwndDlg, idcCombo, CB_ADDSTRING, 0, (LPARAM)L""); } void CJabberProto::ComboAddRecentString(HWND hwndDlg, UINT idcCombo, char *param, const TCHAR *string, int recentCount) @@ -676,7 +676,7 @@ void CJabberProto::ComboAddRecentString(HWND hwndDlg, UINT idcCombo, char *param int id; SendDlgItemMessage(hwndDlg, idcCombo, CB_ADDSTRING, 0, (LPARAM)string); - if ((id = SendDlgItemMessage(hwndDlg, idcCombo, CB_FINDSTRING, (WPARAM)-1, (LPARAM)_T(""))) != CB_ERR) + if ((id = SendDlgItemMessage(hwndDlg, idcCombo, CB_FINDSTRING, (WPARAM)-1, (LPARAM)L"")) != CB_ERR) SendDlgItemMessage(hwndDlg, idcCombo, CB_DELETESTRING, id, 0); id = getByte(param, 0); @@ -758,7 +758,7 @@ void CJabberProto::RebuildInfoFrame() TCHAR* time2str(time_t _time, TCHAR *buf, size_t bufLen) { struct tm* T = gmtime(&_time); - mir_sntprintf(buf, bufLen, _T("%04d-%02d-%02dT%02d:%02d:%02dZ"), + mir_sntprintf(buf, bufLen, L"%04d-%02d-%02dT%02d:%02d:%02dZ", T->tm_year + 1900, T->tm_mon + 1, T->tm_mday, T->tm_hour, T->tm_min, T->tm_sec); return buf; } @@ -766,9 +766,9 @@ TCHAR* time2str(time_t _time, TCHAR *buf, size_t bufLen) time_t str2time(const TCHAR *buf) { struct tm T = { 0 }; - if (_stscanf(buf, _T("%04d-%02d-%02dT%02d:%02d:%02dZ"), &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec) != 6) { + if (_stscanf(buf, L"%04d-%02d-%02dT%02d:%02d:%02dZ", &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec) != 6) { int boo; - if (_stscanf(buf, _T("%04d-%02d-%02dT%02d:%02d:%02d.%dZ"), &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, &boo) != 7) + if (_stscanf(buf, L"%04d-%02d-%02dT%02d:%02d:%02d.%dZ", &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, &boo) != 7) return 0; } @@ -837,11 +837,11 @@ BOOL CJabberProto::EnterString(CMString &result, LPCTSTR caption, int type, char bool JabberReadXep203delay(HXML node, time_t &msgTime) { - HXML n = XmlGetChildByTag(node, "delay", "xmlns", _T("urn:xmpp:delay")); + HXML n = XmlGetChildByTag(node, "delay", "xmlns", L"urn:xmpp:delay"); if (n == NULL) return false; - const TCHAR *ptszTimeStamp = XmlGetAttrValue(n, _T("stamp")); + const TCHAR *ptszTimeStamp = XmlGetAttrValue(n, L"stamp"); if (ptszTimeStamp == NULL) return false; @@ -927,13 +927,13 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param) TCHAR tszFileName[MAX_PATH]; GetAvatarFileName(ai.hContact, tszFileName, _countof(tszFileName)); _tcsncpy_s(ai.filename, tszFileName, _TRUNCATE); - FILE* out = _tfopen(tszFileName, _T("wb")); + FILE* out = _tfopen(tszFileName, L"wb"); if (out != NULL) { fwrite(res->pData, res->dataLength, 1, out); fclose(out); setString(ai.hContact, "AvatarSaved", buffer); ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &ai, 0); - debugLog(_T("Broadcast new avatar: %s"), ai.filename); + debugLog(L"Broadcast new avatar: %s", ai.filename); } else ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, &ai, 0); } diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp index 8ad9ff1164..ad0f752bb2 100644 --- a/protocols/JabberG/src/jabber_vcard.cpp +++ b/protocols/JabberG/src/jabber_vcard.cpp @@ -36,8 +36,8 @@ int CJabberProto::SendGetVcard(const TCHAR *jid) if (!m_bJabberOnline) return 0; CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultGetVcard, JABBER_IQ_TYPE_GET, jid); - m_ThreadInfo->send(XmlNodeIq(pInfo) << XCHILDNS(_T("vCard"), JABBER_FEAT_VCARD_TEMP) - << XATTR(_T("prodid"), _T("-//HandGen//NONSGML vGen v1.0//EN")) << XATTR(_T("version"), _T("2.0"))); + m_ThreadInfo->send(XmlNodeIq(pInfo) << XCHILDNS(L"vCard", JABBER_FEAT_VCARD_TEMP) + << XATTR(L"prodid", L"-//HandGen//NONSGML vGen v1.0//EN") << XATTR(L"version", L"2.0")); return pInfo->GetIqId(); } @@ -291,9 +291,9 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR dat->ppro->GetAvatarFileName(NULL, szAvatarFileName, _countof(szAvatarFileName)); if (_taccess(szAvatarFileName, 0) == 0) { if (GetTempPath(_countof(szTempPath), szTempPath) <= 0) - mir_tstrcpy(szTempPath, _T(".\\")); - if (GetTempFileName(szTempPath, _T("jab"), 0, szTempFileName) > 0) { - dat->ppro->debugLog(_T("Temp file = %s"), szTempFileName); + mir_tstrcpy(szTempPath, L".\\"); + if (GetTempFileName(szTempPath, L"jab", 0, szTempFileName) > 0) { + dat->ppro->debugLog(L"Temp file = %s", szTempFileName); if (CopyFile(szAvatarFileName, szTempFileName, FALSE) == TRUE) { if ((dat->hBitmap = Bitmap_Load(szTempFileName)) != NULL) { FIP->FI_Premultiply(dat->hBitmap); @@ -349,16 +349,16 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR struct _stat st; HBITMAP hNewBitmap; - dat->ppro->debugLog(_T("File selected is %s"), szFileName); + dat->ppro->debugLog(L"File selected is %s", szFileName); if (_tstat(szFileName, &st) < 0 || st.st_size > 40 * 1024) { MessageBox(hwndDlg, TranslateT("Only JPG, GIF, and BMP image files smaller than 40 KB are supported."), TranslateT("Jabber vCard"), MB_OK | MB_SETFOREGROUND); break; } if (GetTempPath(_countof(szTempPath), szTempPath) <= 0) - mir_tstrcpy(szTempPath, _T(".\\")); + mir_tstrcpy(szTempPath, L".\\"); - if (GetTempFileName(szTempPath, _T("jab"), 0, szTempFileName) > 0) { - dat->ppro->debugLog(_T("Temp file = %s"), szTempFileName); + if (GetTempFileName(szTempPath, L"jab", 0, szTempFileName) > 0) { + dat->ppro->debugLog(L"Temp file = %s", szTempFileName); if (CopyFile(szFileName, szTempFileName, FALSE) == TRUE) { if ((hNewBitmap = Bitmap_Load(szTempFileName)) != NULL) { if (dat->hBitmap) { @@ -733,7 +733,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP ptrT email( ppro->getTStringA(idstr)); if (email == NULL) break; - mir_sntprintf(number, _T("%d"), i+1); + mir_sntprintf(number, L"%d", i+1); lvi.pszText = number; lvi.lParam = (LPARAM)i; ListView_InsertItem(GetDlgItem(hwndDlg, IDC_EMAILS), &lvi); @@ -754,7 +754,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP ptrT phone( ppro->getTStringA(idstr)); if (phone == NULL) break; - mir_sntprintf(number, _T("%d"), i+1); + mir_sntprintf(number, L"%d", i+1); lvi.pszText = number; lvi.lParam = (LPARAM)i; ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi); @@ -1018,11 +1018,11 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) char idstr[33]; XmlNodeIq iq(AddIQ(&CJabberProto::OnIqResultSetVcard, JABBER_IQ_TYPE_SET)); - HXML v = iq << XCHILDNS(_T("vCard"), JABBER_FEAT_VCARD_TEMP); + HXML v = iq << XCHILDNS(L"vCard", JABBER_FEAT_VCARD_TEMP); AppendVcardFromDB(v, "FN", "FullName"); - HXML n = v << XCHILD(_T("N")); + HXML n = v << XCHILD(L"N"); AppendVcardFromDB(n, "GIVEN", "FirstName"); AppendVcardFromDB(n, "MIDDLE", "MiddleName"); AppendVcardFromDB(n, "FAMILY", "LastName"); @@ -1037,19 +1037,19 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) if (email == NULL) break; - HXML e = v << XCHILD(_T("EMAIL"), email); + HXML e = v << XCHILD(L"EMAIL", email); AppendVcardFromDB(e, "USERID", idstr); mir_snprintf(idstr, "e-mailFlag%d", i); WORD nFlag = getWord(idstr, 0); - if (nFlag & JABBER_VCEMAIL_HOME) e << XCHILD(_T("HOME")); - if (nFlag & JABBER_VCEMAIL_WORK) e << XCHILD(_T("WORK")); - if (nFlag & JABBER_VCEMAIL_INTERNET) e << XCHILD(_T("INTERNET")); - if (nFlag & JABBER_VCEMAIL_X400) e << XCHILD(_T("X400")); + if (nFlag & JABBER_VCEMAIL_HOME) e << XCHILD(L"HOME"); + if (nFlag & JABBER_VCEMAIL_WORK) e << XCHILD(L"WORK"); + if (nFlag & JABBER_VCEMAIL_INTERNET) e << XCHILD(L"INTERNET"); + if (nFlag & JABBER_VCEMAIL_X400) e << XCHILD(L"X400"); } - n = v << XCHILD(_T("ADR")); - n << XCHILD(_T("HOME")); + n = v << XCHILD(L"ADR"); + n << XCHILD(L"HOME"); AppendVcardFromDB(n, "STREET", "Street"); AppendVcardFromDB(n, "EXTADR", "Street2"); AppendVcardFromDB(n, "EXTADD", "Street2"); // for compatibility with client using old vcard format @@ -1059,8 +1059,8 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) AppendVcardFromDB(n, "CTRY", "Country"); AppendVcardFromDB(n, "COUNTRY", "Country"); // for compatibility with client using old vcard format - n = v << XCHILD(_T("ADR")); - n << XCHILD(_T("WORK")); + n = v << XCHILD(L"ADR"); + n << XCHILD(L"WORK"); AppendVcardFromDB(n, "STREET", "CompanyStreet"); AppendVcardFromDB(n, "EXTADR", "CompanyStreet2"); AppendVcardFromDB(n, "EXTADD", "CompanyStreet2"); // for compatibility with client using old vcard format @@ -1070,7 +1070,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) AppendVcardFromDB(n, "CTRY", "CompanyCountry"); AppendVcardFromDB(n, "COUNTRY", "CompanyCountry"); // for compatibility with client using old vcard format - n = v << XCHILD(_T("ORG")); + n = v << XCHILD(L"ORG"); AppendVcardFromDB(n, "ORGNAME", "Company"); AppendVcardFromDB(n, "ORGUNIT", "CompanyDepartment"); @@ -1085,23 +1085,23 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) if (phone == NULL) break; - n = v << XCHILD(_T("TEL")); + n = v << XCHILD(L"TEL"); AppendVcardFromDB(n, "NUMBER", idstr); mir_snprintf(idstr, "PhoneFlag%d", i); WORD nFlag = getWord(idstr, 0); - if (nFlag & JABBER_VCTEL_HOME) n << XCHILD(_T("HOME")); - if (nFlag & JABBER_VCTEL_WORK) n << XCHILD(_T("WORK")); - if (nFlag & JABBER_VCTEL_VOICE) n << XCHILD(_T("VOICE")); - if (nFlag & JABBER_VCTEL_FAX) n << XCHILD(_T("FAX")); - if (nFlag & JABBER_VCTEL_PAGER) n << XCHILD(_T("PAGER")); - if (nFlag & JABBER_VCTEL_MSG) n << XCHILD(_T("MSG")); - if (nFlag & JABBER_VCTEL_CELL) n << XCHILD(_T("CELL")); - if (nFlag & JABBER_VCTEL_VIDEO) n << XCHILD(_T("VIDEO")); - if (nFlag & JABBER_VCTEL_BBS) n << XCHILD(_T("BBS")); - if (nFlag & JABBER_VCTEL_MODEM) n << XCHILD(_T("MODEM")); - if (nFlag & JABBER_VCTEL_ISDN) n << XCHILD(_T("ISDN")); - if (nFlag & JABBER_VCTEL_PCS) n << XCHILD(_T("PCS")); + if (nFlag & JABBER_VCTEL_HOME) n << XCHILD(L"HOME"); + if (nFlag & JABBER_VCTEL_WORK) n << XCHILD(L"WORK"); + if (nFlag & JABBER_VCTEL_VOICE) n << XCHILD(L"VOICE"); + if (nFlag & JABBER_VCTEL_FAX) n << XCHILD(L"FAX"); + if (nFlag & JABBER_VCTEL_PAGER) n << XCHILD(L"PAGER"); + if (nFlag & JABBER_VCTEL_MSG) n << XCHILD(L"MSG"); + if (nFlag & JABBER_VCTEL_CELL) n << XCHILD(L"CELL"); + if (nFlag & JABBER_VCTEL_VIDEO) n << XCHILD(L"VIDEO"); + if (nFlag & JABBER_VCTEL_BBS) n << XCHILD(L"BBS"); + if (nFlag & JABBER_VCTEL_MODEM) n << XCHILD(L"MODEM"); + if (nFlag & JABBER_VCTEL_ISDN) n << XCHILD(L"ISDN"); + if (nFlag & JABBER_VCTEL_PCS) n << XCHILD(L"PCS"); } TCHAR szAvatarName[MAX_PATH], *szFileName; @@ -1112,15 +1112,15 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) szFileName = szAvatarName; // Set photo element, also update the global jabberVcardPhotoFileName to reflect the update - debugLog(_T("Before update, file name = %s"), szFileName); + debugLog(L"Before update, file name = %s", szFileName); if (szFileName == NULL || szFileName[0] == 0) { - v << XCHILD(_T("PHOTO")); + v << XCHILD(L"PHOTO"); DeleteFile(szAvatarName); delSetting("AvatarSaved"); delSetting("AvatarHash"); } else { - debugLog(_T("Saving picture from %s"), szFileName); + debugLog(L"Saving picture from %s", szFileName); struct _stat st; if (_tstat(szFileName, &st) >= 0) { @@ -1133,16 +1133,16 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) if (ReadFile(hFile, buffer, st.st_size, &nRead, NULL)) { ptrA str(mir_base64_encode((PBYTE)(LPSTR)buffer, nRead)); if (str != NULL) { - n = v << XCHILD(_T("PHOTO")); + n = v << XCHILD(L"PHOTO"); TCHAR *szFileType; switch (ProtoGetBufferFormat(buffer)) { - case PA_FORMAT_PNG: szFileType = _T("image/png"); break; - case PA_FORMAT_GIF: szFileType = _T("image/gif"); break; - case PA_FORMAT_BMP: szFileType = _T("image/bmp"); break; - default: szFileType = _T("image/jpeg"); break; + case PA_FORMAT_PNG: szFileType = L"image/png"; break; + case PA_FORMAT_GIF: szFileType = L"image/gif"; break; + case PA_FORMAT_BMP: szFileType = L"image/bmp"; break; + default: szFileType = L"image/jpeg"; break; } - n << XCHILD(_T("TYPE"), szFileType); - n << XCHILD(_T("BINVAL"), _A2T(str)); + n << XCHILD(L"TYPE", szFileType); + n << XCHILD(L"BINVAL", _A2T(str)); // NEED TO UPDATE OUR AVATAR HASH: BYTE digest[MIR_SHA1_HASH_SIZE]; diff --git a/protocols/JabberG/src/jabber_xml.cpp b/protocols/JabberG/src/jabber_xml.cpp index 37f15c2dce..f4626e8921 100644 --- a/protocols/JabberG/src/jabber_xml.cpp +++ b/protocols/JabberG/src/jabber_xml.cpp @@ -34,49 +34,49 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // XmlNodeIq class members XmlNodeIq::XmlNodeIq(const TCHAR *type, int id, LPCTSTR to) : - XmlNode(_T("iq")) + XmlNode(L"iq") { - if (type != NULL) *this << XATTR(_T("type"), type); - if (to != NULL) *this << XATTR(_T("to"), to); + if (type != NULL) *this << XATTR(L"type", type); + if (to != NULL) *this << XATTR(L"to", to); if (id != -1 ) *this << XATTRID(id); } XmlNodeIq::XmlNodeIq(const TCHAR *type, LPCTSTR idStr, LPCTSTR to) : - XmlNode(_T("iq")) + XmlNode(L"iq") { - if (type != NULL) *this << XATTR(_T("type"), type ); - if (to != NULL) *this << XATTR(_T("to"), to ); - if (idStr != NULL) *this << XATTR(_T("id"), idStr); + if (type != NULL) *this << XATTR(L"type", type ); + if (to != NULL) *this << XATTR(L"to", to ); + if (idStr != NULL) *this << XATTR(L"id", idStr); } XmlNodeIq::XmlNodeIq(const TCHAR *type, HXML node, LPCTSTR to) : - XmlNode(_T("iq")) + XmlNode(L"iq") { - if (type != NULL) *this << XATTR(_T("type"), type ); - if (to != NULL) *this << XATTR(_T("to"), to ); + if (type != NULL) *this << XATTR(L"type", type ); + if (to != NULL) *this << XATTR(L"to", to ); if (node != NULL) { - const TCHAR *iqId = XmlGetAttrValue(*this, _T("id")); - if (iqId != NULL) *this << XATTR(_T("id"), iqId); + const TCHAR *iqId = XmlGetAttrValue(*this, L"id"); + if (iqId != NULL) *this << XATTR(L"id", iqId); } } XmlNodeIq::XmlNodeIq(CJabberIqInfo *pInfo) : - XmlNode(_T("iq")) + XmlNode(L"iq") { if (pInfo) { - if (pInfo->GetCharIqType() != NULL) *this << XATTR(_T("type"), _A2T(pInfo->GetCharIqType())); - if (pInfo->GetReceiver() != NULL) *this << XATTR(_T("to"), pInfo->GetReceiver()); + if (pInfo->GetCharIqType() != NULL) *this << XATTR(L"type", _A2T(pInfo->GetCharIqType())); + if (pInfo->GetReceiver() != NULL) *this << XATTR(L"to", pInfo->GetReceiver()); if (pInfo->GetIqId() != -1) *this << XATTRID(pInfo->GetIqId()); } } XmlNodeIq::XmlNodeIq(const TCHAR *type, CJabberIqInfo *pInfo) : - XmlNode(_T("iq")) + XmlNode(L"iq") { - if (type != NULL) *this << XATTR(_T("type"), type); + if (type != NULL) *this << XATTR(L"type", type); if (pInfo) { - if (pInfo->GetFrom() != NULL) *this << XATTR(_T("to"), pInfo->GetFrom()); - if (pInfo->GetIdStr() != NULL) *this << XATTR(_T("id"), pInfo->GetIdStr()); + if (pInfo->GetFrom() != NULL) *this << XATTR(L"to", pInfo->GetFrom()); + if (pInfo->GetIdStr() != NULL) *this << XATTR(L"id", pInfo->GetIdStr()); } } @@ -118,15 +118,15 @@ XmlNode::~XmlNode() HXML __fastcall operator<<(HXML node, const XCHILDNS& child) { HXML res = XmlAddChild(node, child.name); - XmlAddAttr(res, _T("xmlns"), child.ns); + XmlAddAttr(res, L"xmlns", child.ns); return res; } HXML __fastcall operator<<(HXML node, const XQUERY& child) { - HXML n = XmlAddChild(node, _T("query")); + HXML n = XmlAddChild(node, L"query"); if (n) - XmlAddAttr(n, _T("xmlns"), child.ns); + XmlAddAttr(n, L"xmlns", child.ns); return n; } @@ -154,8 +154,8 @@ void __fastcall XmlAddAttr(HXML hXml, LPCTSTR pszName, unsigned __int64 value) void __fastcall XmlAddAttrID(HXML hXml, int id) { TCHAR text[100]; - mir_sntprintf(text, _T(JABBER_IQID) _T("%d"), id); - XmlAddAttr(hXml, _T("id"), text); + mir_sntprintf(text, _T(JABBER_IQID) L"%d", id); + XmlAddAttr(hXml, L"id", text); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -294,7 +294,7 @@ void XPath::ProcessPath(LookupInfo &info, bool bCreate) } else if (info.nodeIndex) { int idx = _ttoi(info.nodeIndex.p); - m_hXml = mir_tstrcmp(nodeName, _T("*")) ? XmlGetNthChild(m_hXml, nodeName, idx) : XmlGetChild(m_hXml, idx - 1); + m_hXml = mir_tstrcmp(nodeName, L"*") ? XmlGetNthChild(m_hXml, nodeName, idx) : XmlGetChild(m_hXml, idx - 1); } else { HXML hXml = XmlGetChild(m_hXml, nodeName); diff --git a/protocols/JabberG/src/jabber_xml.h b/protocols/JabberG/src/jabber_xml.h index d00df9a780..685336b35c 100644 --- a/protocols/JabberG/src/jabber_xml.h +++ b/protocols/JabberG/src/jabber_xml.h @@ -215,9 +215,9 @@ HXML __fastcall operator<<(HXML node, const XQUERY& child); // Samples: // LPCTSTR s = XPathT(node, "child/subchild[@attr='value']"); // get node text // LPCTSTR s = XPathT(node, "child/subchild[2]/@attr"); // get attribute value -// XPathT(node, "child/subchild[@name='test']/@attr") = _T("Hello"); // create path if needed and set attribute value +// XPathT(node, "child/subchild[@name='test']/@attr") = L"Hello"; // create path if needed and set attribute value // -// XPathT(node, "child/subchild[@name='test']") = _T("Hello"); // TODO: create path if needed and set node text +// XPathT(node, "child/subchild[@name='test']") = L"Hello"; // TODO: create path if needed and set node text #define XPathT(a,b) XPath(a, _T(b)) diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 4982f6fe1f..e9bacc1e5d 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -286,7 +286,7 @@ void CJabberDlgPepSimple::cbModes_OnChange(CCtrlData *) mir_snprintf(szSetting, "PepMsg_%s", m_modes[m_cbModes.GetItemData(m_prevSelected)].m_name); ptrT szDescr( m_proto->getTStringA(szSetting)); - m_txtDescription.SetText((szDescr != NULL) ? szDescr : _T("")); + m_txtDescription.SetText((szDescr != NULL) ? szDescr : L""); m_txtDescription.Enable(true); } else { @@ -341,7 +341,7 @@ BOOL CJabberDlgPepSimple::OnWmDrawItem(UINT, WPARAM, LPARAM lParam) if (mode->m_subitem) { for (int i = lpdis->itemData; i >= 0; --i) if (!m_modes[i].m_subitem) { - mir_sntprintf(text, _T("%s [%s]"), m_modes[i].m_title, mode->m_title); + mir_sntprintf(text, L"%s [%s]", m_modes[i].m_title, mode->m_title); break; } } @@ -352,7 +352,7 @@ BOOL CJabberDlgPepSimple::OnWmDrawItem(UINT, WPARAM, LPARAM lParam) } else { TCHAR text[128]; - mir_sntprintf(text, _T("...%s"), mode->m_title); + mir_sntprintf(text, L"...%s", mode->m_title); DrawIconEx(lpdis->hDC, lpdis->rcItem.left + 23, (lpdis->rcItem.top + lpdis->rcItem.bottom - 16) / 2, mode->m_hIcon, 16, 16, 0, NULL, DI_NORMAL); TextOut(lpdis->hDC, lpdis->rcItem.left + 44, (lpdis->rcItem.top + lpdis->rcItem.bottom - tm.tmHeight) / 2, text, (int)mir_tstrlen(text)); } @@ -386,11 +386,11 @@ CPepService::~CPepService() void CPepService::Publish() { - XmlNodeIq iq(_T("set"), m_proto->SerialNext()); + XmlNodeIq iq(L"set", m_proto->SerialNext()); CreateData( - iq << XCHILDNS(_T("pubsub"), JABBER_FEAT_PUBSUB) - << XCHILD(_T("publish")) << XATTR(_T("node"), m_node) - << XCHILD(_T("item")) << XATTR(_T("id"), _T("current"))); + iq << XCHILDNS(L"pubsub", JABBER_FEAT_PUBSUB) + << XCHILD(L"publish") << XATTR(L"node", m_node) + << XCHILD(L"item") << XATTR(L"id", L"current")); m_proto->m_ThreadInfo->send(iq); m_wasPublished = true; @@ -402,10 +402,10 @@ void CPepService::Retract() _tcslwr(tempName); m_proto->m_ThreadInfo->send( - XmlNodeIq(_T("set"), m_proto->SerialNext()) - << XCHILDNS(_T("pubsub"), JABBER_FEAT_PUBSUB) - << XCHILD(_T("publish")) << XATTR(_T("node"), m_node) - << XCHILD(_T("item")) + XmlNodeIq(L"set", m_proto->SerialNext()) + << XCHILDNS(L"pubsub", JABBER_FEAT_PUBSUB) + << XCHILD(L"publish") << XATTR(L"node", m_node) + << XCHILD(L"item") << XCHILDNS(tempName, m_node)); mir_free(tempName); @@ -620,19 +620,19 @@ void CPepMood::ProcessItems(const TCHAR *from, HXML itemsNode) } else hSelfContact = m_proto->HContactFromJID(from); - if (XmlGetChild(itemsNode, _T("retract"))) { + if (XmlGetChild(itemsNode, L"retract")) { if (hSelfContact) SetMood(hSelfContact, NULL, NULL); SetMood(hContact, NULL, NULL); return; } - HXML n, moodNode = XPath(itemsNode, _T("item/mood[@xmlns='") JABBER_FEAT_USER_MOOD _T("']")); + HXML n, moodNode = XPath(itemsNode, L"item/mood[@xmlns='" JABBER_FEAT_USER_MOOD L"']"); if (!moodNode) return; LPCTSTR moodType = NULL, moodText = NULL; for (int i=0; n = XmlGetChild(moodNode, i); i++) { - if (!mir_tstrcmp(XmlGetName(n), _T("text"))) + if (!mir_tstrcmp(XmlGetName(n), L"text")) moodText = XmlGetText(n); else moodType = XmlGetName(n); @@ -650,10 +650,10 @@ void CPepMood::ProcessItems(const TCHAR *from, HXML itemsNode) void CPepMood::CreateData(HXML n) { - HXML moodNode = n << XCHILDNS(_T("mood"), JABBER_FEAT_USER_MOOD); + HXML moodNode = n << XCHILDNS(L"mood", JABBER_FEAT_USER_MOOD); moodNode << XCHILD(_A2T(g_arrMoods[m_mode].szTag)); if (m_text) - moodNode << XCHILD(_T("text"), m_text); + moodNode << XCHILD(L"text", m_text); } void CPepMood::ResetExtraIcon(MCONTACT hContact) @@ -971,7 +971,7 @@ void ActivityBuildTitle(int id, TCHAR *buf, int size) if (szFirst) { if (szSecond) - mir_sntprintf(buf, size, _T("%s [%s]"), TranslateTS(szFirst), TranslateTS(szSecond)); + mir_sntprintf(buf, size, L"%s [%s]", TranslateTS(szFirst), TranslateTS(szSecond)); else mir_tstrncpy(buf, TranslateTS(szFirst), size); } @@ -1007,7 +1007,7 @@ void CPepActivity::ProcessItems(const TCHAR *from, HXML itemsNode) return; } - HXML actNode = XPath(itemsNode, _T("item/activity[@xmlns='") JABBER_FEAT_USER_ACTIVITY _T("']")); + HXML actNode = XPath(itemsNode, L"item/activity[@xmlns='" JABBER_FEAT_USER_ACTIVITY L"']"); if (!actNode) return; @@ -1016,7 +1016,7 @@ void CPepActivity::ProcessItems(const TCHAR *from, HXML itemsNode) HXML n; for (int i=0; n = XmlGetChild(actNode, i); i++) { - if (mir_tstrcmp(XmlGetName(n), _T("text"))) { + if (mir_tstrcmp(XmlGetName(n), L"text")) { szFirstNode = XmlGetName(n); HXML secondNode = XmlGetChild(n, 0); if (szFirstNode && secondNode && XmlGetName(secondNode)) @@ -1040,14 +1040,14 @@ void CPepActivity::CreateData(HXML n) char *szFirstNode = ActivityGetFirst(m_mode); char *szSecondNode = ActivityGetSecond(m_mode); - HXML activityNode = n << XCHILDNS(_T("activity"), JABBER_FEAT_USER_ACTIVITY); + HXML activityNode = n << XCHILDNS(L"activity", JABBER_FEAT_USER_ACTIVITY); HXML firstNode = activityNode << XCHILD(_A2T(szFirstNode)); if (firstNode && szSecondNode) firstNode << XCHILD(_A2T(szSecondNode)); if (m_text) - activityNode << XCHILD(_T("text"), m_text); + activityNode << XCHILD(L"text", m_text); } void CPepActivity::ResetExtraIcon(MCONTACT hContact) @@ -1174,18 +1174,18 @@ BOOL CJabberProto::SendPepTune(TCHAR* szArtist, TCHAR* szLength, TCHAR* szSource if (!m_bJabberOnline || !m_bPepSupported) return FALSE; - XmlNodeIq iq(_T("set"), SerialNext()); - HXML tuneNode = iq << XCHILDNS(_T("pubsub"), JABBER_FEAT_PUBSUB) - << XCHILD(_T("publish")) << XATTR(_T("node"), JABBER_FEAT_USER_TUNE) - << XCHILD(_T("item")) << XCHILDNS(_T("tune"), JABBER_FEAT_USER_TUNE); + XmlNodeIq iq(L"set", SerialNext()); + HXML tuneNode = iq << XCHILDNS(L"pubsub", JABBER_FEAT_PUBSUB) + << XCHILD(L"publish") << XATTR(L"node", JABBER_FEAT_USER_TUNE) + << XCHILD(L"item") << XCHILDNS(L"tune", JABBER_FEAT_USER_TUNE); if (szArtist || szLength || szSource || szTitle || szUri) { - if (szArtist) tuneNode << XCHILD(_T("artist"), szArtist); - if (szLength) tuneNode << XCHILD(_T("length"), szLength); - if (szSource) tuneNode << XCHILD(_T("source"), szSource); - if (szTitle) tuneNode << XCHILD(_T("title"), szTitle); - if (szTrack) tuneNode << XCHILD(_T("track"), szTrack); - if (szUri) tuneNode << XCHILD(_T("uri"), szUri); + if (szArtist) tuneNode << XCHILD(L"artist", szArtist); + if (szLength) tuneNode << XCHILD(L"length", szLength); + if (szSource) tuneNode << XCHILD(L"source", szSource); + if (szTitle) tuneNode << XCHILD(L"title", szTitle); + if (szTrack) tuneNode << XCHILD(L"track", szTrack); + if (szUri) tuneNode << XCHILD(L"uri", szUri); } m_ThreadInfo->send(iq); @@ -1211,18 +1211,18 @@ void CJabberProto::SetContactTune(MCONTACT hContact, LPCTSTR szArtist, LPCTSTR s li.ptszAlbum = (TCHAR*)szSource; li.ptszTitle = (TCHAR*)szTitle; li.ptszTrack = (TCHAR*)szTrack; - szListeningTo = (TCHAR*)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)_T("%title% - %artist%"), (LPARAM)&li); + szListeningTo = (TCHAR*)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%title% - %artist%", (LPARAM)&li); } else { szListeningTo = (TCHAR*)mir_alloc(2048 * sizeof(TCHAR)); - mir_sntprintf(szListeningTo, 2047, _T("%s - %s"), szTitle ? szTitle : _T(""), szArtist ? szArtist : _T("")); + mir_sntprintf(szListeningTo, 2047, L"%s - %s", szTitle ? szTitle : L"", szArtist ? szArtist : L""); } setTString(hContact, "ListeningTo", szListeningTo); char tuneIcon[128]; mir_snprintf(tuneIcon, "%s_%s", m_szModuleName, "main"); - WriteAdvStatus(hContact, ADVSTATUS_TUNE, _T("listening_to"), tuneIcon, TranslateT("Listening To"), szListeningTo); + WriteAdvStatus(hContact, ADVSTATUS_TUNE, L"listening_to", tuneIcon, TranslateT("Listening To"), szListeningTo); mir_free(szListeningTo); } @@ -1286,7 +1286,7 @@ INT_PTR __cdecl CJabberProto::OnSetListeningTo(WPARAM, LPARAM lParam) szTmp++; } } - mir_sntprintf(szLengthInSec, _T("%d"), result); + mir_sntprintf(szLengthInSec, L"%d", result); } SendPepTune(szArtist, szLength ? szLengthInSec : NULL, szSource, szTitle, szTrack, NULL); @@ -1505,15 +1505,15 @@ void g_XstatusIconsInit() TCHAR szFile[MAX_PATH]; GetModuleFileName(hInst, szFile, _countof(szFile)); if (TCHAR *p = _tcsrchr(szFile, '\\')) - mir_tstrcpy(p + 1, _T("..\\Icons\\xstatus_jabber.dll")); + mir_tstrcpy(p + 1, L"..\\Icons\\xstatus_jabber.dll"); TCHAR szSection[100]; - mir_tstrcpy(szSection, _T("Protocols/Jabber/") LPGENT("Moods")); + mir_tstrcpy(szSection, L"Protocols/Jabber/" LPGENT("Moods")); for (int i = 1; i < _countof(g_arrMoods); i++) g_MoodIcons.RegisterIcon(g_arrMoods[i].szTag, szFile, -(200 + i), szSection, TranslateTS(g_arrMoods[i].szName)); - mir_tstrcpy(szSection, _T("Protocols/Jabber/") LPGENT("Activities")); + mir_tstrcpy(szSection, L"Protocols/Jabber/" LPGENT("Activities")); for (int k = 0; k < _countof(g_arrActivities); k++) { if (g_arrActivities[k].szFirst) g_ActivityIcons.RegisterIcon(g_arrActivities[k].szFirst, szFile, g_arrActivities[k].iconid, szSection, TranslateTS(g_arrActivities[k].szTitle)); diff --git a/protocols/JabberG/src/jabber_xstatus.h b/protocols/JabberG/src/jabber_xstatus.h index dcc9ee3107..194a4c71de 100644 --- a/protocols/JabberG/src/jabber_xstatus.h +++ b/protocols/JabberG/src/jabber_xstatus.h @@ -69,7 +69,7 @@ public: for (int i=0; i < getCount(); i++) { CPepService &pepSvc = (*this)[i]; - HXML itemsNode = XmlGetChildByTag(eventNode, _T("items"), _T("node"), pepSvc.GetNode()); + HXML itemsNode = XmlGetChildByTag(eventNode, L"items", L"node", pepSvc.GetNode()); if (itemsNode) pepSvc.ProcessItems(from, itemsNode); } diff --git a/protocols/MRA/src/MraAdvancedSearch.cpp b/protocols/MRA/src/MraAdvancedSearch.cpp index f793de682b..59e2da8242 100644 --- a/protocols/MRA/src/MraAdvancedSearch.cpp +++ b/protocols/MRA/src/MraAdvancedSearch.cpp @@ -54,7 +54,7 @@ static const FieldNames ZodiakField[] = void ResetComboBox(HWND hWndCombo) { SendMessage(hWndCombo, CB_RESETCONTENT, 0, 0); - DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)_T("")); + DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)L""); SendMessage(hWndCombo, CB_SETITEMDATA, dwItem, 0); SendMessage(hWndCombo, CB_SETCURSEL, dwItem, 0); } @@ -77,7 +77,7 @@ void InitComboBoxNumders(HWND hWndCombo, DWORD dwStart, DWORD dwEnd) for (DWORD i = dwStart; i <= dwEnd; i++) { TCHAR szBuff[MAX_PATH]; - mir_sntprintf(szBuff, _T("%lu"), i); + mir_sntprintf(szBuff, L"%lu", i); DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)szBuff); SendMessage(hWndCombo, CB_SETITEMDATA, dwItem, i); } @@ -215,7 +215,7 @@ INT_PTR CALLBACK AdvancedSearchDlgProc(HWND hWndDlg, UINT message, WPARAM wParam HWND hWndCombo = GetDlgItem(hWndDlg, IDC_STATE); SendMessage(hWndCombo, CB_RESETCONTENT, 0, 0); ResetComboBox(GetDlgItem(hWndDlg, IDC_CITY)); - DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)_T("")); + DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)L""); SendMessage(hWndCombo, CB_SETITEMDATA, dwItem, 0); SendMessage(hWndCombo, CB_SETCURSEL, dwItem, 0); @@ -234,7 +234,7 @@ INT_PTR CALLBACK AdvancedSearchDlgProc(HWND hWndDlg, UINT message, WPARAM wParam DWORD dwStateID = GET_CURRENT_COMBO_DATA(hWndDlg, IDC_STATE); HWND hWndCombo = GetDlgItem(hWndDlg, IDC_CITY); SendMessage(hWndCombo, CB_RESETCONTENT, 0, 0); - DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)_T("")); + DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)L""); SendMessage(hWndCombo, CB_SETITEMDATA, dwItem, 0); SendMessage(hWndCombo, CB_SETCURSEL, dwItem, 0); diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index 1d4acdf0b7..9f42d03f4f 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -56,7 +56,7 @@ DWORD CMraProto::MraAvatarsQueueInitialize(HANDLE *phAvatarsQueueHandle) MRA_AVATARS_QUEUE *pmraaqAvatarsQueue = new MRA_AVATARS_QUEUE(); TCHAR szBuffer[MAX_PATH]; - mir_sntprintf(szBuffer, _T("%s %s"), m_tszUserName, TranslateT("Avatars' plugin connections")); + mir_sntprintf(szBuffer, L"%s %s", m_tszUserName, TranslateT("Avatars' plugin connections")); NETLIBUSER nlu = { sizeof(nlu) }; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR; @@ -476,7 +476,7 @@ DWORD CMraProto::MraAvatarsGetFileName(HANDLE hQueue, MCONTACT hContact, DWORD d return ERROR_NOT_SUPPORTED; TCHAR tszBase[MAX_PATH]; - mir_sntprintf(tszBase, _T("%s\\%s\\"), VARST(_T("%miranda_avatarcache%")), m_tszUserName); + mir_sntprintf(tszBase, L"%s\\%s\\", VARST(L"%miranda_avatarcache%"), m_tszUserName); res = tszBase; // some path in buff and free space for file name is avaible diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp index 32a15914b3..782cb3fe40 100644 --- a/protocols/MRA/src/MraChat.cpp +++ b/protocols/MRA/src/MraChat.cpp @@ -39,7 +39,7 @@ INT_PTR CMraProto::MraChatSessionNew(MCONTACT hContact) gcw.pszModule = m_szModuleName; gcw.ptszName = pcli->pfnGetContactDisplayName(hContact, 0); gcw.ptszID = wszEMail; - gcw.ptszStatusbarText = _T("status bar"); + gcw.ptszStatusbarText = L"status bar"; gcw.dwItemData = (DWORD)hContact; if (!CallServiceSync(MS_GC_NEWSESSION, NULL, (LPARAM)&gcw)) { GCDEST gcd = { m_szModuleName, wszEMail.c_str(), GC_EVENT_ADDGROUP }; @@ -56,7 +56,7 @@ INT_PTR CMraProto::MraChatSessionNew(MCONTACT hContact) DWORD opcode = MULTICHAT_GET_MEMBERS; CMStringA szEmail; if (mraGetStringA(hContact, "e-mail", szEmail)) - MraMessage(FALSE, NULL, 0, MESSAGE_FLAG_MULTICHAT, szEmail, _T(""), (LPBYTE)&opcode, sizeof(opcode)); + MraMessage(FALSE, NULL, 0, MESSAGE_FLAG_MULTICHAT, szEmail, L"", (LPBYTE)&opcode, sizeof(opcode)); return 0; } } @@ -145,7 +145,7 @@ INT_PTR CMraProto::MraChatSessionMembersAdd(MCONTACT hContactChatSession, const INT_PTR CMraProto::MraChatSessionJoinUser(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime) { if (hContactChatSession) - return MraChatSessionEventSendByHandle(hContactChatSession, GC_EVENT_JOIN, GCEF_ADDTOLOG, lpszEMailInMultiChat, lpwszStatuses[MRA_CHAT_STATUS_VISITOR], _T(""), 0, dwTime); + return MraChatSessionEventSendByHandle(hContactChatSession, GC_EVENT_JOIN, GCEF_ADDTOLOG, lpszEMailInMultiChat, lpwszStatuses[MRA_CHAT_STATUS_VISITOR], L"", 0, dwTime); return 1; } @@ -224,7 +224,7 @@ int CMraProto::MraChatGcEventHook(WPARAM, LPARAM lParam) case GC_USER_CHANMGR: //int iqId = SerialNext(); //IqAdd( iqId, IQ_PROC_NONE, &CJabberProto::OnIqResultGetMuc ); - //m_ThreadInfo->send( XmlNodeIq( _T("get"), iqId, item->jid ) << XQUERY( xmlnsOwner )); + //m_ThreadInfo->send( XmlNodeIq( L"get", iqId, item->jid ) << XQUERY( xmlnsOwner )); break; } } diff --git a/protocols/MRA/src/MraConstans.h b/protocols/MRA/src/MraConstans.h index 9c897cdb8b..1b9f89a0c1 100644 --- a/protocols/MRA/src/MraConstans.h +++ b/protocols/MRA/src/MraConstans.h @@ -191,7 +191,7 @@ static const LPSTR lpcszMailRuDomains[] = #define MRA_AVT_DEFAULT_TIMEOUT_RECV 30 #define MRA_AVT_DEFAULT_USE_KEEPALIVE_CONN TRUE #define MRA_AVT_DEFAULT_CHK_INTERVAL 60 -#define MRA_AVT_DEFAULT_AVT_FILENAME _T("_default.jpg") +#define MRA_AVT_DEFAULT_AVT_FILENAME L"_default.jpg" #define MRA_AVT_DEFAULT_RET_ABC_PATH TRUE #define MRA_DELETE_AVT_ON_CONTACT_DELETE TRUE diff --git a/protocols/MRA/src/MraIcons.cpp b/protocols/MRA/src/MraIcons.cpp index 8e71438ceb..8faf3d38a1 100644 --- a/protocols/MRA/src/MraIcons.cpp +++ b/protocols/MRA/src/MraIcons.cpp @@ -84,12 +84,12 @@ void InitXStatusIcons() // load xstatus icons lib DWORD dwBuffLen; - DWORD dwErrorCode = FindFile(g_szMirWorkDirPath, (DWORD)g_dwMirWorkDirPathLen, _T("xstatus_MRA.dll"), -1, szBuff, _countof(szBuff), &dwBuffLen); + DWORD dwErrorCode = FindFile(g_szMirWorkDirPath, (DWORD)g_dwMirWorkDirPathLen, L"xstatus_MRA.dll", -1, szBuff, _countof(szBuff), &dwBuffLen); if (dwErrorCode == NO_ERROR) { g_hDLLXStatusIcons = LoadLibraryEx(szBuff, NULL, 0); if (g_hDLLXStatusIcons) { dwBuffLen = LoadString(g_hDLLXStatusIcons, IDS_IDENTIFY, szBuff, MAX_FILEPATH); - if (dwBuffLen == 0 || _tcsnicmp(_T("# Custom Status Icons #"), szBuff, 23)) { + if (dwBuffLen == 0 || _tcsnicmp(L"# Custom Status Icons #", szBuff, 23)) { FreeLibrary(g_hDLLXStatusIcons); g_hDLLXStatusIcons = NULL; } @@ -101,7 +101,7 @@ void InitXStatusIcons() GetModuleFileName((g_hDLLXStatusIcons != NULL) ? g_hDLLXStatusIcons : g_hInstance, szBuff, _countof(szBuff)); SKINICONDESC sid = { 0 }; - sid.section.t = LPGENT("Protocols")_T("/") LPGENT("MRA") _T("/") LPGENT("Custom Status"); + sid.section.t = LPGENT("Protocols")L"/" LPGENT("MRA") L"/" LPGENT("Custom Status"); sid.defaultFile.t = szBuff; sid.flags = SIDF_ALL_TCHAR; diff --git a/protocols/MRA/src/MraPlaces.h b/protocols/MRA/src/MraPlaces.h index d2b0d4d417..e58e27962b 100644 --- a/protocols/MRA/src/MraPlaces.h +++ b/protocols/MRA/src/MraPlaces.h @@ -4,8 +4,8 @@ #pragma once -#define lpwszOther _T("������") -//static LPWSTR lpwszOther = _T("������"); +#define lpwszOther L"������" +//static LPWSTR lpwszOther = L"������"; typedef struct @@ -63,1603 +63,1603 @@ typedef struct static const MRA_PLACE mrapPlaces[] = { - {24, 0, 0, _T("������")}, - {81, 0, 0, _T("�����������")}, - {82, 0, 0, _T("�������")}, - {97, 0, 0, _T("����������")}, - {96, 0, 0, _T("���������")}, - {99, 0, 0, _T("�������")}, - {100, 0, 0, _T("������-����������")}, - {101, 0, 0, _T("�����")}, - {102, 0, 0, _T("�������")}, - {83, 0, 0, _T("������")}, - {86, 0, 0, _T("�������")}, - {95, 0, 0, _T("�����")}, - {103, 0, 0, _T("���������")}, - {79, 0, 0, _T("��������")}, - {85, 0, 0, _T("����")}, - {87, 0, 0, _T("����")}, - {104, 0, 0, _T("�����")}, - {84, 0, 0, _T("���������")}, - {105, 0, 0, _T("��������")}, - {106, 0, 0, _T("�����")}, - {107, 0, 0, _T("����")}, - {92, 0, 0, _T("�������� (����������)")}, - {76, 0, 0, _T("�����")}, - {3215, 0, 0, _T("��������� ������� (�����.)")}, - {29, 0, 0, _T("����� (����)")}, - {108, 0, 0, _T("�����")}, - {88, 0, 0, _T("������")}, - {109, 0, 0, _T("����")}, - {110, 0, 0, _T("�����")}, - {111, 0, 0, _T("��������")}, - {112, 0, 0, _T("��������")}, - {113, 0, 0, _T("��������")}, - {114, 0, 0, _T("������")}, - {115, 0, 0, _T("�����")}, - {116, 0, 0, _T("������������ �������� �������")}, - {117, 0, 0, _T("����")}, - {3216, 0, 0, _T("������ ��������� (�����.)")}, - {122, 0, 0, _T("��������")}, - {89, 0, 0, _T("���������")}, - {94, 0, 0, _T("���������� ������")}, - {118, 0, 0, _T("��������")}, - {78, 0, 0, _T("�����")}, - {91, 0, 0, _T("�����������")}, - {119, 0, 0, _T("�������")}, - {120, 0, 0, _T("�������")}, - {132, 0, 0, _T("�����")}, - {90, 0, 0, _T("���������")}, - {77, 0, 0, _T("������")}, - {93, 0, 0, _T("����������")}, - {121, 0, 0, _T("���������")}, - {98, 0, 0, _T("��� �����")}, - {75, 0, 0, _T("������")}, - {123, 0, 0, _T("���������")}, - {454, 0, 0, _T("������������ �����")}, - {124, 0, 0, _T("�������")}, - {453, 0, 0, _T("���� (���)")}, - {126, 0, 0, _T("��������")}, - {127, 0, 0, _T("���������� �������")}, - {128, 0, 0, _T("���������� (������������ ����� ����������)")}, - {129, 0, 0, _T("�����")}, - {3220, 0, 0, _T("���� (�.���.)")}, - {130, 0, 0, _T("����� ��������")}, - {3218, 0, 0, _T("����� ��������� (��.)")}, - {3221, 0, 0, _T("������� ���� (�.���.)")}, - {3230, 0, 0, _T("������� ���� � ���������� (�����.)")}, - {131, 0, 0, _T("�����")}, - {133, 0, 0, _T("����� - ����� ������")}, - {3222, 0, 0, _T("������� (����.)")}, - {125, 0, 0, _T("�����")}, - {3219, 0, 0, _T("���. ���������� ������� (���)")}, - {134, 0, 0, _T("���������� �������")}, - {3223, 0, 0, _T("������� (�.���.)")}, - {135, 0, 0, _T("�����")}, - {136, 0, 0, _T("������")}, - {3224, 0, 0, _T("������ � ������ ������� (��.)")}, - {137, 0, 0, _T("�����")}, - {3226, 0, 0, _T("����������� ���������")}, - {3225, 0, 0, _T("����������� ����� ����������")}, - {138, 0, 0, _T("������")}, - {139, 0, 0, _T("���")}, - {3200, 0, 0, _T("������� (����.)")}, - {140, 0, 0, _T("������� � �������")}, - {141, 0, 0, _T("���������")}, - {3202, 0, 0, _T("����� (���.)")}, - {142, 0, 0, _T("������")}, - {143, 0, 0, _T("��������")}, - {146, 0, 0, _T("�����")}, - {3203, 0, 0, _T("������� (����.)")}, - {144, 0, 0, _T("�������")}, - {145, 0, 0, _T("��������")}, - {147, 0, 0, _T("���������")}, - {3204, 0, 0, _T("���������� ������� (����.)")}, - {452, 0, 0, _T("���������� ������� (���)")}, - {149, 0, 0, _T("�����")}, - {148, 0, 0, _T("������")}, - {3205, 0, 0, _T("��������� (��.)")}, - {173, 0, 0, _T("���������")}, - {150, 0, 0, _T("��������")}, - {151, 0, 0, _T("�������")}, - {152, 0, 0, _T("���������� (���.)")}, - {153, 0, 0, _T("��������")}, - {154, 0, 0, _T("������������� ����������")}, - {155, 0, 0, _T("��������")}, - {156, 0, 0, _T("�����-����")}, - {157, 0, 0, _T("����")}, - {3208, 0, 0, _T("��������� (��.)")}, - {158, 0, 0, _T("�������")}, - {3209, 0, 0, _T("���������� (����)")}, - {3201, 0, 0, _T("������������� ������")}, - {159, 0, 0, _T("���������")}, - {3207, 0, 0, _T("������ ������ (����.)")}, - {3211, 0, 0, _T("������� ����� � ������ (����.)")}, - {160, 0, 0, _T("������")}, - {161, 0, 0, _T("��������")}, - {162, 0, 0, _T("����")}, - {163, 0, 0, _T("���������")}, - {164, 0, 0, _T("����-������� � ���������")}, - {165, 0, 0, _T("����-���� � �����")}, - {166, 0, 0, _T("����-�����")}, - {3210, 0, 0, _T("����-���� � ������� (��.)")}, - {167, 0, 0, _T("�������")}, - {168, 0, 0, _T("�������� � ������")}, - {169, 0, 0, _T("�������")}, - {3212, 0, 0, _T("������������ ������� (����.)")}, - {3206, 0, 0, _T("����������� ������")}, - {170, 0, 0, _T("����")}, - {171, 0, 0, _T("�������")}, - {3213, 0, 0, _T("��. �������� � ��. ���������� �-�� (����.)")}, - {172, 0, 0, _T("������")}, - {174, 0, 0, _T("�����")}, - {175, 0, 0, _T("������")}, - {176, 0, 0, _T("�����")}, - {177, 0, 0, _T("��������")}, - {3228, 0, 0, _T("���������� ���������� � ��������� ������")}, - {178, 0, 0, _T("�������-����")}, - {179, 0, 0, _T("�������")}, - {180, 0, 0, _T("�����")}, - {181, 0, 0, _T("������")}, - {182, 0, 0, _T("����")}, - {183, 0, 0, _T("������")}, - {184, 0, 0, _T("������-�����")}, - {185, 0, 0, _T("�������")}, - {186, 0, 0, _T("������")}, - {187, 0, 0, _T("������")}, - {3198, 0, 0, _T("���. ������")}, - {23, 0, 0, _T("��������")}, - {188, 0, 0, _T("����-�����")}, - {189, 0, 0, _T("�������")}, - {190, 0, 0, _T("�����")}, - {191, 0, 0, _T("������")}, - {193, 0, 0, _T("����� (����)")}, - {192, 0, 0, _T("�����")}, - {194, 0, 0, _T("���-�`�����")}, - {195, 0, 0, _T("������")}, - {196, 0, 0, _T("�������")}, - {197, 0, 0, _T("�����")}, - {198, 0, 0, _T("��������")}, - {199, 0, 0, _T("����������")}, - {200, 0, 0, _T("����������")}, - {3229, 0, 0, _T("������ (��.)")}, - {201, 0, 0, _T("������")}, - {202, 0, 0, _T("����")}, - {203, 0, 0, _T("�������")}, - {204, 0, 0, _T("��������")}, - {205, 0, 0, _T("�������")}, - {206, 0, 0, _T("�����")}, - {207, 0, 0, _T("�������")}, - {3227, 0, 0, _T("������ ���� (����.)")}, - {3197, 0, 0, _T("������� (��.)")}, - {208, 0, 0, _T("������")}, - {209, 0, 0, _T("���-���� � ��������")}, - {210, 0, 0, _T("���������")}, - {3199, 0, 0, _T("������ ����� (����.)")}, - {211, 0, 0, _T("�������")}, - {212, 0, 0, _T("�������")}, - {213, 0, 0, _T("������")}, - {214, 0, 0, _T("�����")}, - {215, 0, 0, _T("������-�����")}, - {216, 0, 0, _T("��������")}, - {217, 0, 0, _T("����")}, - {218, 0, 0, _T("�����")}, - {219, 0, 0, _T("������")}, - {220, 0, 0, _T("��������������������� ����������")}, - {222, 0, 0, _T("���")}, - {223, 0, 0, _T("�������������� ������")}, - {221, 0, 0, _T("�������")}, - {224, 0, 0, _T("�������")}, - {225, 0, 0, _T("����-����������� ���������� (���)")}, - {39, 0, 0, _T("�������")}, - {40, 0, 0, _T("�������")}, - {32, 0, 0, _T("�������")}, - {33, 0, 0, _T("�������")}, - {340, 0, 0, _T("����������")}, - {38, 0, 0, _T("�������")}, - {41, 0, 0, _T("��������")}, - {42, 0, 0, _T("������ � �����������")}, - {43, 0, 0, _T("�������")}, - {45, 0, 0, _T("��������������")}, - {44, 0, 0, _T("�������")}, - {46, 0, 0, _T("��������")}, - {3193, 0, 0, _T("������ (����.)")}, - {47, 0, 0, _T("��������� (����.)")}, - {48, 0, 0, _T("������")}, - {49, 0, 0, _T("�����")}, - {3194, 0, 0, _T("������ (����.)")}, - {50, 0, 0, _T("��������")}, - {51, 0, 0, _T("��������")}, - {34, 0, 0, _T("�������")}, - {52, 0, 0, _T("������")}, - {53, 0, 0, _T("������")}, - {54, 0, 0, _T("�����")}, - {55, 0, 0, _T("�����������")}, - {56, 0, 0, _T("����������")}, - {57, 0, 0, _T("���������")}, - {58, 0, 0, _T("������")}, - {59, 0, 0, _T("��������")}, - {36, 0, 0, _T("������")}, - {60, 0, 0, _T("����������")}, - {61, 0, 0, _T("��������")}, - {3195, 0, 0, _T("������ ��� (����.)")}, - {62, 0, 0, _T("������")}, - {35, 0, 0, _T("����������")}, - {63, 0, 0, _T("�������")}, - {64, 0, 0, _T("���-������")}, - {74, 0, 0, _T("������ � ����������")}, - {65, 0, 0, _T("��������")}, - {66, 0, 0, _T("��������")}, - {67, 0, 0, _T("��������� �-�� (�����)")}, - {68, 0, 0, _T("���������")}, - {37, 0, 0, _T("�������")}, - {69, 0, 0, _T("��������")}, - {70, 0, 0, _T("�����")}, - {71, 0, 0, _T("���������")}, - {72, 0, 0, _T("������")}, - {3196, 0, 0, _T("���������� (����.)")}, - {73, 0, 0, _T("�������")}, - {24, 25, 0, _T("������")}, - {24, 226, 0, _T("�����-���������")}, - {24, 233, 0, _T("���� (������)")}, - {24, 232, 0, _T("���������� ����")}, - {24, 235, 0, _T("����������� ����")}, - {24, 227, 0, _T("�������� ���.")}, - {24, 229, 0, _T("���������� ���.")}, - {24, 231, 0, _T("����������� ���.")}, - {24, 234, 0, _T("����������� ���.")}, - {24, 228, 0, _T("��������� ��")}, - {24, 230, 0, _T("��������� ��")}, - {24, 236, 0, _T("��������� ��")}, - {24, 237, 0, _T("������������")}, - {24, 240, 0, _T("�����-��")}, - {24, 241, 0, _T("��������")}, - {24, 248, 0, _T("���������")}, - {24, 249, 0, _T("��������")}, - {24, 251, 0, _T("�������")}, - {24, 238, 0, _T("��������� ���.")}, - {24, 242, 0, _T("������������� ���.")}, - {24, 243, 0, _T("������������ ���.")}, - {24, 244, 0, _T("���������� ���.")}, - {24, 245, 0, _T("�������� ���.")}, - {24, 246, 0, _T("��������� ���.")}, - {24, 247, 0, _T("����������� ���.")}, - {24, 250, 0, _T("����������� ���.")}, - {24, 239, 0, _T("����-��������� ��")}, - {24, 255, 0, _T("�������")}, - {24, 256, 0, _T("����")}, - {24, 252, 0, _T("������������� ���.")}, - {24, 253, 0, _T("����������� ���.")}, - {24, 254, 0, _T("��������������� ���.")}, - {24, 257, 0, _T("������������� ���.")}, - {24, 258, 0, _T("���������� ���.")}, - {24, 260, 0, _T("������������ ���.")}, - {24, 261, 0, _T("��������� ���.")}, - {24, 259, 0, _T("�������� ��")}, - {24, 265, 0, _T("�������")}, - {24, 263, 0, _T("���������� �����")}, - {24, 273, 0, _T("����")}, - {24, 275, 0, _T("�������")}, - {24, 264, 0, _T("��������� ����")}, - {24, 268, 0, _T("������������ ����")}, - {24, 266, 0, _T("��������� ���.")}, - {24, 267, 0, _T("����������� ���.")}, - {24, 269, 0, _T("������������� ���.")}, - {24, 270, 0, _T("������ ���.")}, - {24, 272, 0, _T("������� ���.")}, - {24, 276, 0, _T("��������� ���.")}, - {24, 262, 0, _T("�������� ��������� ��")}, - {24, 271, 0, _T("���������� ��")}, - {24, 274, 0, _T("����-��������� ��������� ��")}, - {24, 277, 0, _T("����������� ��")}, - {24, 278, 0, _T("���������� ���.")}, - {24, 279, 0, _T("������������ ���.")}, - {24, 280, 0, _T("��������� ���.")}, - {24, 282, 0, _T("����������� ���.")}, - {24, 281, 0, _T("�����-���������� �� - ����")}, - {24, 283, 0, _T("�����-�������� ��")}, - {24, 284, 0, _T("������������ ���.")}, - {24, 285, 0, _T("�������� ���.")}, - {24, 286, 0, _T("������������ ���.")}, - {24, 287, 0, _T("����������� ���.")}, - {24, 288, 0, _T("���������� ���.")}, - {24, 289, 0, _T("��������� ���.")}, - {24, 290, 0, _T("����������� ���.")}, - {24, 291, 0, _T("������� ���.")}, - {24, 292, 0, _T("�������� ���.")}, - {24, 293, 0, _T("���������� ���.")}, - {24, 294, 0, _T("��������� ���.")}, - {24, 295, 0, _T("��������� ���.")}, - {24, 296, 0, _T("���������� ���.")}, - {24, 297, 0, _T("���������� ���.")}, - {24, 298, 0, _T("�������� ���.")}, - {24, 299, 0, _T("�������� ���.")}, - {24, 300, 0, _T("����������� ���.")}, - {24, 301, 0, _T("������")}, - {24, 304, 0, _T("��������")}, - {24, 305, 0, _T("���������")}, - {24, 306, 0, _T("���������-��������")}, - {24, 307, 0, _T("��������")}, - {24, 308, 0, _T("���������-���������")}, - {24, 311, 0, _T("�������� ������ - ������")}, - {24, 313, 0, _T("�����")}, - {24, 309, 0, _T("������������� ����")}, - {24, 312, 0, _T("�������������� ����")}, - {24, 302, 0, _T("������������ ���.")}, - {24, 303, 0, _T("������������� ���.")}, - {24, 310, 0, _T("���������� ���.")}, - {81, 1055, 0, _T("����")}, - {81, 1058, 0, _T("������")}, - {81, 1056, 0, _T("����������")}, - {81, 1057, 0, _T("��������")}, - {81, 3153, 0, _T("����")}, + {24, 0, 0, L"������"}, + {81, 0, 0, L"�����������"}, + {82, 0, 0, L"�������"}, + {97, 0, 0, L"����������"}, + {96, 0, 0, L"���������"}, + {99, 0, 0, L"�������"}, + {100, 0, 0, L"������-����������"}, + {101, 0, 0, L"�����"}, + {102, 0, 0, L"�������"}, + {83, 0, 0, L"������"}, + {86, 0, 0, L"�������"}, + {95, 0, 0, L"�����"}, + {103, 0, 0, L"���������"}, + {79, 0, 0, L"��������"}, + {85, 0, 0, L"����"}, + {87, 0, 0, L"����"}, + {104, 0, 0, L"�����"}, + {84, 0, 0, L"���������"}, + {105, 0, 0, L"��������"}, + {106, 0, 0, L"�����"}, + {107, 0, 0, L"����"}, + {92, 0, 0, L"�������� (����������)"}, + {76, 0, 0, L"�����"}, + {3215, 0, 0, L"��������� ������� (�����.)"}, + {29, 0, 0, L"����� (����)"}, + {108, 0, 0, L"�����"}, + {88, 0, 0, L"������"}, + {109, 0, 0, L"����"}, + {110, 0, 0, L"�����"}, + {111, 0, 0, L"��������"}, + {112, 0, 0, L"��������"}, + {113, 0, 0, L"��������"}, + {114, 0, 0, L"������"}, + {115, 0, 0, L"�����"}, + {116, 0, 0, L"������������ �������� �������"}, + {117, 0, 0, L"����"}, + {3216, 0, 0, L"������ ��������� (�����.)"}, + {122, 0, 0, L"��������"}, + {89, 0, 0, L"���������"}, + {94, 0, 0, L"���������� ������"}, + {118, 0, 0, L"��������"}, + {78, 0, 0, L"�����"}, + {91, 0, 0, L"�����������"}, + {119, 0, 0, L"�������"}, + {120, 0, 0, L"�������"}, + {132, 0, 0, L"�����"}, + {90, 0, 0, L"���������"}, + {77, 0, 0, L"������"}, + {93, 0, 0, L"����������"}, + {121, 0, 0, L"���������"}, + {98, 0, 0, L"��� �����"}, + {75, 0, 0, L"������"}, + {123, 0, 0, L"���������"}, + {454, 0, 0, L"������������ �����"}, + {124, 0, 0, L"�������"}, + {453, 0, 0, L"���� (���)"}, + {126, 0, 0, L"��������"}, + {127, 0, 0, L"���������� �������"}, + {128, 0, 0, L"���������� (������������ ����� ����������)"}, + {129, 0, 0, L"�����"}, + {3220, 0, 0, L"���� (�.���.)"}, + {130, 0, 0, L"����� ��������"}, + {3218, 0, 0, L"����� ��������� (��.)"}, + {3221, 0, 0, L"������� ���� (�.���.)"}, + {3230, 0, 0, L"������� ���� � ���������� (�����.)"}, + {131, 0, 0, L"�����"}, + {133, 0, 0, L"����� - ����� ������"}, + {3222, 0, 0, L"������� (����.)"}, + {125, 0, 0, L"�����"}, + {3219, 0, 0, L"���. ���������� ������� (���)"}, + {134, 0, 0, L"���������� �������"}, + {3223, 0, 0, L"������� (�.���.)"}, + {135, 0, 0, L"�����"}, + {136, 0, 0, L"������"}, + {3224, 0, 0, L"������ � ������ ������� (��.)"}, + {137, 0, 0, L"�����"}, + {3226, 0, 0, L"����������� ���������"}, + {3225, 0, 0, L"����������� ����� ����������"}, + {138, 0, 0, L"������"}, + {139, 0, 0, L"���"}, + {3200, 0, 0, L"������� (����.)"}, + {140, 0, 0, L"������� � �������"}, + {141, 0, 0, L"���������"}, + {3202, 0, 0, L"����� (���.)"}, + {142, 0, 0, L"������"}, + {143, 0, 0, L"��������"}, + {146, 0, 0, L"�����"}, + {3203, 0, 0, L"������� (����.)"}, + {144, 0, 0, L"�������"}, + {145, 0, 0, L"��������"}, + {147, 0, 0, L"���������"}, + {3204, 0, 0, L"���������� ������� (����.)"}, + {452, 0, 0, L"���������� ������� (���)"}, + {149, 0, 0, L"�����"}, + {148, 0, 0, L"������"}, + {3205, 0, 0, L"��������� (��.)"}, + {173, 0, 0, L"���������"}, + {150, 0, 0, L"��������"}, + {151, 0, 0, L"�������"}, + {152, 0, 0, L"���������� (���.)"}, + {153, 0, 0, L"��������"}, + {154, 0, 0, L"������������� ����������"}, + {155, 0, 0, L"��������"}, + {156, 0, 0, L"�����-����"}, + {157, 0, 0, L"����"}, + {3208, 0, 0, L"��������� (��.)"}, + {158, 0, 0, L"�������"}, + {3209, 0, 0, L"���������� (����)"}, + {3201, 0, 0, L"������������� ������"}, + {159, 0, 0, L"���������"}, + {3207, 0, 0, L"������ ������ (����.)"}, + {3211, 0, 0, L"������� ����� � ������ (����.)"}, + {160, 0, 0, L"������"}, + {161, 0, 0, L"��������"}, + {162, 0, 0, L"����"}, + {163, 0, 0, L"���������"}, + {164, 0, 0, L"����-������� � ���������"}, + {165, 0, 0, L"����-���� � �����"}, + {166, 0, 0, L"����-�����"}, + {3210, 0, 0, L"����-���� � ������� (��.)"}, + {167, 0, 0, L"�������"}, + {168, 0, 0, L"�������� � ������"}, + {169, 0, 0, L"�������"}, + {3212, 0, 0, L"������������ ������� (����.)"}, + {3206, 0, 0, L"����������� ������"}, + {170, 0, 0, L"����"}, + {171, 0, 0, L"�������"}, + {3213, 0, 0, L"��. �������� � ��. ���������� �-�� (����.)"}, + {172, 0, 0, L"������"}, + {174, 0, 0, L"�����"}, + {175, 0, 0, L"������"}, + {176, 0, 0, L"�����"}, + {177, 0, 0, L"��������"}, + {3228, 0, 0, L"���������� ���������� � ��������� ������"}, + {178, 0, 0, L"�������-����"}, + {179, 0, 0, L"�������"}, + {180, 0, 0, L"�����"}, + {181, 0, 0, L"������"}, + {182, 0, 0, L"����"}, + {183, 0, 0, L"������"}, + {184, 0, 0, L"������-�����"}, + {185, 0, 0, L"�������"}, + {186, 0, 0, L"������"}, + {187, 0, 0, L"������"}, + {3198, 0, 0, L"���. ������"}, + {23, 0, 0, L"��������"}, + {188, 0, 0, L"����-�����"}, + {189, 0, 0, L"�������"}, + {190, 0, 0, L"�����"}, + {191, 0, 0, L"������"}, + {193, 0, 0, L"����� (����)"}, + {192, 0, 0, L"�����"}, + {194, 0, 0, L"���-�`�����"}, + {195, 0, 0, L"������"}, + {196, 0, 0, L"�������"}, + {197, 0, 0, L"�����"}, + {198, 0, 0, L"��������"}, + {199, 0, 0, L"����������"}, + {200, 0, 0, L"����������"}, + {3229, 0, 0, L"������ (��.)"}, + {201, 0, 0, L"������"}, + {202, 0, 0, L"����"}, + {203, 0, 0, L"�������"}, + {204, 0, 0, L"��������"}, + {205, 0, 0, L"�������"}, + {206, 0, 0, L"�����"}, + {207, 0, 0, L"�������"}, + {3227, 0, 0, L"������ ���� (����.)"}, + {3197, 0, 0, L"������� (��.)"}, + {208, 0, 0, L"������"}, + {209, 0, 0, L"���-���� � ��������"}, + {210, 0, 0, L"���������"}, + {3199, 0, 0, L"������ ����� (����.)"}, + {211, 0, 0, L"�������"}, + {212, 0, 0, L"�������"}, + {213, 0, 0, L"������"}, + {214, 0, 0, L"�����"}, + {215, 0, 0, L"������-�����"}, + {216, 0, 0, L"��������"}, + {217, 0, 0, L"����"}, + {218, 0, 0, L"�����"}, + {219, 0, 0, L"������"}, + {220, 0, 0, L"��������������������� ����������"}, + {222, 0, 0, L"���"}, + {223, 0, 0, L"�������������� ������"}, + {221, 0, 0, L"�������"}, + {224, 0, 0, L"�������"}, + {225, 0, 0, L"����-����������� ���������� (���)"}, + {39, 0, 0, L"�������"}, + {40, 0, 0, L"�������"}, + {32, 0, 0, L"�������"}, + {33, 0, 0, L"�������"}, + {340, 0, 0, L"����������"}, + {38, 0, 0, L"�������"}, + {41, 0, 0, L"��������"}, + {42, 0, 0, L"������ � �����������"}, + {43, 0, 0, L"�������"}, + {45, 0, 0, L"��������������"}, + {44, 0, 0, L"�������"}, + {46, 0, 0, L"��������"}, + {3193, 0, 0, L"������ (����.)"}, + {47, 0, 0, L"��������� (����.)"}, + {48, 0, 0, L"������"}, + {49, 0, 0, L"�����"}, + {3194, 0, 0, L"������ (����.)"}, + {50, 0, 0, L"��������"}, + {51, 0, 0, L"��������"}, + {34, 0, 0, L"�������"}, + {52, 0, 0, L"������"}, + {53, 0, 0, L"������"}, + {54, 0, 0, L"�����"}, + {55, 0, 0, L"�����������"}, + {56, 0, 0, L"����������"}, + {57, 0, 0, L"���������"}, + {58, 0, 0, L"������"}, + {59, 0, 0, L"��������"}, + {36, 0, 0, L"������"}, + {60, 0, 0, L"����������"}, + {61, 0, 0, L"��������"}, + {3195, 0, 0, L"������ ��� (����.)"}, + {62, 0, 0, L"������"}, + {35, 0, 0, L"����������"}, + {63, 0, 0, L"�������"}, + {64, 0, 0, L"���-������"}, + {74, 0, 0, L"������ � ����������"}, + {65, 0, 0, L"��������"}, + {66, 0, 0, L"��������"}, + {67, 0, 0, L"��������� �-�� (�����)"}, + {68, 0, 0, L"���������"}, + {37, 0, 0, L"�������"}, + {69, 0, 0, L"��������"}, + {70, 0, 0, L"�����"}, + {71, 0, 0, L"���������"}, + {72, 0, 0, L"������"}, + {3196, 0, 0, L"���������� (����.)"}, + {73, 0, 0, L"�������"}, + {24, 25, 0, L"������"}, + {24, 226, 0, L"�����-���������"}, + {24, 233, 0, L"���� (������)"}, + {24, 232, 0, L"���������� ����"}, + {24, 235, 0, L"����������� ����"}, + {24, 227, 0, L"�������� ���."}, + {24, 229, 0, L"���������� ���."}, + {24, 231, 0, L"����������� ���."}, + {24, 234, 0, L"����������� ���."}, + {24, 228, 0, L"��������� ��"}, + {24, 230, 0, L"��������� ��"}, + {24, 236, 0, L"��������� ��"}, + {24, 237, 0, L"������������"}, + {24, 240, 0, L"�����-��"}, + {24, 241, 0, L"��������"}, + {24, 248, 0, L"���������"}, + {24, 249, 0, L"��������"}, + {24, 251, 0, L"�������"}, + {24, 238, 0, L"��������� ���."}, + {24, 242, 0, L"������������� ���."}, + {24, 243, 0, L"������������ ���."}, + {24, 244, 0, L"���������� ���."}, + {24, 245, 0, L"�������� ���."}, + {24, 246, 0, L"��������� ���."}, + {24, 247, 0, L"����������� ���."}, + {24, 250, 0, L"����������� ���."}, + {24, 239, 0, L"����-��������� ��"}, + {24, 255, 0, L"�������"}, + {24, 256, 0, L"����"}, + {24, 252, 0, L"������������� ���."}, + {24, 253, 0, L"����������� ���."}, + {24, 254, 0, L"��������������� ���."}, + {24, 257, 0, L"������������� ���."}, + {24, 258, 0, L"���������� ���."}, + {24, 260, 0, L"������������ ���."}, + {24, 261, 0, L"��������� ���."}, + {24, 259, 0, L"�������� ��"}, + {24, 265, 0, L"�������"}, + {24, 263, 0, L"���������� �����"}, + {24, 273, 0, L"����"}, + {24, 275, 0, L"�������"}, + {24, 264, 0, L"��������� ����"}, + {24, 268, 0, L"������������ ����"}, + {24, 266, 0, L"��������� ���."}, + {24, 267, 0, L"����������� ���."}, + {24, 269, 0, L"������������� ���."}, + {24, 270, 0, L"������ ���."}, + {24, 272, 0, L"������� ���."}, + {24, 276, 0, L"��������� ���."}, + {24, 262, 0, L"�������� ��������� ��"}, + {24, 271, 0, L"���������� ��"}, + {24, 274, 0, L"����-��������� ��������� ��"}, + {24, 277, 0, L"����������� ��"}, + {24, 278, 0, L"���������� ���."}, + {24, 279, 0, L"������������ ���."}, + {24, 280, 0, L"��������� ���."}, + {24, 282, 0, L"����������� ���."}, + {24, 281, 0, L"�����-���������� �� - ����"}, + {24, 283, 0, L"�����-�������� ��"}, + {24, 284, 0, L"������������ ���."}, + {24, 285, 0, L"�������� ���."}, + {24, 286, 0, L"������������ ���."}, + {24, 287, 0, L"����������� ���."}, + {24, 288, 0, L"���������� ���."}, + {24, 289, 0, L"��������� ���."}, + {24, 290, 0, L"����������� ���."}, + {24, 291, 0, L"������� ���."}, + {24, 292, 0, L"�������� ���."}, + {24, 293, 0, L"���������� ���."}, + {24, 294, 0, L"��������� ���."}, + {24, 295, 0, L"��������� ���."}, + {24, 296, 0, L"���������� ���."}, + {24, 297, 0, L"���������� ���."}, + {24, 298, 0, L"�������� ���."}, + {24, 299, 0, L"�������� ���."}, + {24, 300, 0, L"����������� ���."}, + {24, 301, 0, L"������"}, + {24, 304, 0, L"��������"}, + {24, 305, 0, L"���������"}, + {24, 306, 0, L"���������-��������"}, + {24, 307, 0, L"��������"}, + {24, 308, 0, L"���������-���������"}, + {24, 311, 0, L"�������� ������ - ������"}, + {24, 313, 0, L"�����"}, + {24, 309, 0, L"������������� ����"}, + {24, 312, 0, L"�������������� ����"}, + {24, 302, 0, L"������������ ���."}, + {24, 303, 0, L"������������� ���."}, + {24, 310, 0, L"���������� ���."}, + {81, 1055, 0, L"����"}, + {81, 1058, 0, L"������"}, + {81, 1056, 0, L"����������"}, + {81, 1057, 0, L"��������"}, + {81, 3153, 0, L"����"}, {81, 2291, 0, lpwszOther}, - {82, 2932, 0, _T("������")}, - {82, 1060, 0, _T("�������")}, - {82, 3084, 0, _T("��������")}, - {82, 3011, 0, _T("�����")}, - {82, 3306, 0, _T("�������")}, - {82, 1059, 0, _T("������")}, - {82, 3145, 0, _T("��������")}, + {82, 2932, 0, L"������"}, + {82, 1060, 0, L"�������"}, + {82, 3084, 0, L"��������"}, + {82, 3011, 0, L"�����"}, + {82, 3306, 0, L"�������"}, + {82, 1059, 0, L"������"}, + {82, 3145, 0, L"��������"}, {82, 2292, 0, lpwszOther}, - {97, 1061, 0, _T("�����")}, + {97, 1061, 0, L"�����"}, {97, 2293, 0, lpwszOther}, - {96, 1062, 0, _T("�����")}, + {96, 1062, 0, L"�����"}, {96, 2294, 0, lpwszOther}, - {99, 1063, 0, _T("������")}, + {99, 1063, 0, L"������"}, {99, 2295, 0, lpwszOther}, - {100, 1064, 0, _T("������-����-�������")}, + {100, 1064, 0, L"������-����-�������"}, {100, 2296, 0, lpwszOther}, - {101, 1065, 0, _T("�������")}, + {101, 1065, 0, L"�������"}, {101, 2297, 0, lpwszOther}, - {102, 1066, 0, _T("�����")}, + {102, 1066, 0, L"�����"}, {102, 2298, 0, lpwszOther}, - {83, 1067, 0, _T("������")}, - {83, 3158, 0, _T("�������")}, - {83, 1068, 0, _T("����")}, - {83, 3129, 0, _T("�������")}, - {83, 1069, 0, _T("������")}, - {83, 1070, 0, _T("�������")}, + {83, 1067, 0, L"������"}, + {83, 3158, 0, L"�������"}, + {83, 1068, 0, L"����"}, + {83, 3129, 0, L"�������"}, + {83, 1069, 0, L"������"}, + {83, 1070, 0, L"�������"}, {83, 2299, 0, lpwszOther}, - {86, 3345, 0, _T("������")}, - {86, 1071, 0, _T("�����")}, - {86, 2992, 0, _T("�����")}, - {86, 3175, 0, _T("�������")}, - {86, 3363, 0, _T("���-��")}, - {86, 2884, 0, _T("����-����")}, - {86, 3243, 0, _T("����-�����")}, - {86, 1074, 0, _T("����-����")}, - {86, 3348, 0, _T("��������")}, - {86, 3241, 0, _T("������")}, - {86, 1075, 0, _T("���������")}, - {86, 3350, 0, _T("�������-�����")}, - {86, 2982, 0, _T("��������")}, - {86, 2971, 0, _T("����-����")}, - {86, 3136, 0, _T("�������")}, - {86, 1080, 0, _T("�������")}, - {86, 3303, 0, _T("������")}, - {86, 3050, 0, _T("�������")}, - {86, 3151, 0, _T("����� ���")}, - {86, 3141, 0, _T("�������")}, - {86, 3012, 0, _T("����� �� ����")}, - {86, 1081, 0, _T("������")}, - {86, 1077, 0, _T("����-����")}, - {86, 1079, 0, _T("������")}, - {86, 1078, 0, _T("�����")}, - {86, 1076, 0, _T("������")}, - {86, 2929, 0, _T("����")}, - {86, 2928, 0, _T("�����")}, + {86, 3345, 0, L"������"}, + {86, 1071, 0, L"�����"}, + {86, 2992, 0, L"�����"}, + {86, 3175, 0, L"�������"}, + {86, 3363, 0, L"���-��"}, + {86, 2884, 0, L"����-����"}, + {86, 3243, 0, L"����-�����"}, + {86, 1074, 0, L"����-����"}, + {86, 3348, 0, L"��������"}, + {86, 3241, 0, L"������"}, + {86, 1075, 0, L"���������"}, + {86, 3350, 0, L"�������-�����"}, + {86, 2982, 0, L"��������"}, + {86, 2971, 0, L"����-����"}, + {86, 3136, 0, L"�������"}, + {86, 1080, 0, L"�������"}, + {86, 3303, 0, L"������"}, + {86, 3050, 0, L"�������"}, + {86, 3151, 0, L"����� ���"}, + {86, 3141, 0, L"�������"}, + {86, 3012, 0, L"����� �� ����"}, + {86, 1081, 0, L"������"}, + {86, 1077, 0, L"����-����"}, + {86, 1079, 0, L"������"}, + {86, 1078, 0, L"�����"}, + {86, 1076, 0, L"������"}, + {86, 2929, 0, L"����"}, + {86, 2928, 0, L"�����"}, {86, 2300, 0, lpwszOther}, - {95, 3315, 0, _T("��������")}, - {95, 1082, 0, _T("����")}, - {95, 1083, 0, _T("�������")}, - {95, 3144, 0, _T("���������")}, - {95, 3025, 0, _T("������")}, - {95, 3277, 0, _T("�������")}, - {95, 1084, 0, _T("������")}, + {95, 3315, 0, L"��������"}, + {95, 1082, 0, L"����"}, + {95, 1083, 0, L"�������"}, + {95, 3144, 0, L"���������"}, + {95, 3025, 0, L"������"}, + {95, 3277, 0, L"�������"}, + {95, 1084, 0, L"������"}, {95, 2301, 0, lpwszOther}, - {103, 1085, 0, _T("��������")}, + {103, 1085, 0, L"��������"}, {103, 2302, 0, lpwszOther}, - {79, 1086, 0, _T("�����")}, + {79, 1086, 0, L"�����"}, {79, 2303, 0, lpwszOther}, - {85, 1087, 0, _T("������")}, + {85, 1087, 0, L"������"}, {85, 2304, 0, lpwszOther}, - {87, 1088, 0, _T("�������")}, + {87, 1088, 0, L"�������"}, {87, 2305, 0, lpwszOther}, - {104, 1089, 0, _T("����")}, + {104, 1089, 0, L"����"}, {104, 2306, 0, lpwszOther}, - {84, 1090, 0, _T("�����")}, - {84, 1091, 0, _T("���������")}, - {84, 1092, 0, _T("����-���")}, - {84, 3242, 0, _T("������")}, - {84, 1093, 0, _T("������")}, - {84, 1094, 0, _T("������ (������)")}, - {84, 1095, 0, _T("��������")}, - {84, 3245, 0, _T("������")}, - {84, 3083, 0, _T("���������")}, - {84, 1096, 0, _T("��������")}, - {84, 1097, 0, _T("���������")}, - {84, 1098, 0, _T("��������")}, - {84, 1099, 0, _T("��������")}, - {84, 2868, 0, _T("���������")}, - {84, 1100, 0, _T("��������")}, - {84, 1101, 0, _T("������������� (���.-���. ���.)")}, - {84, 1102, 0, _T("������")}, - {84, 1103, 0, _T("�������������")}, - {84, 1104, 0, _T("�����������")}, - {84, 3166, 0, _T("������")}, - {84, 1105, 0, _T("�����-������")}, - {84, 2927, 0, _T("�����")}, - {84, 1106, 0, _T("��������")}, - {84, 1107, 0, _T("�������")}, - {84, 1108, 0, _T("����-�����������")}, - {84, 1109, 0, _T("�������")}, - {84, 1110, 0, _T("���������")}, + {84, 1090, 0, L"�����"}, + {84, 1091, 0, L"���������"}, + {84, 1092, 0, L"����-���"}, + {84, 3242, 0, L"������"}, + {84, 1093, 0, L"������"}, + {84, 1094, 0, L"������ (������)"}, + {84, 1095, 0, L"��������"}, + {84, 3245, 0, L"������"}, + {84, 3083, 0, L"���������"}, + {84, 1096, 0, L"��������"}, + {84, 1097, 0, L"���������"}, + {84, 1098, 0, L"��������"}, + {84, 1099, 0, L"��������"}, + {84, 2868, 0, L"���������"}, + {84, 1100, 0, L"��������"}, + {84, 1101, 0, L"������������� (���.-���. ���.)"}, + {84, 1102, 0, L"������"}, + {84, 1103, 0, L"�������������"}, + {84, 1104, 0, L"�����������"}, + {84, 3166, 0, L"������"}, + {84, 1105, 0, L"�����-������"}, + {84, 2927, 0, L"�����"}, + {84, 1106, 0, L"��������"}, + {84, 1107, 0, L"�������"}, + {84, 1108, 0, L"����-�����������"}, + {84, 1109, 0, L"�������"}, + {84, 1110, 0, L"���������"}, {84, 2307, 0, lpwszOther}, - {105, 1111, 0, _T("��������")}, + {105, 1111, 0, L"��������"}, {105, 2308, 0, lpwszOther}, - {106, 1112, 0, _T("����")}, + {106, 1112, 0, L"����"}, {106, 2309, 0, lpwszOther}, - {107, 1113, 0, _T("�������")}, - {107, 1114, 0, _T("��������")}, - {107, 1115, 0, _T("�������")}, - {107, 2954, 0, _T("�����")}, + {107, 1113, 0, L"�������"}, + {107, 1114, 0, L"��������"}, + {107, 1115, 0, L"�������"}, + {107, 2954, 0, L"�����"}, {107, 2310, 0, lpwszOther}, - {92, 1116, 0, _T("������")}, - {92, 1117, 0, _T("������-����")}, - {92, 3027, 0, _T("����-�����")}, - {92, 1118, 0, _T("�������")}, - {92, 1119, 0, _T("��")}, - {92, 1120, 0, _T("�����")}, - {92, 2933, 0, _T("���������")}, + {92, 1116, 0, L"������"}, + {92, 1117, 0, L"������-����"}, + {92, 3027, 0, L"����-�����"}, + {92, 1118, 0, L"�������"}, + {92, 1119, 0, L"��"}, + {92, 1120, 0, L"�����"}, + {92, 2933, 0, L"���������"}, {92, 2311, 0, lpwszOther}, - {76, 3214, 0, _T("������ (�����)")}, - {76, 1121, 0, _T("�������")}, - {76, 2869, 0, _T("��������")}, - {76, 3262, 0, _T("������")}, - {76, 1122, 0, _T("�����")}, - {76, 1123, 0, _T("������")}, - {76, 1124, 0, _T("������")}, - {76, 3043, 0, _T("������")}, + {76, 3214, 0, L"������ (�����)"}, + {76, 1121, 0, L"�������"}, + {76, 2869, 0, L"��������"}, + {76, 3262, 0, L"������"}, + {76, 1122, 0, L"�����"}, + {76, 1123, 0, L"������"}, + {76, 1124, 0, L"������"}, + {76, 3043, 0, L"������"}, {76, 2312, 0, lpwszOther}, - {29, 1125, 0, _T("�������")}, + {29, 1125, 0, L"�������"}, {29, 2313, 0, lpwszOther}, - {108, 1126, 0, _T("����")}, - {108, 3240, 0, _T("�������")}, + {108, 1126, 0, L"����"}, + {108, 3240, 0, L"�������"}, {108, 2314, 0, lpwszOther}, - {88, 1127, 0, _T("���-������")}, + {88, 1127, 0, L"���-������"}, {88, 2315, 0, lpwszOther}, - {109, 1128, 0, _T("��������")}, + {109, 1128, 0, L"��������"}, {109, 2316, 0, lpwszOther}, - {110, 1129, 0, _T("������")}, + {110, 1129, 0, L"������"}, {110, 2317, 0, lpwszOther}, - {111, 1130, 0, _T("������-����")}, - {111, 1131, 0, _T("�����-������")}, + {111, 1130, 0, L"������-����"}, + {111, 1131, 0, L"�����-������"}, {111, 2318, 0, lpwszOther}, - {112, 1132, 0, _T("����")}, + {112, 1132, 0, L"����"}, {112, 2319, 0, lpwszOther}, - {113, 1133, 0, _T("����-�����")}, - {113, 1134, 0, _T("�������")}, + {113, 1133, 0, L"����-�����"}, + {113, 1134, 0, L"�������"}, {113, 2320, 0, lpwszOther}, - {114, 1135, 0, _T("�����")}, + {114, 1135, 0, L"�����"}, {114, 2321, 0, lpwszOther}, - {115, 1136, 0, _T("��������")}, + {115, 1136, 0, L"��������"}, {115, 2322, 0, lpwszOther}, - {116, 1137, 0, _T("���-����")}, - {116, 1138, 0, _T("�����")}, - {116, 1139, 0, _T("������")}, + {116, 1137, 0, L"���-����"}, + {116, 1138, 0, L"�����"}, + {116, 1139, 0, L"������"}, {116, 2323, 0, lpwszOther}, - {117, 1140, 0, _T("������")}, + {117, 1140, 0, L"������"}, {117, 2324, 0, lpwszOther}, - {122, 1141, 0, _T("���������")}, + {122, 1141, 0, L"���������"}, {122, 2325, 0, lpwszOther}, - {89, 1072, 0, _T("�����")}, - {89, 1073, 0, _T("�������")}, - {89, 1142, 0, _T("����")}, + {89, 1072, 0, L"�����"}, + {89, 1073, 0, L"�������"}, + {89, 1142, 0, L"����"}, {89, 2326, 0, lpwszOther}, - {94, 3250, 0, _T("������")}, - {94, 1143, 0, _T("��-����")}, + {94, 3250, 0, L"������"}, + {94, 1143, 0, L"��-����"}, {94, 2327, 0, lpwszOther}, - {78, 1144, 0, _T("������")}, + {78, 1144, 0, L"������"}, {78, 2328, 0, lpwszOther}, - {91, 1145, 0, _T("�������")}, - {91, 3307, 0, _T("���������")}, - {91, 3308, 0, _T("�������")}, + {91, 1145, 0, L"�������"}, + {91, 3307, 0, L"���������"}, + {91, 3308, 0, L"�������"}, {91, 2329, 0, lpwszOther}, - {119, 1146, 0, _T("�������")}, - {119, 1147, 0, _T("������")}, + {119, 1146, 0, L"�������"}, + {119, 1147, 0, L"������"}, {119, 2330, 0, lpwszOther}, - {120, 1148, 0, _T("������")}, + {120, 1148, 0, L"������"}, {120, 2331, 0, lpwszOther}, - {132, 1149, 0, _T("����")}, + {132, 1149, 0, L"����"}, {132, 2332, 0, lpwszOther}, - {90, 1150, 0, _T("�������")}, - {90, 3079, 0, _T("�������")}, + {90, 1150, 0, L"�������"}, + {90, 3079, 0, L"�������"}, {90, 2333, 0, lpwszOther}, - {77, 1152, 0, _T("������")}, - {77, 1153, 0, _T("�������")}, - {77, 3080, 0, _T("�����")}, - {77, 1151, 0, _T("��������")}, - {77, 1154, 0, _T("�������")}, - {77, 1155, 0, _T("�������")}, + {77, 1152, 0, L"������"}, + {77, 1153, 0, L"�������"}, + {77, 3080, 0, L"�����"}, + {77, 1151, 0, L"��������"}, + {77, 1154, 0, L"�������"}, + {77, 1155, 0, L"�������"}, {77, 2334, 0, lpwszOther}, - {93, 3362, 0, _T("�������")}, - {93, 3137, 0, _T("�������")}, - {93, 3273, 0, _T("�����")}, - {93, 1156, 0, _T("���������")}, - {93, 1157, 0, _T("������")}, - {93, 3167, 0, _T("������")}, - {93, 3347, 0, _T("�������")}, - {93, 1158, 0, _T("�����")}, - {93, 1159, 0, _T("��������")}, - {93, 1160, 0, _T("���������")}, - {93, 1161, 0, _T("�������")}, - {93, 1162, 0, _T("������")}, - {93, 1163, 0, _T("�������")}, - {93, 1164, 0, _T("������")}, + {93, 3362, 0, L"�������"}, + {93, 3137, 0, L"�������"}, + {93, 3273, 0, L"�����"}, + {93, 1156, 0, L"���������"}, + {93, 1157, 0, L"������"}, + {93, 3167, 0, L"������"}, + {93, 3347, 0, L"�������"}, + {93, 1158, 0, L"�����"}, + {93, 1159, 0, L"��������"}, + {93, 1160, 0, L"���������"}, + {93, 1161, 0, L"�������"}, + {93, 1162, 0, L"������"}, + {93, 1163, 0, L"�������"}, + {93, 1164, 0, L"������"}, {93, 2335, 0, lpwszOther}, - {121, 1165, 0, _T("������")}, - {121, 3319, 0, _T("����")}, + {121, 1165, 0, L"������"}, + {121, 3319, 0, L"����"}, {121, 2336, 0, lpwszOther}, - {98, 1166, 0, _T("�������")}, + {98, 1166, 0, L"�������"}, {98, 2337, 0, lpwszOther}, - {75, 3176, 0, _T("�������")}, - {75, 3339, 0, _T("�������")}, - {75, 1167, 0, _T("�������")}, - {75, 1168, 0, _T("�����")}, + {75, 3176, 0, L"�������"}, + {75, 3339, 0, L"�������"}, + {75, 1167, 0, L"�������"}, + {75, 1168, 0, L"�����"}, {75, 2338, 0, lpwszOther}, - {123, 1914, 0, _T("��������")}, - {123, 2957, 0, _T("���� ���")}, - {123, 1915, 0, _T("�������")}, - {123, 3331, 0, _T("�������")}, - {123, 1916, 0, _T("��������")}, - {123, 3001, 0, _T("�������")}, - {123, 1917, 0, _T("��������")}, - {123, 3217, 0, _T("�������")}, - {123, 3064, 0, _T("����")}, - {123, 3020, 0, _T("����� �����")}, - {123, 1918, 0, _T("������")}, - {123, 3238, 0, _T("�������")}, + {123, 1914, 0, L"��������"}, + {123, 2957, 0, L"���� ���"}, + {123, 1915, 0, L"�������"}, + {123, 3331, 0, L"�������"}, + {123, 1916, 0, L"��������"}, + {123, 3001, 0, L"�������"}, + {123, 1917, 0, L"��������"}, + {123, 3217, 0, L"�������"}, + {123, 3064, 0, L"����"}, + {123, 3020, 0, L"����� �����"}, + {123, 1918, 0, L"������"}, + {123, 3238, 0, L"�������"}, {123, 2339, 0, lpwszOther}, - {454, 1192, 0, _T("����-����")}, + {454, 1192, 0, L"����-����"}, {454, 2366, 0, lpwszOther}, - {124, 1919, 0, _T("����-����")}, + {124, 1919, 0, L"����-����"}, {124, 2340, 0, lpwszOther}, - {453, 1193, 0, _T("������")}, + {453, 1193, 0, L"������"}, {453, 2368, 0, lpwszOther}, - {126, 1921, 0, _T("�������")}, + {126, 1921, 0, L"�������"}, {126, 2342, 0, lpwszOther}, - {127, 1922, 0, _T("�������")}, + {127, 1922, 0, L"�������"}, {127, 2343, 0, lpwszOther}, - {128, 1923, 0, _T("�������")}, + {128, 1923, 0, L"�������"}, {128, 2344, 0, lpwszOther}, - {129, 1924, 0, _T("����")}, + {129, 1924, 0, L"����"}, {129, 2345, 0, lpwszOther}, - {130, 1925, 0, _T("����������")}, - {130, 1926, 0, _T("���������")}, - {130, 1928, 0, _T("�������")}, - {130, 1929, 0, _T("����������")}, - {130, 3235, 0, _T("��������")}, - {130, 1927, 0, _T("������")}, - {130, 3323, 0, _T("��������")}, + {130, 1925, 0, L"����������"}, + {130, 1926, 0, L"���������"}, + {130, 1928, 0, L"�������"}, + {130, 1929, 0, L"����������"}, + {130, 3235, 0, L"��������"}, + {130, 1927, 0, L"������"}, + {130, 3323, 0, L"��������"}, {130, 2346, 0, lpwszOther}, - {131, 1930, 0, _T("�����")}, + {131, 1930, 0, L"�����"}, {131, 2347, 0, lpwszOther}, - {133, 1931, 0, _T("����-������")}, + {133, 1931, 0, L"����-������"}, {133, 2348, 0, lpwszOther}, - {125, 1920, 0, _T("����")}, + {125, 1920, 0, L"����"}, {125, 2341, 0, lpwszOther}, - {134, 1932, 0, _T("�������")}, + {134, 1932, 0, L"�������"}, {134, 2349, 0, lpwszOther}, - {135, 1933, 0, _T("���������")}, + {135, 1933, 0, L"���������"}, {135, 2350, 0, lpwszOther}, - {136, 1934, 0, _T("��������")}, + {136, 1934, 0, L"��������"}, {136, 2351, 0, lpwszOther}, - {137, 1935, 0, _T("����")}, + {137, 1935, 0, L"����"}, {137, 2352, 0, lpwszOther}, - {138, 3055, 0, _T("����������")}, - {138, 3049, 0, _T("��������")}, - {138, 3330, 0, _T("�������")}, - {138, 1169, 0, _T("��������")}, - {138, 3106, 0, _T("��������")}, - {138, 1170, 0, _T("��������")}, - {138, 1171, 0, _T("��������")}, - {138, 1172, 0, _T("���������")}, - {138, 3365, 0, _T("������")}, - {138, 1173, 0, _T("�������")}, - {138, 3104, 0, _T("�������")}, - {138, 3366, 0, _T("����������")}, - {138, 1174, 0, _T("������")}, - {138, 2964, 0, _T("��������")}, - {138, 3113, 0, _T("���������")}, - {138, 1175, 0, _T("��������")}, - {138, 2920, 0, _T("�������-����")}, - {138, 2889, 0, _T("����-����")}, - {138, 1176, 0, _T("������")}, - {138, 2903, 0, _T("���� �������")}, - {138, 1177, 0, _T("�������")}, - {138, 1178, 0, _T("�������")}, - {138, 2946, 0, _T("��������")}, - {138, 1179, 0, _T("�������")}, - {138, 1180, 0, _T("��������")}, + {138, 3055, 0, L"����������"}, + {138, 3049, 0, L"��������"}, + {138, 3330, 0, L"�������"}, + {138, 1169, 0, L"��������"}, + {138, 3106, 0, L"��������"}, + {138, 1170, 0, L"��������"}, + {138, 1171, 0, L"��������"}, + {138, 1172, 0, L"���������"}, + {138, 3365, 0, L"������"}, + {138, 1173, 0, L"�������"}, + {138, 3104, 0, L"�������"}, + {138, 3366, 0, L"����������"}, + {138, 1174, 0, L"������"}, + {138, 2964, 0, L"��������"}, + {138, 3113, 0, L"���������"}, + {138, 1175, 0, L"��������"}, + {138, 2920, 0, L"�������-����"}, + {138, 2889, 0, L"����-����"}, + {138, 1176, 0, L"������"}, + {138, 2903, 0, L"���� �������"}, + {138, 1177, 0, L"�������"}, + {138, 1178, 0, L"�������"}, + {138, 2946, 0, L"��������"}, + {138, 1179, 0, L"�������"}, + {138, 1180, 0, L"��������"}, {138, 2353, 0, lpwszOther}, - {139, 407, 0, _T("���������")}, - {139, 426, 0, _T("������")}, - {139, 378, 0, _T("�����")}, - {139, 412, 0, _T("�������")}, - {139, 446, 0, _T("������")}, - {139, 434, 0, _T("�������")}, - {139, 416, 0, _T("��������")}, - {139, 428, 0, _T("��������")}, - {139, 440, 0, _T("���������")}, - {139, 352, 0, _T("�������")}, - {139, 394, 0, _T("��������")}, - {139, 374, 0, _T("���������")}, - {139, 448, 0, _T("������")}, - {139, 390, 0, _T("�������")}, - {139, 402, 0, _T("��������")}, - {139, 396, 0, _T("�������� ��������")}, - {139, 370, 0, _T("��������")}, - {139, 368, 0, _T("�������")}, - {139, 444, 0, _T("����������")}, - {139, 388, 0, _T("������")}, - {139, 408, 0, _T("��������")}, - {139, 430, 0, _T("��������")}, - {139, 358, 0, _T("�����������")}, - {139, 418, 0, _T("��������")}, - {139, 354, 0, _T("�����������")}, - {139, 376, 0, _T("���������")}, - {139, 414, 0, _T("���������")}, - {139, 380, 0, _T("�������")}, - {139, 372, 0, _T("�������")}, - {139, 424, 0, _T("�������")}, - {139, 348, 0, _T("���")}, - {139, 392, 0, _T("��������")}, - {139, 386, 0, _T("��������")}, - {139, 438, 0, _T("������")}, - {139, 362, 0, _T("���-������")}, - {139, 360, 0, _T("���-����")}, - {139, 432, 0, _T("���-�������")}, - {139, 350, 0, _T("���-�������")}, - {139, 366, 0, _T("�����")}, - {139, 420, 0, _T("��������")}, - {139, 442, 0, _T("������")}, - {139, 364, 0, _T("������������")}, - {139, 450, 0, _T("������-����")}, - {139, 356, 0, _T("���-������")}, - {139, 382, 0, _T("�������� ������")}, - {139, 398, 0, _T("�������� ��������")}, - {139, 410, 0, _T("��������")}, - {139, 422, 0, _T("�����")}, - {139, 406, 0, _T("����������� ����� ��������")}, - {139, 404, 0, _T("�������")}, - {139, 384, 0, _T("����� ������")}, - {139, 400, 0, _T("����� ��������")}, - {139, 436, 0, _T("���")}, - {140, 1238, 0, _T("����-�����")}, + {139, 407, 0, L"���������"}, + {139, 426, 0, L"������"}, + {139, 378, 0, L"�����"}, + {139, 412, 0, L"�������"}, + {139, 446, 0, L"������"}, + {139, 434, 0, L"�������"}, + {139, 416, 0, L"��������"}, + {139, 428, 0, L"��������"}, + {139, 440, 0, L"���������"}, + {139, 352, 0, L"�������"}, + {139, 394, 0, L"��������"}, + {139, 374, 0, L"���������"}, + {139, 448, 0, L"������"}, + {139, 390, 0, L"�������"}, + {139, 402, 0, L"��������"}, + {139, 396, 0, L"�������� ��������"}, + {139, 370, 0, L"��������"}, + {139, 368, 0, L"�������"}, + {139, 444, 0, L"����������"}, + {139, 388, 0, L"������"}, + {139, 408, 0, L"��������"}, + {139, 430, 0, L"��������"}, + {139, 358, 0, L"�����������"}, + {139, 418, 0, L"��������"}, + {139, 354, 0, L"�����������"}, + {139, 376, 0, L"���������"}, + {139, 414, 0, L"���������"}, + {139, 380, 0, L"�������"}, + {139, 372, 0, L"�������"}, + {139, 424, 0, L"�������"}, + {139, 348, 0, L"���"}, + {139, 392, 0, L"��������"}, + {139, 386, 0, L"��������"}, + {139, 438, 0, L"������"}, + {139, 362, 0, L"���-������"}, + {139, 360, 0, L"���-����"}, + {139, 432, 0, L"���-�������"}, + {139, 350, 0, L"���-�������"}, + {139, 366, 0, L"�����"}, + {139, 420, 0, L"��������"}, + {139, 442, 0, L"������"}, + {139, 364, 0, L"������������"}, + {139, 450, 0, L"������-����"}, + {139, 356, 0, L"���-������"}, + {139, 382, 0, L"�������� ������"}, + {139, 398, 0, L"�������� ��������"}, + {139, 410, 0, L"��������"}, + {139, 422, 0, L"�����"}, + {139, 406, 0, L"����������� ����� ��������"}, + {139, 404, 0, L"�������"}, + {139, 384, 0, L"����� ������"}, + {139, 400, 0, L"����� ��������"}, + {139, 436, 0, L"���"}, + {140, 1238, 0, L"����-�����"}, {140, 2442, 0, lpwszOther}, - {141, 1239, 0, _T("������-�����")}, + {141, 1239, 0, L"������-�����"}, {141, 2441, 0, lpwszOther}, - {142, 1240, 0, _T("������")}, + {142, 1240, 0, L"������"}, {142, 2440, 0, lpwszOther}, - {143, 1241, 0, _T("���������")}, + {143, 1241, 0, L"���������"}, {143, 2439, 0, lpwszOther}, - {146, 1242, 0, _T("���������")}, + {146, 1242, 0, L"���������"}, {146, 2438, 0, lpwszOther}, - {144, 1243, 0, _T("��-���")}, + {144, 1243, 0, L"��-���"}, {144, 2437, 0, lpwszOther}, - {145, 1244, 0, _T("��������")}, - {145, 3094, 0, _T("����� �����")}, - {145, 1245, 0, _T("���-��-�������")}, - {145, 1246, 0, _T("���-�����")}, + {145, 1244, 0, L"��������"}, + {145, 3094, 0, L"����� �����"}, + {145, 1245, 0, L"���-��-�������"}, + {145, 1246, 0, L"���-�����"}, {145, 2436, 0, lpwszOther}, - {147, 1247, 0, _T("�������")}, + {147, 1247, 0, L"�������"}, {147, 2435, 0, lpwszOther}, - {452, 1190, 0, _T("��������-������")}, + {452, 1190, 0, L"��������-������"}, {452, 2364, 0, lpwszOther}, - {149, 1248, 0, _T("����-�-�����")}, + {149, 1248, 0, L"����-�-�����"}, {149, 2434, 0, lpwszOther}, - {148, 1249, 0, _T("���������")}, + {148, 1249, 0, L"���������"}, {148, 2433, 0, lpwszOther}, - {173, 1250, 0, _T("���������")}, + {173, 1250, 0, L"���������"}, {173, 2432, 0, lpwszOther}, - {150, 1251, 0, _T("������������")}, + {150, 1251, 0, L"������������"}, {150, 2431, 0, lpwszOther}, - {151, 1252, 0, _T("����-��������")}, + {151, 1252, 0, L"����-��������"}, {151, 2430, 0, lpwszOther}, - {152, 1253, 0, _T("������")}, + {152, 1253, 0, L"������"}, {152, 2429, 0, lpwszOther}, - {153, 1254, 0, _T("����")}, + {153, 1254, 0, L"����"}, {153, 2428, 0, lpwszOther}, - {154, 1255, 0, _T("�����-�������")}, + {154, 1255, 0, L"�����-�������"}, {154, 2427, 0, lpwszOther}, - {155, 1256, 0, _T("������")}, + {155, 1256, 0, L"������"}, {155, 2426, 0, lpwszOther}, - {156, 1257, 0, _T("���-����")}, + {156, 1257, 0, L"���-����"}, {156, 2425, 0, lpwszOther}, - {157, 1258, 0, _T("������")}, + {157, 1258, 0, L"������"}, {157, 2424, 0, lpwszOther}, - {158, 1259, 0, _T("���������")}, - {158, 1260, 0, _T("������")}, + {158, 1259, 0, L"���������"}, + {158, 1260, 0, L"������"}, {158, 2423, 0, lpwszOther}, - {159, 1261, 0, _T("�������")}, + {159, 1261, 0, L"�������"}, {159, 2422, 0, lpwszOther}, - {160, 1262, 0, _T("������")}, + {160, 1262, 0, L"������"}, {160, 2421, 0, lpwszOther}, - {161, 1263, 0, _T("��������")}, + {161, 1263, 0, L"��������"}, {161, 2420, 0, lpwszOther}, - {162, 1264, 0, _T("����")}, + {162, 1264, 0, L"����"}, {162, 2419, 0, lpwszOther}, - {163, 1265, 0, _T("���-���������")}, + {163, 1265, 0, L"���-���������"}, {163, 2418, 0, lpwszOther}, - {164, 1266, 0, _T("���������")}, + {164, 1266, 0, L"���������"}, {164, 2417, 0, lpwszOther}, - {165, 1267, 0, _T("������")}, + {165, 1267, 0, L"������"}, {165, 2416, 0, lpwszOther}, - {166, 1268, 0, _T("������")}, + {166, 1268, 0, L"������"}, {166, 2415, 0, lpwszOther}, - {167, 1269, 0, _T("����������")}, + {167, 1269, 0, L"����������"}, {167, 2414, 0, lpwszOther}, - {168, 1270, 0, _T("����-��-�����")}, + {168, 1270, 0, L"����-��-�����"}, {168, 2413, 0, lpwszOther}, - {169, 1271, 0, _T("����������")}, + {169, 1271, 0, L"����������"}, {169, 2412, 0, lpwszOther}, - {170, 1272, 0, _T("��������")}, + {170, 1272, 0, L"��������"}, {170, 2411, 0, lpwszOther}, - {171, 1273, 0, _T("��������")}, - {171, 1274, 0, _T("����")}, + {171, 1273, 0, L"��������"}, + {171, 1274, 0, L"����"}, {171, 2410, 0, lpwszOther}, - {172, 1275, 0, _T("��������")}, + {172, 1275, 0, L"��������"}, {172, 2409, 0, lpwszOther}, - {174, 1854, 0, _T("�����")}, + {174, 1854, 0, L"�����"}, {174, 2495, 0, lpwszOther}, - {175, 1855, 0, _T("������")}, + {175, 1855, 0, L"������"}, {175, 2494, 0, lpwszOther}, - {176, 1856, 0, _T("������")}, - {176, 1857, 0, _T("�����-����")}, + {176, 1856, 0, L"������"}, + {176, 1857, 0, L"�����-����"}, {176, 2493, 0, lpwszOther}, - {177, 1858, 0, _T("��������")}, + {177, 1858, 0, L"��������"}, {177, 2492, 0, lpwszOther}, - {178, 1859, 0, _T("��������")}, + {178, 1859, 0, L"��������"}, {178, 2491, 0, lpwszOther}, - {179, 1860, 0, _T("���������")}, + {179, 1860, 0, L"���������"}, {179, 2490, 0, lpwszOther}, - {180, 1861, 0, _T("���������")}, + {180, 1861, 0, L"���������"}, {180, 2489, 0, lpwszOther}, - {181, 1862, 0, _T("������")}, + {181, 1862, 0, L"������"}, {181, 2488, 0, lpwszOther}, - {182, 1863, 0, _T("�����")}, + {182, 1863, 0, L"�����"}, {182, 2487, 0, lpwszOther}, - {183, 1864, 0, _T("�������")}, + {183, 1864, 0, L"�������"}, {183, 2486, 0, lpwszOther}, - {184, 1865, 0, _T("�����")}, + {184, 1865, 0, L"�����"}, {184, 2485, 0, lpwszOther}, - {185, 1866, 0, _T("�������")}, + {185, 1866, 0, L"�������"}, {185, 2484, 0, lpwszOther}, - {186, 3312, 0, _T("�����")}, - {186, 1867, 0, _T("����")}, - {186, 1868, 0, _T("�������")}, + {186, 3312, 0, L"�����"}, + {186, 1867, 0, L"����"}, + {186, 1868, 0, L"�������"}, {186, 2483, 0, lpwszOther}, - {187, 1869, 0, _T("������")}, + {187, 1869, 0, L"������"}, {187, 2482, 0, lpwszOther}, - {23, 1870, 0, _T("������")}, + {23, 1870, 0, L"������"}, {23, 2481, 0, lpwszOther}, - {188, 1871, 0, _T("����")}, + {188, 1871, 0, L"����"}, {188, 2480, 0, lpwszOther}, - {189, 1872, 0, _T("�����")}, + {189, 1872, 0, L"�����"}, {189, 2479, 0, lpwszOther}, - {190, 1873, 0, _T("�������")}, + {190, 1873, 0, L"�������"}, {190, 2478, 0, lpwszOther}, - {191, 1874, 0, _T("������")}, + {191, 1874, 0, L"������"}, {191, 2477, 0, lpwszOther}, - {193, 1875, 0, _T("�������")}, + {193, 1875, 0, L"�������"}, {193, 2476, 0, lpwszOther}, - {192, 1876, 0, _T("����������")}, + {192, 1876, 0, L"����������"}, {192, 2475, 0, lpwszOther}, - {194, 1877, 0, _T("��������")}, + {194, 1877, 0, L"��������"}, {194, 2474, 0, lpwszOther}, - {195, 1878, 0, _T("������")}, + {195, 1878, 0, L"������"}, {195, 2473, 0, lpwszOther}, - {196, 1879, 0, _T("��������")}, + {196, 1879, 0, L"��������"}, {196, 2472, 0, lpwszOther}, - {197, 1880, 0, _T("�������")}, + {197, 1880, 0, L"�������"}, {197, 2471, 0, lpwszOther}, - {198, 1881, 0, _T("����-���")}, + {198, 1881, 0, L"����-���"}, {198, 2470, 0, lpwszOther}, - {199, 1882, 0, _T("�������")}, + {199, 1882, 0, L"�������"}, {199, 2469, 0, lpwszOther}, - {200, 1883, 0, _T("������������")}, + {200, 1883, 0, L"������������"}, {200, 2468, 0, lpwszOther}, - {201, 1884, 0, _T("��������")}, + {201, 1884, 0, L"��������"}, {201, 2467, 0, lpwszOther}, - {202, 1885, 0, _T("������")}, + {202, 1885, 0, L"������"}, {202, 2466, 0, lpwszOther}, - {203, 1886, 0, _T("������")}, - {203, 1887, 0, _T("�����")}, + {203, 1886, 0, L"������"}, + {203, 1887, 0, L"�����"}, {203, 2465, 0, lpwszOther}, - {204, 1888, 0, _T("������")}, + {204, 1888, 0, L"������"}, {204, 2464, 0, lpwszOther}, - {205, 1889, 0, _T("�������")}, + {205, 1889, 0, L"�������"}, {205, 2463, 0, lpwszOther}, - {206, 1890, 0, _T("������")}, + {206, 1890, 0, L"������"}, {206, 2462, 0, lpwszOther}, - {207, 1891, 0, _T("������")}, + {207, 1891, 0, L"������"}, {207, 2461, 0, lpwszOther}, - {208, 1892, 0, _T("������")}, + {208, 1892, 0, L"������"}, {208, 2460, 0, lpwszOther}, - {209, 1893, 0, _T("���-����")}, + {209, 1893, 0, L"���-����"}, {209, 2459, 0, lpwszOther}, - {210, 1894, 0, _T("�������")}, + {210, 1894, 0, L"�������"}, {210, 2458, 0, lpwszOther}, - {211, 1895, 0, _T("��������")}, + {211, 1895, 0, L"��������"}, {211, 2457, 0, lpwszOther}, - {212, 1896, 0, _T("�����")}, + {212, 1896, 0, L"�����"}, {212, 2456, 0, lpwszOther}, - {213, 1897, 0, _T("��������")}, + {213, 1897, 0, L"��������"}, {213, 2455, 0, lpwszOther}, - {214, 1898, 0, _T("������")}, + {214, 1898, 0, L"������"}, {214, 2454, 0, lpwszOther}, - {215, 1899, 0, _T("�������")}, + {215, 1899, 0, L"�������"}, {215, 2453, 0, lpwszOther}, - {216, 1900, 0, _T("���-��-�����")}, - {216, 1901, 0, _T("������")}, + {216, 1900, 0, L"���-��-�����"}, + {216, 1901, 0, L"������"}, {216, 2452, 0, lpwszOther}, - {217, 1902, 0, _T("����")}, + {217, 1902, 0, L"����"}, {217, 2451, 0, lpwszOther}, - {218, 1903, 0, _T("�����")}, + {218, 1903, 0, L"�����"}, {218, 2450, 0, lpwszOther}, - {219, 1904, 0, _T("�������")}, + {219, 1904, 0, L"�������"}, {219, 2449, 0, lpwszOther}, - {220, 1905, 0, _T("�����")}, + {220, 1905, 0, L"�����"}, {220, 2448, 0, lpwszOther}, - {222, 1906, 0, _T("��������")}, + {222, 1906, 0, L"��������"}, {222, 2447, 0, lpwszOther}, - {223, 1907, 0, _T("������")}, + {223, 1907, 0, L"������"}, {223, 2446, 0, lpwszOther}, - {221, 1908, 0, _T("������")}, + {221, 1908, 0, L"������"}, {221, 2445, 0, lpwszOther}, - {224, 1909, 0, _T("�����-�����")}, + {224, 1909, 0, L"�����-�����"}, {224, 2444, 0, lpwszOther}, - {225, 1910, 0, _T("������")}, - {225, 1913, 0, _T("������������")}, - {225, 1912, 0, _T("��������")}, - {225, 3033, 0, _T("��������")}, - {225, 1911, 0, _T("��������")}, + {225, 1910, 0, L"������"}, + {225, 1913, 0, L"������������"}, + {225, 1912, 0, L"��������"}, + {225, 3033, 0, L"��������"}, + {225, 1911, 0, L"��������"}, {225, 2443, 0, lpwszOther}, - {39, 314, 0, _T("����")}, - {39, 315, 0, _T("��������� ���.")}, - {39, 316, 0, _T("��������� ���.")}, - {39, 317, 0, _T("���������������� ���.")}, - {39, 318, 0, _T("�������� ���.")}, - {39, 319, 0, _T("����������� ���.")}, - {39, 320, 0, _T("������������ ���.")}, - {39, 321, 0, _T("����������� ���.")}, - {39, 322, 0, _T("�����-����������� ���.")}, - {39, 323, 0, _T("�������� ���.")}, - {39, 324, 0, _T("�������������� ���.")}, - {39, 325, 0, _T("����")}, - {39, 326, 0, _T("��������� ���.")}, - {39, 327, 0, _T("��������� ���.")}, - {39, 328, 0, _T("������������ ���.")}, - {39, 329, 0, _T("�������� ���.")}, - {39, 330, 0, _T("���������� ���.")}, - {39, 331, 0, _T("��������� ���.")}, - {39, 332, 0, _T("������� ���.")}, - {39, 333, 0, _T("������������� ���.")}, - {39, 334, 0, _T("����������� ���.")}, - {39, 335, 0, _T("���������� ���.")}, - {39, 336, 0, _T("����������� ���.")}, - {39, 337, 0, _T("���������� ���.")}, - {39, 338, 0, _T("������������ ���.")}, - {39, 339, 0, _T("����������� ���.")}, - {40, 602, 0, _T("��� ����")}, - {40, 604, 0, _T("�������")}, - {40, 603, 0, _T("����")}, - {40, 608, 0, _T("����")}, - {40, 606, 0, _T("���������")}, - {40, 3099, 0, _T("����-��-���")}, - {40, 605, 0, _T("�������")}, - {40, 3174, 0, _T("��������")}, - {40, 609, 0, _T("����������")}, - {40, 607, 0, _T("����")}, - {40, 610, 0, _T("�����")}, - {40, 611, 0, _T("���������")}, + {39, 314, 0, L"����"}, + {39, 315, 0, L"��������� ���."}, + {39, 316, 0, L"��������� ���."}, + {39, 317, 0, L"���������������� ���."}, + {39, 318, 0, L"�������� ���."}, + {39, 319, 0, L"����������� ���."}, + {39, 320, 0, L"������������ ���."}, + {39, 321, 0, L"����������� ���."}, + {39, 322, 0, L"�����-����������� ���."}, + {39, 323, 0, L"�������� ���."}, + {39, 324, 0, L"�������������� ���."}, + {39, 325, 0, L"����"}, + {39, 326, 0, L"��������� ���."}, + {39, 327, 0, L"��������� ���."}, + {39, 328, 0, L"������������ ���."}, + {39, 329, 0, L"�������� ���."}, + {39, 330, 0, L"���������� ���."}, + {39, 331, 0, L"��������� ���."}, + {39, 332, 0, L"������� ���."}, + {39, 333, 0, L"������������� ���."}, + {39, 334, 0, L"����������� ���."}, + {39, 335, 0, L"���������� ���."}, + {39, 336, 0, L"����������� ���."}, + {39, 337, 0, L"���������� ���."}, + {39, 338, 0, L"������������ ���."}, + {39, 339, 0, L"����������� ���."}, + {40, 602, 0, L"��� ����"}, + {40, 604, 0, L"�������"}, + {40, 603, 0, L"����"}, + {40, 608, 0, L"����"}, + {40, 606, 0, L"���������"}, + {40, 3099, 0, L"����-��-���"}, + {40, 605, 0, L"�������"}, + {40, 3174, 0, L"��������"}, + {40, 609, 0, L"����������"}, + {40, 607, 0, L"����"}, + {40, 610, 0, L"�����"}, + {40, 611, 0, L"���������"}, {40, 2541, 0, lpwszOther}, - {32, 612, 0, _T("������")}, + {32, 612, 0, L"������"}, {32, 2540, 0, lpwszOther}, - {33, 613, 0, _T("�������-��-�����")}, + {33, 613, 0, L"�������-��-�����"}, {33, 2539, 0, lpwszOther}, - {340, 341, 0, _T("�����")}, - {340, 342, 0, _T("��������� ���.")}, - {340, 343, 0, _T("��������� ���.")}, - {340, 344, 0, _T("���������� ���.")}, - {340, 345, 0, _T("����������� ���.")}, - {340, 346, 0, _T("������� ���.")}, - {340, 347, 0, _T("����������� ���.")}, - {38, 760, 0, _T("���������")}, - {38, 767, 0, _T("�����")}, - {38, 762, 0, _T("������")}, - {38, 761, 0, _T("��������")}, - {38, 763, 0, _T("����")}, - {38, 769, 0, _T("�����")}, - {38, 765, 0, _T("����")}, - {38, 764, 0, _T("����")}, - {38, 3117, 0, _T("��������")}, - {38, 766, 0, _T("�����")}, - {38, 768, 0, _T("�������")}, + {340, 341, 0, L"�����"}, + {340, 342, 0, L"��������� ���."}, + {340, 343, 0, L"��������� ���."}, + {340, 344, 0, L"���������� ���."}, + {340, 345, 0, L"����������� ���."}, + {340, 346, 0, L"������� ���."}, + {340, 347, 0, L"����������� ���."}, + {38, 760, 0, L"���������"}, + {38, 767, 0, L"�����"}, + {38, 762, 0, L"������"}, + {38, 761, 0, L"��������"}, + {38, 763, 0, L"����"}, + {38, 769, 0, L"�����"}, + {38, 765, 0, L"����"}, + {38, 764, 0, L"����"}, + {38, 3117, 0, L"��������"}, + {38, 766, 0, L"�����"}, + {38, 768, 0, L"�������"}, {38, 2532, 0, lpwszOther}, - {41, 3098, 0, _T("������")}, - {41, 792, 0, _T("�����������")}, - {41, 770, 0, _T("������")}, - {41, 771, 0, _T("����")}, - {41, 773, 0, _T("�����")}, - {41, 776, 0, _T("������-�������")}, - {41, 788, 0, _T("�����")}, - {41, 789, 0, _T("�����")}, - {41, 796, 0, _T("�������")}, - {41, 777, 0, _T("������������")}, - {41, 781, 0, _T("�������")}, - {41, 786, 0, _T("��������")}, - {41, 791, 0, _T("���������")}, - {41, 793, 0, _T("���������")}, - {41, 795, 0, _T("�����")}, - {41, 787, 0, _T("������������")}, - {41, 790, 0, _T("������")}, - {41, 3133, 0, _T("������")}, - {41, 794, 0, _T("������")}, - {41, 782, 0, _T("�������")}, - {41, 780, 0, _T("�������")}, - {41, 779, 0, _T("����")}, - {41, 774, 0, _T("��������")}, - {41, 784, 0, _T("������")}, - {41, 772, 0, _T("�����")}, - {41, 775, 0, _T("��������")}, - {41, 3116, 0, _T("�������")}, - {41, 785, 0, _T("�������")}, - {41, 778, 0, _T("�����")}, - {41, 783, 0, _T("�����")}, + {41, 3098, 0, L"������"}, + {41, 792, 0, L"�����������"}, + {41, 770, 0, L"������"}, + {41, 771, 0, L"����"}, + {41, 773, 0, L"�����"}, + {41, 776, 0, L"������-�������"}, + {41, 788, 0, L"�����"}, + {41, 789, 0, L"�����"}, + {41, 796, 0, L"�������"}, + {41, 777, 0, L"������������"}, + {41, 781, 0, L"�������"}, + {41, 786, 0, L"��������"}, + {41, 791, 0, L"���������"}, + {41, 793, 0, L"���������"}, + {41, 795, 0, L"�����"}, + {41, 787, 0, L"������������"}, + {41, 790, 0, L"������"}, + {41, 3133, 0, L"������"}, + {41, 794, 0, L"������"}, + {41, 782, 0, L"�������"}, + {41, 780, 0, L"�������"}, + {41, 779, 0, L"����"}, + {41, 774, 0, L"��������"}, + {41, 784, 0, L"������"}, + {41, 772, 0, L"�����"}, + {41, 775, 0, L"��������"}, + {41, 3116, 0, L"�������"}, + {41, 785, 0, L"�������"}, + {41, 778, 0, L"�����"}, + {41, 783, 0, L"�����"}, {41, 2531, 0, lpwszOther}, - {42, 797, 0, _T("����-����")}, - {42, 799, 0, _T("������")}, - {42, 798, 0, _T("�������")}, - {42, 800, 0, _T("�����")}, + {42, 797, 0, L"����-����"}, + {42, 799, 0, L"������"}, + {42, 798, 0, L"�������"}, + {42, 800, 0, L"�����"}, {42, 2530, 0, lpwszOther}, - {45, 802, 0, _T("�������")}, - {45, 3075, 0, _T("��������")}, - {45, 801, 0, _T("������")}, - {45, 804, 0, _T("��������")}, - {45, 803, 0, _T("���������")}, - {45, 805, 0, _T("��������")}, - {45, 3168, 0, _T("������")}, - {45, 806, 0, _T("�������")}, - {45, 807, 0, _T("��������")}, - {45, 808, 0, _T("��������")}, - {45, 809, 0, _T("����������")}, - {45, 3131, 0, _T("����������")}, - {45, 810, 0, _T("��������")}, - {45, 3342, 0, _T("�������")}, - {45, 811, 0, _T("������")}, - {45, 812, 0, _T("�����")}, - {45, 813, 0, _T("�����")}, - {45, 814, 0, _T("������")}, - {45, 3089, 0, _T("������")}, - {45, 815, 0, _T("��������")}, - {45, 816, 0, _T("����������")}, - {45, 817, 0, _T("���������")}, - {45, 818, 0, _T("����")}, - {45, 819, 0, _T("������")}, - {45, 820, 0, _T("���������")}, - {45, 2976, 0, _T("������")}, - {45, 2988, 0, _T("���������")}, - {45, 821, 0, _T("���������")}, - {45, 3088, 0, _T("�������")}, - {45, 822, 0, _T("�������")}, - {45, 823, 0, _T("������")}, - {45, 824, 0, _T("��������")}, - {45, 825, 0, _T("�������")}, - {45, 3343, 0, _T("����")}, - {45, 2867, 0, _T("������")}, - {45, 2986, 0, _T("����-������")}, - {45, 826, 0, _T("��������")}, - {45, 3063, 0, _T("��������")}, - {45, 827, 0, _T("������")}, - {45, 3140, 0, _T("���������")}, - {45, 828, 0, _T("������")}, - {45, 829, 0, _T("�������")}, - {45, 830, 0, _T("��������")}, + {45, 802, 0, L"�������"}, + {45, 3075, 0, L"��������"}, + {45, 801, 0, L"������"}, + {45, 804, 0, L"��������"}, + {45, 803, 0, L"���������"}, + {45, 805, 0, L"��������"}, + {45, 3168, 0, L"������"}, + {45, 806, 0, L"�������"}, + {45, 807, 0, L"��������"}, + {45, 808, 0, L"��������"}, + {45, 809, 0, L"����������"}, + {45, 3131, 0, L"����������"}, + {45, 810, 0, L"��������"}, + {45, 3342, 0, L"�������"}, + {45, 811, 0, L"������"}, + {45, 812, 0, L"�����"}, + {45, 813, 0, L"�����"}, + {45, 814, 0, L"������"}, + {45, 3089, 0, L"������"}, + {45, 815, 0, L"��������"}, + {45, 816, 0, L"����������"}, + {45, 817, 0, L"���������"}, + {45, 818, 0, L"����"}, + {45, 819, 0, L"������"}, + {45, 820, 0, L"���������"}, + {45, 2976, 0, L"������"}, + {45, 2988, 0, L"���������"}, + {45, 821, 0, L"���������"}, + {45, 3088, 0, L"�������"}, + {45, 822, 0, L"�������"}, + {45, 823, 0, L"������"}, + {45, 824, 0, L"��������"}, + {45, 825, 0, L"�������"}, + {45, 3343, 0, L"����"}, + {45, 2867, 0, L"������"}, + {45, 2986, 0, L"����-������"}, + {45, 826, 0, L"��������"}, + {45, 3063, 0, L"��������"}, + {45, 827, 0, L"������"}, + {45, 3140, 0, L"���������"}, + {45, 828, 0, L"������"}, + {45, 829, 0, L"�������"}, + {45, 830, 0, L"��������"}, {45, 2529, 0, lpwszOther}, - {44, 831, 0, _T("��������")}, - {44, 832, 0, _T("�������")}, - {44, 836, 0, _T("��������")}, - {44, 835, 0, _T("��������")}, - {44, 834, 0, _T("�����")}, - {44, 833, 0, _T("������")}, + {44, 831, 0, L"��������"}, + {44, 832, 0, L"�������"}, + {44, 836, 0, L"��������"}, + {44, 835, 0, L"��������"}, + {44, 834, 0, L"�����"}, + {44, 833, 0, L"������"}, {44, 2528, 0, lpwszOther}, - {46, 3007, 0, _T("�����")}, - {46, 837, 0, _T("��������")}, - {46, 838, 0, _T("�����-�����")}, - {46, 3371, 0, _T("�������")}, - {46, 839, 0, _T("������-�������")}, - {46, 840, 0, _T("������")}, - {46, 841, 0, _T("���������")}, - {46, 3163, 0, _T("��������")}, - {46, 842, 0, _T("����")}, - {46, 843, 0, _T("����������")}, - {46, 3015, 0, _T("����������")}, - {46, 844, 0, _T("������")}, - {46, 2921, 0, _T("��������")}, - {46, 845, 0, _T("������")}, - {46, 846, 0, _T("����������")}, - {46, 847, 0, _T("�������")}, - {46, 848, 0, _T("��������")}, - {46, 849, 0, _T("����������")}, - {46, 3010, 0, _T("�����������")}, - {46, 850, 0, _T("����")}, - {46, 851, 0, _T("���������")}, - {46, 3072, 0, _T("������")}, - {46, 852, 0, _T("��������")}, - {46, 853, 0, _T("��������")}, - {46, 854, 0, _T("�������")}, - {46, 855, 0, _T("�����������")}, - {46, 3082, 0, _T("���������")}, - {46, 3309, 0, _T("������")}, - {46, 856, 0, _T("�����")}, - {46, 857, 0, _T("����")}, - {46, 3138, 0, _T("�������")}, - {46, 858, 0, _T("��������")}, - {46, 859, 0, _T("�������")}, - {46, 2872, 0, _T("�������")}, - {46, 2965, 0, _T("������")}, - {46, 3135, 0, _T("�����")}, - {46, 3156, 0, _T("�������")}, - {46, 3192, 0, _T("���������")}, - {46, 860, 0, _T("�������")}, - {46, 861, 0, _T("������")}, - {46, 2864, 0, _T("��������")}, - {46, 862, 0, _T("��������")}, - {46, 3009, 0, _T("���������")}, - {46, 2993, 0, _T("���������")}, - {46, 863, 0, _T("����������")}, - {46, 864, 0, _T("����������")}, - {46, 865, 0, _T("������")}, - {46, 866, 0, _T("������")}, - {46, 3191, 0, _T("����������")}, - {46, 2974, 0, _T("�����-��������")}, - {46, 3127, 0, _T("��������")}, - {46, 867, 0, _T("��������")}, - {46, 868, 0, _T("��������")}, - {46, 869, 0, _T("���������-��-�����")}, - {46, 3373, 0, _T("�������")}, - {46, 3313, 0, _T("�������")}, - {46, 870, 0, _T("��������")}, - {46, 3045, 0, _T("��������")}, - {46, 2906, 0, _T("������")}, + {46, 3007, 0, L"�����"}, + {46, 837, 0, L"��������"}, + {46, 838, 0, L"�����-�����"}, + {46, 3371, 0, L"�������"}, + {46, 839, 0, L"������-�������"}, + {46, 840, 0, L"������"}, + {46, 841, 0, L"���������"}, + {46, 3163, 0, L"��������"}, + {46, 842, 0, L"����"}, + {46, 843, 0, L"����������"}, + {46, 3015, 0, L"����������"}, + {46, 844, 0, L"������"}, + {46, 2921, 0, L"��������"}, + {46, 845, 0, L"������"}, + {46, 846, 0, L"����������"}, + {46, 847, 0, L"�������"}, + {46, 848, 0, L"��������"}, + {46, 849, 0, L"����������"}, + {46, 3010, 0, L"�����������"}, + {46, 850, 0, L"����"}, + {46, 851, 0, L"���������"}, + {46, 3072, 0, L"������"}, + {46, 852, 0, L"��������"}, + {46, 853, 0, L"��������"}, + {46, 854, 0, L"�������"}, + {46, 855, 0, L"�����������"}, + {46, 3082, 0, L"���������"}, + {46, 3309, 0, L"������"}, + {46, 856, 0, L"�����"}, + {46, 857, 0, L"����"}, + {46, 3138, 0, L"�������"}, + {46, 858, 0, L"��������"}, + {46, 859, 0, L"�������"}, + {46, 2872, 0, L"�������"}, + {46, 2965, 0, L"������"}, + {46, 3135, 0, L"�����"}, + {46, 3156, 0, L"�������"}, + {46, 3192, 0, L"���������"}, + {46, 860, 0, L"�������"}, + {46, 861, 0, L"������"}, + {46, 2864, 0, L"��������"}, + {46, 862, 0, L"��������"}, + {46, 3009, 0, L"���������"}, + {46, 2993, 0, L"���������"}, + {46, 863, 0, L"����������"}, + {46, 864, 0, L"����������"}, + {46, 865, 0, L"������"}, + {46, 866, 0, L"������"}, + {46, 3191, 0, L"����������"}, + {46, 2974, 0, L"�����-��������"}, + {46, 3127, 0, L"��������"}, + {46, 867, 0, L"��������"}, + {46, 868, 0, L"��������"}, + {46, 869, 0, L"���������-��-�����"}, + {46, 3373, 0, L"�������"}, + {46, 3313, 0, L"�������"}, + {46, 870, 0, L"��������"}, + {46, 3045, 0, L"��������"}, + {46, 2906, 0, L"������"}, {46, 2527, 0, lpwszOther}, - {48, 871, 0, _T("�����")}, - {48, 873, 0, _T("��������")}, - {48, 3147, 0, _T("�����")}, - {48, 872, 0, _T("��������")}, - {48, 3178, 0, _T("���������")}, + {48, 871, 0, L"�����"}, + {48, 873, 0, L"��������"}, + {48, 3147, 0, L"�����"}, + {48, 872, 0, L"��������"}, + {48, 3178, 0, L"���������"}, {48, 2526, 0, lpwszOther}, - {49, 3006, 0, _T("�����")}, - {49, 874, 0, _T("����������")}, - {49, 875, 0, _T("������")}, - {49, 3285, 0, _T("�������")}, - {49, 876, 0, _T("�������")}, - {49, 3126, 0, _T("�����")}, + {49, 3006, 0, L"�����"}, + {49, 874, 0, L"����������"}, + {49, 875, 0, L"������"}, + {49, 3285, 0, L"�������"}, + {49, 876, 0, L"�������"}, + {49, 3126, 0, L"�����"}, {49, 2525, 0, lpwszOther}, - {50, 3377, 0, _T("������")}, - {50, 3067, 0, _T("������")}, - {50, 877, 0, _T("������")}, - {50, 3065, 0, _T("���������")}, - {50, 3066, 0, _T("����")}, - {50, 878, 0, _T("�������")}, - {50, 3069, 0, _T("����")}, - {50, 3068, 0, _T("���������")}, + {50, 3377, 0, L"������"}, + {50, 3067, 0, L"������"}, + {50, 877, 0, L"������"}, + {50, 3065, 0, L"���������"}, + {50, 3066, 0, L"����"}, + {50, 878, 0, L"�������"}, + {50, 3069, 0, L"����"}, + {50, 3068, 0, L"���������"}, {50, 2524, 0, lpwszOther}, - {51, 879, 0, _T("���������")}, + {51, 879, 0, L"���������"}, {51, 2523, 0, lpwszOther}, - {34, 880, 0, _T("��������")}, - {34, 3125, 0, _T("��������")}, - {34, 881, 0, _T("���������")}, - {34, 890, 0, _T("�������")}, - {34, 3076, 0, _T("������")}, - {34, 882, 0, _T("��������")}, - {34, 3070, 0, _T("�����")}, - {34, 888, 0, _T("�����")}, - {34, 886, 0, _T("���������")}, - {34, 891, 0, _T("��-�������")}, - {34, 3310, 0, _T("����� �� ���")}, - {34, 883, 0, _T("������")}, - {34, 884, 0, _T("������")}, - {34, 885, 0, _T("��������")}, - {34, 892, 0, _T("������")}, - {34, 3179, 0, _T("������ �� �������")}, - {34, 3177, 0, _T("���-�������")}, - {34, 3289, 0, _T("�����-����-��-��������")}, - {34, 889, 0, _T("��������")}, - {34, 887, 0, _T("�������")}, - {34, 893, 0, _T("�����")}, + {34, 880, 0, L"��������"}, + {34, 3125, 0, L"��������"}, + {34, 881, 0, L"���������"}, + {34, 890, 0, L"�������"}, + {34, 3076, 0, L"������"}, + {34, 882, 0, L"��������"}, + {34, 3070, 0, L"�����"}, + {34, 888, 0, L"�����"}, + {34, 886, 0, L"���������"}, + {34, 891, 0, L"��-�������"}, + {34, 3310, 0, L"����� �� ���"}, + {34, 883, 0, L"������"}, + {34, 884, 0, L"������"}, + {34, 885, 0, L"��������"}, + {34, 892, 0, L"������"}, + {34, 3179, 0, L"������ �� �������"}, + {34, 3177, 0, L"���-�������"}, + {34, 3289, 0, L"�����-����-��-��������"}, + {34, 889, 0, L"��������"}, + {34, 887, 0, L"�������"}, + {34, 893, 0, L"�����"}, {34, 2522, 0, lpwszOther}, - {52, 3318, 0, _T("�����")}, - {52, 3278, 0, _T("��������")}, - {52, 906, 0, _T("�������")}, - {52, 894, 0, _T("������")}, - {52, 895, 0, _T("�������")}, - {52, 905, 0, _T("������")}, - {52, 896, 0, _T("�����")}, - {52, 897, 0, _T("�����")}, - {52, 3369, 0, _T("�������")}, - {52, 3327, 0, _T("�������")}, - {52, 898, 0, _T("�����")}, - {52, 899, 0, _T("������")}, - {52, 907, 0, _T("�������")}, - {52, 908, 0, _T("�������")}, - {52, 900, 0, _T("����")}, - {52, 901, 0, _T("���")}, - {52, 3368, 0, _T("���-����")}, - {52, 3384, 0, _T("��������")}, - {52, 3252, 0, _T("������")}, - {52, 902, 0, _T("������")}, - {52, 903, 0, _T("�����")}, - {52, 3130, 0, _T("����")}, - {52, 904, 0, _T("���������")}, + {52, 3318, 0, L"�����"}, + {52, 3278, 0, L"��������"}, + {52, 906, 0, L"�������"}, + {52, 894, 0, L"������"}, + {52, 895, 0, L"�������"}, + {52, 905, 0, L"������"}, + {52, 896, 0, L"�����"}, + {52, 897, 0, L"�����"}, + {52, 3369, 0, L"�������"}, + {52, 3327, 0, L"�������"}, + {52, 898, 0, L"�����"}, + {52, 899, 0, L"������"}, + {52, 907, 0, L"�������"}, + {52, 908, 0, L"�������"}, + {52, 900, 0, L"����"}, + {52, 901, 0, L"���"}, + {52, 3368, 0, L"���-����"}, + {52, 3384, 0, L"��������"}, + {52, 3252, 0, L"������"}, + {52, 902, 0, L"������"}, + {52, 903, 0, L"�����"}, + {52, 3130, 0, L"����"}, + {52, 904, 0, L"���������"}, {52, 2521, 0, lpwszOther}, - {53, 2939, 0, _T("����������")}, - {53, 3054, 0, _T("�����")}, - {53, 909, 0, _T("����������")}, - {53, 2934, 0, _T("��������")}, - {53, 913, 0, _T("������")}, - {53, 2935, 0, _T("�������")}, - {53, 912, 0, _T("������")}, - {53, 2905, 0, _T("�������")}, - {53, 911, 0, _T("����")}, - {53, 2936, 0, _T("���������")}, - {53, 2937, 0, _T("��������")}, - {53, 910, 0, _T("������")}, + {53, 2939, 0, L"����������"}, + {53, 3054, 0, L"�����"}, + {53, 909, 0, L"����������"}, + {53, 2934, 0, L"��������"}, + {53, 913, 0, L"������"}, + {53, 2935, 0, L"�������"}, + {53, 912, 0, L"������"}, + {53, 2905, 0, L"�������"}, + {53, 911, 0, L"����"}, + {53, 2936, 0, L"���������"}, + {53, 2937, 0, L"��������"}, + {53, 910, 0, L"������"}, {53, 2520, 0, lpwszOther}, - {54, 914, 0, _T("�������")}, - {54, 915, 0, _T("���������")}, - {54, 916, 0, _T("������")}, - {54, 918, 0, _T("��������")}, - {54, 919, 0, _T("�������")}, - {54, 3173, 0, _T("���������")}, - {54, 917, 0, _T("������")}, + {54, 914, 0, L"�������"}, + {54, 915, 0, L"���������"}, + {54, 916, 0, L"������"}, + {54, 918, 0, L"��������"}, + {54, 919, 0, L"�������"}, + {54, 3173, 0, L"���������"}, + {54, 917, 0, L"������"}, {54, 2519, 0, lpwszOther}, - {55, 920, 0, _T("�����")}, + {55, 920, 0, L"�����"}, {55, 2518, 0, lpwszOther}, - {56, 3376, 0, _T("��������")}, - {56, 921, 0, _T("����������")}, + {56, 3376, 0, L"��������"}, + {56, 921, 0, L"����������"}, {56, 2517, 0, lpwszOther}, - {57, 3142, 0, _T("������")}, - {57, 922, 0, _T("������")}, + {57, 3142, 0, L"������"}, + {57, 922, 0, L"������"}, {57, 2516, 0, lpwszOther}, - {58, 923, 0, _T("��������")}, - {58, 3154, 0, _T("�����")}, - {58, 924, 0, _T("�����")}, + {58, 923, 0, L"��������"}, + {58, 3154, 0, L"�����"}, + {58, 924, 0, L"�����"}, {58, 2515, 0, lpwszOther}, - {59, 925, 0, _T("������")}, - {59, 926, 0, _T("�������")}, - {59, 3234, 0, _T("���������")}, - {59, 3275, 0, _T("�����")}, - {59, 927, 0, _T("�������")}, - {59, 3321, 0, _T("������")}, - {59, 928, 0, _T("�������")}, - {59, 929, 0, _T("���������")}, - {59, 3281, 0, _T("�����-�����")}, + {59, 925, 0, L"������"}, + {59, 926, 0, L"�������"}, + {59, 3234, 0, L"���������"}, + {59, 3275, 0, L"�����"}, + {59, 927, 0, L"�������"}, + {59, 3321, 0, L"������"}, + {59, 928, 0, L"�������"}, + {59, 929, 0, L"���������"}, + {59, 3281, 0, L"�����-�����"}, {59, 2514, 0, lpwszOther}, - {36, 930, 0, _T("�����-�����")}, + {36, 930, 0, L"�����-�����"}, {36, 2513, 0, lpwszOther}, - {60, 931, 0, _T("���������")}, - {60, 933, 0, _T("�����")}, - {60, 932, 0, _T("�����")}, - {60, 934, 0, _T("�����")}, - {60, 935, 0, _T("�����")}, - {60, 2977, 0, _T("������")}, - {60, 3030, 0, _T("������")}, - {60, 3091, 0, _T("��������")}, - {60, 936, 0, _T("���������")}, - {60, 937, 0, _T("������")}, - {60, 3044, 0, _T("���������")}, - {60, 3380, 0, _T("������")}, + {60, 931, 0, L"���������"}, + {60, 933, 0, L"�����"}, + {60, 932, 0, L"�����"}, + {60, 934, 0, L"�����"}, + {60, 935, 0, L"�����"}, + {60, 2977, 0, L"������"}, + {60, 3030, 0, L"������"}, + {60, 3091, 0, L"��������"}, + {60, 936, 0, L"���������"}, + {60, 937, 0, L"������"}, + {60, 3044, 0, L"���������"}, + {60, 3380, 0, L"������"}, {60, 2512, 0, lpwszOther}, - {61, 3190, 0, _T("������������")}, - {61, 2857, 0, _T("�����������")}, - {61, 938, 0, _T("����")}, - {61, 3355, 0, _T("���������")}, - {61, 939, 0, _T("��������")}, + {61, 3190, 0, L"������������"}, + {61, 2857, 0, L"�����������"}, + {61, 938, 0, L"����"}, + {61, 3355, 0, L"���������"}, + {61, 939, 0, L"��������"}, {61, 2511, 0, lpwszOther}, - {62, 940, 0, _T("��������")}, - {62, 941, 0, _T("�������")}, - {62, 3164, 0, _T("�������")}, - {62, 942, 0, _T("�������")}, - {62, 943, 0, _T("�������")}, - {62, 3237, 0, _T("��������")}, - {62, 3165, 0, _T("������ ����")}, - {62, 944, 0, _T("��������")}, - {62, 945, 0, _T("������")}, - {62, 3008, 0, _T("�����")}, - {62, 3150, 0, _T("�������")}, - {62, 946, 0, _T("�������")}, - {62, 947, 0, _T("�����")}, - {62, 948, 0, _T("�����")}, - {62, 2958, 0, _T("����")}, + {62, 940, 0, L"��������"}, + {62, 941, 0, L"�������"}, + {62, 3164, 0, L"�������"}, + {62, 942, 0, L"�������"}, + {62, 943, 0, L"�������"}, + {62, 3237, 0, L"��������"}, + {62, 3165, 0, L"������ ����"}, + {62, 944, 0, L"��������"}, + {62, 945, 0, L"������"}, + {62, 3008, 0, L"�����"}, + {62, 3150, 0, L"�������"}, + {62, 946, 0, L"�������"}, + {62, 947, 0, L"�����"}, + {62, 948, 0, L"�����"}, + {62, 2958, 0, L"����"}, {62, 2510, 0, lpwszOther}, - {35, 949, 0, _T("��������")}, - {35, 950, 0, _T("�����")}, + {35, 949, 0, L"��������"}, + {35, 950, 0, L"�����"}, {35, 2509, 0, lpwszOther}, - {63, 952, 0, _T("������")}, - {63, 951, 0, _T("��������")}, - {63, 954, 0, _T("���������")}, - {63, 955, 0, _T("�������")}, - {63, 953, 0, _T("����")}, + {63, 952, 0, L"������"}, + {63, 951, 0, L"��������"}, + {63, 954, 0, L"���������"}, + {63, 955, 0, L"�������"}, + {63, 953, 0, L"����"}, {63, 2508, 0, lpwszOther}, - {64, 956, 0, _T("���-������")}, + {64, 956, 0, L"���-������"}, {64, 2507, 0, lpwszOther}, - {74, 957, 0, _T("�������")}, - {74, 960, 0, _T("���")}, - {74, 958, 0, _T("����-���")}, - {74, 959, 0, _T("�������")}, + {74, 957, 0, L"�������"}, + {74, 960, 0, L"���"}, + {74, 958, 0, L"����-���"}, + {74, 959, 0, L"�������"}, {74, 2506, 0, lpwszOther}, - {65, 961, 0, _T("����������")}, - {65, 962, 0, _T("������")}, - {65, 3101, 0, _T("������")}, - {65, 963, 0, _T("������")}, - {65, 964, 0, _T("������")}, - {65, 965, 0, _T("����������")}, - {65, 966, 0, _T("��������")}, + {65, 961, 0, L"����������"}, + {65, 962, 0, L"������"}, + {65, 3101, 0, L"������"}, + {65, 963, 0, L"������"}, + {65, 964, 0, L"������"}, + {65, 965, 0, L"����������"}, + {65, 966, 0, L"��������"}, {65, 2505, 0, lpwszOther}, - {66, 968, 0, _T("�����")}, - {66, 967, 0, _T("�������")}, - {66, 969, 0, _T("�������")}, + {66, 968, 0, L"�����"}, + {66, 967, 0, L"�������"}, + {66, 969, 0, L"�������"}, {66, 2504, 0, lpwszOther}, - {67, 970, 0, _T("��������")}, + {67, 970, 0, L"��������"}, {67, 2503, 0, lpwszOther}, - {68, 2888, 0, _T("������")}, - {68, 971, 0, _T("����")}, - {68, 979, 0, _T("�����")}, - {68, 972, 0, _T("�������")}, - {68, 980, 0, _T("�����")}, - {68, 973, 0, _T("����")}, - {68, 3375, 0, _T("���������")}, - {68, 3159, 0, _T("�������")}, - {68, 974, 0, _T("�������")}, - {68, 975, 0, _T("�����")}, - {68, 976, 0, _T("���������")}, - {68, 977, 0, _T("����")}, - {68, 978, 0, _T("��������")}, + {68, 2888, 0, L"������"}, + {68, 971, 0, L"����"}, + {68, 979, 0, L"�����"}, + {68, 972, 0, L"�������"}, + {68, 980, 0, L"�����"}, + {68, 973, 0, L"����"}, + {68, 3375, 0, L"���������"}, + {68, 3159, 0, L"�������"}, + {68, 974, 0, L"�������"}, + {68, 975, 0, L"�����"}, + {68, 976, 0, L"���������"}, + {68, 977, 0, L"����"}, + {68, 978, 0, L"��������"}, {68, 2502, 0, lpwszOther}, - {37, 996, 0, _T("�������")}, - {37, 983, 0, _T("��������")}, - {37, 997, 0, _T("����")}, - {37, 984, 0, _T("�����")}, - {37, 998, 0, _T("�����")}, - {37, 987, 0, _T("����")}, - {37, 988, 0, _T("�����")}, - {37, 993, 0, _T("�������-������")}, - {37, 3037, 0, _T("�����")}, - {37, 989, 0, _T("����")}, - {37, 985, 0, _T("�������")}, - {37, 991, 0, _T("���")}, - {37, 3161, 0, _T("�����")}, - {37, 990, 0, _T("�����")}, - {37, 994, 0, _T("����")}, - {37, 995, 0, _T("�����")}, - {37, 999, 0, _T("������")}, - {37, 981, 0, _T("�����")}, - {37, 3374, 0, _T("���������")}, - {37, 992, 0, _T("����")}, - {37, 982, 0, _T("���������")}, - {37, 986, 0, _T("������")}, - {37, 3314, 0, _T("�������")}, + {37, 996, 0, L"�������"}, + {37, 983, 0, L"��������"}, + {37, 997, 0, L"����"}, + {37, 984, 0, L"�����"}, + {37, 998, 0, L"�����"}, + {37, 987, 0, L"����"}, + {37, 988, 0, L"�����"}, + {37, 993, 0, L"�������-������"}, + {37, 3037, 0, L"�����"}, + {37, 989, 0, L"����"}, + {37, 985, 0, L"�������"}, + {37, 991, 0, L"���"}, + {37, 3161, 0, L"�����"}, + {37, 990, 0, L"�����"}, + {37, 994, 0, L"����"}, + {37, 995, 0, L"�����"}, + {37, 999, 0, L"������"}, + {37, 981, 0, L"�����"}, + {37, 3374, 0, L"���������"}, + {37, 992, 0, L"����"}, + {37, 982, 0, L"���������"}, + {37, 986, 0, L"������"}, + {37, 3314, 0, L"�������"}, {37, 2501, 0, lpwszOther}, - {69, 1003, 0, _T("���������")}, - {69, 1000, 0, _T("������")}, - {69, 1001, 0, _T("�����")}, - {69, 1004, 0, _T("�����")}, - {69, 1002, 0, _T("�����")}, + {69, 1003, 0, L"���������"}, + {69, 1000, 0, L"������"}, + {69, 1001, 0, L"�����"}, + {69, 1004, 0, L"�����"}, + {69, 1002, 0, L"�����"}, {69, 2500, 0, lpwszOther}, - {70, 1005, 0, _T("����")}, - {70, 3291, 0, _T("���������-����")}, - {70, 1007, 0, _T("������-�������")}, - {70, 1008, 0, _T("�������-����")}, - {70, 3019, 0, _T("��������")}, - {70, 1010, 0, _T("�����")}, - {70, 1009, 0, _T("�������")}, - {70, 1015, 0, _T("�������")}, - {70, 3105, 0, _T("��������� �����")}, - {70, 1006, 0, _T("�����")}, - {70, 3246, 0, _T("�����")}, - {70, 1011, 0, _T("�������")}, - {70, 1012, 0, _T("����-���-�����")}, - {70, 1014, 0, _T("�����-���������")}, - {70, 1013, 0, _T("�������-���-�����")}, + {70, 1005, 0, L"����"}, + {70, 3291, 0, L"���������-����"}, + {70, 1007, 0, L"������-�������"}, + {70, 1008, 0, L"�������-����"}, + {70, 3019, 0, L"��������"}, + {70, 1010, 0, L"�����"}, + {70, 1009, 0, L"�������"}, + {70, 1015, 0, L"�������"}, + {70, 3105, 0, L"��������� �����"}, + {70, 1006, 0, L"�����"}, + {70, 3246, 0, L"�����"}, + {70, 1011, 0, L"�������"}, + {70, 1012, 0, L"����-���-�����"}, + {70, 1014, 0, L"�����-���������"}, + {70, 1013, 0, L"�������-���-�����"}, {70, 2499, 0, lpwszOther}, - {71, 1016, 0, _T("����")}, - {71, 1019, 0, _T("�����")}, - {71, 1017, 0, _T("������")}, - {71, 1018, 0, _T("����")}, - {71, 1020, 0, _T("����")}, - {71, 1021, 0, _T("���������")}, - {71, 1022, 0, _T("�����")}, - {71, 3189, 0, _T("��������")}, - {71, 1023, 0, _T("������")}, - {71, 1024, 0, _T("��������")}, - {71, 1025, 0, _T("�������")}, - {71, 1026, 0, _T("�������")}, - {71, 1027, 0, _T("������")}, - {71, 1028, 0, _T("������")}, - {71, 1029, 0, _T("������")}, - {71, 1030, 0, _T("�����")}, + {71, 1016, 0, L"����"}, + {71, 1019, 0, L"�����"}, + {71, 1017, 0, L"������"}, + {71, 1018, 0, L"����"}, + {71, 1020, 0, L"����"}, + {71, 1021, 0, L"���������"}, + {71, 1022, 0, L"�����"}, + {71, 3189, 0, L"��������"}, + {71, 1023, 0, L"������"}, + {71, 1024, 0, L"��������"}, + {71, 1025, 0, L"�������"}, + {71, 1026, 0, L"�������"}, + {71, 1027, 0, L"������"}, + {71, 1028, 0, L"������"}, + {71, 1029, 0, L"������"}, + {71, 1030, 0, L"�����"}, {71, 2498, 0, lpwszOther}, - {72, 2883, 0, _T("������")}, - {72, 1031, 0, _T("��������")}, - {72, 1032, 0, _T("�������")}, - {72, 1037, 0, _T("�������")}, - {72, 1036, 0, _T("�����")}, - {72, 1042, 0, _T("����")}, - {72, 1033, 0, _T("������")}, - {72, 1034, 0, _T("���������")}, - {72, 1041, 0, _T("����")}, - {72, 1039, 0, _T("�����")}, - {72, 1043, 0, _T("�����������")}, - {72, 1040, 0, _T("���������")}, - {72, 1038, 0, _T("���������")}, + {72, 2883, 0, L"������"}, + {72, 1031, 0, L"��������"}, + {72, 1032, 0, L"�������"}, + {72, 1037, 0, L"�������"}, + {72, 1036, 0, L"�����"}, + {72, 1042, 0, L"����"}, + {72, 1033, 0, L"������"}, + {72, 1034, 0, L"���������"}, + {72, 1041, 0, L"����"}, + {72, 1039, 0, L"�����"}, + {72, 1043, 0, L"�����������"}, + {72, 1040, 0, L"���������"}, + {72, 1038, 0, L"���������"}, {72, 2497, 0, lpwszOther}, - {73, 3013, 0, _T("�����")}, - {73, 1044, 0, _T("�����")}, - {73, 1045, 0, _T("������-����")}, - {73, 1046, 0, _T("������")}, - {73, 1047, 0, _T("���������")}, - {73, 1048, 0, _T("�����")}, - {73, 1049, 0, _T("�����")}, - {73, 1050, 0, _T("�������")}, - {73, 1051, 0, _T("��������")}, - {73, 1052, 0, _T("������")}, - {73, 1053, 0, _T("�����")}, - {73, 1054, 0, _T("��������")}, + {73, 3013, 0, L"�����"}, + {73, 1044, 0, L"�����"}, + {73, 1045, 0, L"������-����"}, + {73, 1046, 0, L"������"}, + {73, 1047, 0, L"���������"}, + {73, 1048, 0, L"�����"}, + {73, 1049, 0, L"�����"}, + {73, 1050, 0, L"�������"}, + {73, 1051, 0, L"��������"}, + {73, 1052, 0, L"������"}, + {73, 1053, 0, L"�����"}, + {73, 1054, 0, L"��������"}, {0, 0, 0, NULL} };//*/ /* static const MRA_COUNTRY mracCountrys[] = { - {24, _T("������")}, - {81, _T("�����������")}, - {82, _T("�������")}, - {97, _T("����������")}, - {96, _T("���������")}, - {99, _T("�������")}, - {100, _T("������-����������")}, - {101, _T("�����")}, - {102, _T("�������")}, - {83, _T("������")}, - {86, _T("�������")}, - {95, _T("�����")}, - {103, _T("���������")}, - {79, _T("��������")}, - {85, _T("����")}, - {87, _T("����")}, - {104, _T("�����")}, - {84, _T("���������")}, - {105, _T("��������")}, - {106, _T("�����")}, - {107, _T("����")}, - {92, _T("�������� (����������)")}, - {76, _T("�����")}, - {3215, _T("��������� ������� (�����.)")}, - {29, _T("����� (����)")}, - {108, _T("�����")}, - {88, _T("������")}, - {109, _T("����")}, - {110, _T("�����")}, - {111, _T("��������")}, - {112, _T("��������")}, - {113, _T("��������")}, - {114, _T("������")}, - {115, _T("�����")}, - {116, _T("������������ �������� �������")}, - {117, _T("����")}, - {3216, _T("������ ��������� (�����.)")}, - {122, _T("��������")}, - {89, _T("���������")}, - {94, _T("���������� ������")}, - {118, _T("��������")}, - {78, _T("�����")}, - {91, _T("�����������")}, - {119, _T("�������")}, - {120, _T("�������")}, - {132, _T("�����")}, - {90, _T("���������")}, - {77, _T("������")}, - {93, _T("����������")}, - {121, _T("���������")}, - {98, _T("��� �����")}, - {75, _T("������")}, - {123, _T("���������")}, - {454, _T("������������ �����")}, - {124, _T("�������")}, - {453, _T("���� (���)")}, - {126, _T("��������")}, - {127, _T("���������� �������")}, - {128, _T("���������� (������������ ����� ����������)")}, - {129, _T("�����")}, - {3220, _T("���� (�.���.)")}, - {130, _T("����� ��������")}, - {3218, _T("����� ��������� (��.)")}, - {3221, _T("������� ���� (�.���.)")}, - {3230, _T("������� ���� � ���������� (�����.)")}, - {131, _T("�����")}, - {133, _T("����� - ����� ������")}, - {3222, _T("������� (����.)")}, - {125, _T("�����")}, - {3219, _T("���. ���������� ������� (���)")}, - {134, _T("���������� �������")}, - {3223, _T("������� (�.���.)")}, - {135, _T("�����")}, - {136, _T("������")}, - {3224, _T("������ � ������ ������� (��.)")}, - {137, _T("�����")}, - {3226, _T("����������� ���������")}, - {3225, _T("����������� ����� ����������")}, - {138, _T("������")}, - {139, _T("���")}, - {3200, _T("������� (����.)")}, - {140, _T("������� � �������")}, - {141, _T("���������")}, - {3202, _T("����� (���.)")}, - {142, _T("������")}, - {143, _T("��������")}, - {146, _T("�����")}, - {3203, _T("������� (����.)")}, - {144, _T("�������")}, - {145, _T("��������")}, - {147, _T("���������")}, - {3204, _T("���������� ������� (����.)")}, - {452, _T("���������� ������� (���)")}, - {149, _T("�����")}, - {148, _T("������")}, - {3205, _T("��������� (��.)")}, - {173, _T("���������")}, - {150, _T("��������")}, - {151, _T("�������")}, - {152, _T("���������� (���.)")}, - {153, _T("��������")}, - {154, _T("������������� ����������")}, - {155, _T("��������")}, - {156, _T("�����-����")}, - {157, _T("����")}, - {3208, _T("��������� (��.)")}, - {158, _T("�������")}, - {3209, _T("���������� (����)")}, - {3201, _T("������������� ������")}, - {159, _T("���������")}, - {3207, _T("������ ������ (����.)")}, - {3211, _T("������� ����� � ������ (����.)")}, - {160, _T("������")}, - {161, _T("��������")}, - {162, _T("����")}, - {163, _T("���������")}, - {164, _T("����-������� � ���������")}, - {165, _T("����-���� � �����")}, - {166, _T("����-�����")}, - {3210, _T("����-���� � ������� (��.)")}, - {167, _T("�������")}, - {168, _T("�������� � ������")}, - {169, _T("�������")}, - {3212, _T("������������ ������� (����.)")}, - {3206, _T("����������� ������")}, - {170, _T("����")}, - {171, _T("�������")}, - {3213, _T("��. �������� � ��. ���������� �-�� (����.)")}, - {172, _T("������")}, - {174, _T("�����")}, - {175, _T("������")}, - {176, _T("�����")}, - {177, _T("��������")}, - {3228, _T("���������� ���������� � ��������� ������")}, - {178, _T("�������-����")}, - {179, _T("�������")}, - {180, _T("�����")}, - {181, _T("������")}, - {182, _T("����")}, - {183, _T("������")}, - {184, _T("������-�����")}, - {185, _T("�������")}, - {186, _T("������")}, - {187, _T("������")}, - {3198, _T("���. ������")}, - {23, _T("��������")}, - {188, _T("����-�����")}, - {189, _T("�������")}, - {190, _T("�����")}, - {191, _T("������")}, - {193, _T("����� (����)")}, - {192, _T("�����")}, - {194, _T("���-�`�����")}, - {195, _T("������")}, - {196, _T("�������")}, - {197, _T("�����")}, - {198, _T("��������")}, - {199, _T("����������")}, - {200, _T("����������")}, - {3229, _T("������ (��.)")}, - {201, _T("������")}, - {202, _T("����")}, - {203, _T("�������")}, - {204, _T("��������")}, - {205, _T("�������")}, - {206, _T("�����")}, - {207, _T("�������")}, - {3227, _T("������ ���� (����.)")}, - {3197, _T("������� (��.)")}, - {208, _T("������")}, - {209, _T("���-���� � ��������")}, - {210, _T("���������")}, - {3199, _T("������ ����� (����.)")}, - {211, _T("�������")}, - {212, _T("�������")}, - {213, _T("������")}, - {214, _T("�����")}, - {215, _T("������-�����")}, - {216, _T("��������")}, - {217, _T("����")}, - {218, _T("�����")}, - {219, _T("������")}, - {220, _T("��������������������� ����������")}, - {222, _T("���")}, - {223, _T("�������������� ������")}, - {221, _T("�������")}, - {224, _T("�������")}, - {225, _T("����-����������� ���������� (���)")}, - {39, _T("�������")}, - {40, _T("�������")}, - {32, _T("�������")}, - {33, _T("�������")}, - {340, _T("����������")}, - {38, _T("�������")}, - {41, _T("��������")}, - {42, _T("������ � �����������")}, - {43, _T("�������")}, - {45, _T("��������������")}, - {44, _T("�������")}, - {46, _T("��������")}, - {3193, _T("������ (����.)")}, - {47, _T("��������� (����.)")}, - {48, _T("������")}, - {49, _T("�����")}, - {3194, _T("������ (����.)")}, - {50, _T("��������")}, - {51, _T("��������")}, - {34, _T("�������")}, - {52, _T("������")}, - {53, _T("������")}, - {54, _T("�����")}, - {55, _T("�����������")}, - {56, _T("����������")}, - {57, _T("���������")}, - {58, _T("������")}, - {59, _T("��������")}, - {36, _T("������")}, - {60, _T("����������")}, - {61, _T("��������")}, - {3195, _T("������ ��� (����.)")}, - {62, _T("������")}, - {35, _T("����������")}, - {63, _T("�������")}, - {64, _T("���-������")}, - {74, _T("������ � ����������")}, - {65, _T("��������")}, - {66, _T("��������")}, - {67, _T("��������� �-�� (�����)")}, - {68, _T("���������")}, - {37, _T("�������")}, - {69, _T("��������")}, - {70, _T("�����")}, - {71, _T("���������")}, - {72, _T("������")}, - {3196, _T("���������� (����.)")}, - {73, _T("�������")}, + {24, L"������"}, + {81, L"�����������"}, + {82, L"�������"}, + {97, L"����������"}, + {96, L"���������"}, + {99, L"�������"}, + {100, L"������-����������"}, + {101, L"�����"}, + {102, L"�������"}, + {83, L"������"}, + {86, L"�������"}, + {95, L"�����"}, + {103, L"���������"}, + {79, L"��������"}, + {85, L"����"}, + {87, L"����"}, + {104, L"�����"}, + {84, L"���������"}, + {105, L"��������"}, + {106, L"�����"}, + {107, L"����"}, + {92, L"�������� (����������)"}, + {76, L"�����"}, + {3215, L"��������� ������� (�����.)"}, + {29, L"����� (����)"}, + {108, L"�����"}, + {88, L"������"}, + {109, L"����"}, + {110, L"�����"}, + {111, L"��������"}, + {112, L"��������"}, + {113, L"��������"}, + {114, L"������"}, + {115, L"�����"}, + {116, L"������������ �������� �������"}, + {117, L"����"}, + {3216, L"������ ��������� (�����.)"}, + {122, L"��������"}, + {89, L"���������"}, + {94, L"���������� ������"}, + {118, L"��������"}, + {78, L"�����"}, + {91, L"�����������"}, + {119, L"�������"}, + {120, L"�������"}, + {132, L"�����"}, + {90, L"���������"}, + {77, L"������"}, + {93, L"����������"}, + {121, L"���������"}, + {98, L"��� �����"}, + {75, L"������"}, + {123, L"���������"}, + {454, L"������������ �����"}, + {124, L"�������"}, + {453, L"���� (���)"}, + {126, L"��������"}, + {127, L"���������� �������"}, + {128, L"���������� (������������ ����� ����������)"}, + {129, L"�����"}, + {3220, L"���� (�.���.)"}, + {130, L"����� ��������"}, + {3218, L"����� ��������� (��.)"}, + {3221, L"������� ���� (�.���.)"}, + {3230, L"������� ���� � ���������� (�����.)"}, + {131, L"�����"}, + {133, L"����� - ����� ������"}, + {3222, L"������� (����.)"}, + {125, L"�����"}, + {3219, L"���. ���������� ������� (���)"}, + {134, L"���������� �������"}, + {3223, L"������� (�.���.)"}, + {135, L"�����"}, + {136, L"������"}, + {3224, L"������ � ������ ������� (��.)"}, + {137, L"�����"}, + {3226, L"����������� ���������"}, + {3225, L"����������� ����� ����������"}, + {138, L"������"}, + {139, L"���"}, + {3200, L"������� (����.)"}, + {140, L"������� � �������"}, + {141, L"���������"}, + {3202, L"����� (���.)"}, + {142, L"������"}, + {143, L"��������"}, + {146, L"�����"}, + {3203, L"������� (����.)"}, + {144, L"�������"}, + {145, L"��������"}, + {147, L"���������"}, + {3204, L"���������� ������� (����.)"}, + {452, L"���������� ������� (���)"}, + {149, L"�����"}, + {148, L"������"}, + {3205, L"��������� (��.)"}, + {173, L"���������"}, + {150, L"��������"}, + {151, L"�������"}, + {152, L"���������� (���.)"}, + {153, L"��������"}, + {154, L"������������� ����������"}, + {155, L"��������"}, + {156, L"�����-����"}, + {157, L"����"}, + {3208, L"��������� (��.)"}, + {158, L"�������"}, + {3209, L"���������� (����)"}, + {3201, L"������������� ������"}, + {159, L"���������"}, + {3207, L"������ ������ (����.)"}, + {3211, L"������� ����� � ������ (����.)"}, + {160, L"������"}, + {161, L"��������"}, + {162, L"����"}, + {163, L"���������"}, + {164, L"����-������� � ���������"}, + {165, L"����-���� � �����"}, + {166, L"����-�����"}, + {3210, L"����-���� � ������� (��.)"}, + {167, L"�������"}, + {168, L"�������� � ������"}, + {169, L"�������"}, + {3212, L"������������ ������� (����.)"}, + {3206, L"����������� ������"}, + {170, L"����"}, + {171, L"�������"}, + {3213, L"��. �������� � ��. ���������� �-�� (����.)"}, + {172, L"������"}, + {174, L"�����"}, + {175, L"������"}, + {176, L"�����"}, + {177, L"��������"}, + {3228, L"���������� ���������� � ��������� ������"}, + {178, L"�������-����"}, + {179, L"�������"}, + {180, L"�����"}, + {181, L"������"}, + {182, L"����"}, + {183, L"������"}, + {184, L"������-�����"}, + {185, L"�������"}, + {186, L"������"}, + {187, L"������"}, + {3198, L"���. ������"}, + {23, L"��������"}, + {188, L"����-�����"}, + {189, L"�������"}, + {190, L"�����"}, + {191, L"������"}, + {193, L"����� (����)"}, + {192, L"�����"}, + {194, L"���-�`�����"}, + {195, L"������"}, + {196, L"�������"}, + {197, L"�����"}, + {198, L"��������"}, + {199, L"����������"}, + {200, L"����������"}, + {3229, L"������ (��.)"}, + {201, L"������"}, + {202, L"����"}, + {203, L"�������"}, + {204, L"��������"}, + {205, L"�������"}, + {206, L"�����"}, + {207, L"�������"}, + {3227, L"������ ���� (����.)"}, + {3197, L"������� (��.)"}, + {208, L"������"}, + {209, L"���-���� � ��������"}, + {210, L"���������"}, + {3199, L"������ ����� (����.)"}, + {211, L"�������"}, + {212, L"�������"}, + {213, L"������"}, + {214, L"�����"}, + {215, L"������-�����"}, + {216, L"��������"}, + {217, L"����"}, + {218, L"�����"}, + {219, L"������"}, + {220, L"��������������������� ����������"}, + {222, L"���"}, + {223, L"�������������� ������"}, + {221, L"�������"}, + {224, L"�������"}, + {225, L"����-����������� ���������� (���)"}, + {39, L"�������"}, + {40, L"�������"}, + {32, L"�������"}, + {33, L"�������"}, + {340, L"����������"}, + {38, L"�������"}, + {41, L"��������"}, + {42, L"������ � �����������"}, + {43, L"�������"}, + {45, L"��������������"}, + {44, L"�������"}, + {46, L"��������"}, + {3193, L"������ (����.)"}, + {47, L"��������� (����.)"}, + {48, L"������"}, + {49, L"�����"}, + {3194, L"������ (����.)"}, + {50, L"��������"}, + {51, L"��������"}, + {34, L"�������"}, + {52, L"������"}, + {53, L"������"}, + {54, L"�����"}, + {55, L"�����������"}, + {56, L"����������"}, + {57, L"���������"}, + {58, L"������"}, + {59, L"��������"}, + {36, L"������"}, + {60, L"����������"}, + {61, L"��������"}, + {3195, L"������ ��� (����.)"}, + {62, L"������"}, + {35, L"����������"}, + {63, L"�������"}, + {64, L"���-������"}, + {74, L"������ � ����������"}, + {65, L"��������"}, + {66, L"��������"}, + {67, L"��������� �-�� (�����)"}, + {68, L"���������"}, + {37, L"�������"}, + {69, L"��������"}, + {70, L"�����"}, + {71, L"���������"}, + {72, L"������"}, + {3196, L"���������� (����.)"}, + {73, L"�������"}, {0, NULL} }; @@ -1667,1125 +1667,1125 @@ static const MRA_COUNTRY mracCountrys[] = static const MRA_CITY mracCitys[] = { - {24, 25, _T("������")}, - {24, 226, _T("�����-���������")}, - {24, 233, _T("���� (������)")}, - {24, 232, _T("���������� ����")}, - {24, 235, _T("����������� ����")}, - {24, 227, _T("�������� ���.")}, - {24, 229, _T("���������� ���.")}, - {24, 231, _T("����������� ���.")}, - {24, 234, _T("����������� ���.")}, - {24, 228, _T("��������� ��")}, - {24, 230, _T("��������� ��")}, - {24, 236, _T("��������� ��")}, - {24, 237, _T("������������")}, - {24, 240, _T("�����-��")}, - {24, 241, _T("��������")}, - {24, 248, _T("���������")}, - {24, 249, _T("��������")}, - {24, 251, _T("�������")}, - {24, 238, _T("��������� ���.")}, - {24, 242, _T("������������� ���.")}, - {24, 243, _T("������������ ���.")}, - {24, 244, _T("���������� ���.")}, - {24, 245, _T("�������� ���.")}, - {24, 246, _T("��������� ���.")}, - {24, 247, _T("����������� ���.")}, - {24, 250, _T("����������� ���.")}, - {24, 239, _T("����-��������� ��")}, - {24, 255, _T("�������")}, - {24, 256, _T("����")}, - {24, 252, _T("������������� ���.")}, - {24, 253, _T("����������� ���.")}, - {24, 254, _T("��������������� ���.")}, - {24, 257, _T("������������� ���.")}, - {24, 258, _T("���������� ���.")}, - {24, 260, _T("������������ ���.")}, - {24, 261, _T("��������� ���.")}, - {24, 259, _T("�������� ��")}, - {24, 265, _T("�������")}, - {24, 263, _T("���������� �����")}, - {24, 273, _T("����")}, - {24, 275, _T("�������")}, - {24, 264, _T("��������� ����")}, - {24, 268, _T("������������ ����")}, - {24, 266, _T("��������� ���.")}, - {24, 267, _T("����������� ���.")}, - {24, 269, _T("������������� ���.")}, - {24, 270, _T("������ ���.")}, - {24, 272, _T("������� ���.")}, - {24, 276, _T("��������� ���.")}, - {24, 262, _T("�������� ��������� ��")}, - {24, 271, _T("���������� ��")}, - {24, 274, _T("����-��������� ��������� ��")}, - {24, 277, _T("����������� ��")}, - {24, 278, _T("���������� ���.")}, - {24, 279, _T("������������ ���.")}, - {24, 280, _T("��������� ���.")}, - {24, 282, _T("����������� ���.")}, - {24, 281, _T("�����-���������� �� - ����")}, - {24, 283, _T("�����-�������� ��")}, - {24, 284, _T("������������ ���.")}, - {24, 285, _T("�������� ���.")}, - {24, 286, _T("������������ ���.")}, - {24, 287, _T("����������� ���.")}, - {24, 288, _T("���������� ���.")}, - {24, 289, _T("��������� ���.")}, - {24, 290, _T("����������� ���.")}, - {24, 291, _T("������� ���.")}, - {24, 292, _T("�������� ���.")}, - {24, 293, _T("���������� ���.")}, - {24, 294, _T("��������� ���.")}, - {24, 295, _T("��������� ���.")}, - {24, 296, _T("���������� ���.")}, - {24, 297, _T("���������� ���.")}, - {24, 298, _T("�������� ���.")}, - {24, 299, _T("�������� ���.")}, - {24, 300, _T("����������� ���.")}, - {24, 301, _T("������")}, - {24, 304, _T("��������")}, - {24, 305, _T("���������")}, - {24, 306, _T("���������-��������")}, - {24, 307, _T("��������")}, - {24, 308, _T("���������-���������")}, - {24, 311, _T("�������� ������ - ������")}, - {24, 313, _T("�����")}, - {24, 309, _T("������������� ����")}, - {24, 312, _T("�������������� ����")}, - {24, 302, _T("������������ ���.")}, - {24, 303, _T("������������� ���.")}, - {24, 310, _T("���������� ���.")}, - {81, 1055, _T("����")}, - {81, 1058, _T("������")}, - {81, 1056, _T("����������")}, - {81, 1057, _T("��������")}, - {81, 3153, _T("����")}, + {24, 25, L"������"}, + {24, 226, L"�����-���������"}, + {24, 233, L"���� (������)"}, + {24, 232, L"���������� ����"}, + {24, 235, L"����������� ����"}, + {24, 227, L"�������� ���."}, + {24, 229, L"���������� ���."}, + {24, 231, L"����������� ���."}, + {24, 234, L"����������� ���."}, + {24, 228, L"��������� ��"}, + {24, 230, L"��������� ��"}, + {24, 236, L"��������� ��"}, + {24, 237, L"������������"}, + {24, 240, L"�����-��"}, + {24, 241, L"��������"}, + {24, 248, L"���������"}, + {24, 249, L"��������"}, + {24, 251, L"�������"}, + {24, 238, L"��������� ���."}, + {24, 242, L"������������� ���."}, + {24, 243, L"������������ ���."}, + {24, 244, L"���������� ���."}, + {24, 245, L"�������� ���."}, + {24, 246, L"��������� ���."}, + {24, 247, L"����������� ���."}, + {24, 250, L"����������� ���."}, + {24, 239, L"����-��������� ��"}, + {24, 255, L"�������"}, + {24, 256, L"����"}, + {24, 252, L"������������� ���."}, + {24, 253, L"����������� ���."}, + {24, 254, L"��������������� ���."}, + {24, 257, L"������������� ���."}, + {24, 258, L"���������� ���."}, + {24, 260, L"������������ ���."}, + {24, 261, L"��������� ���."}, + {24, 259, L"�������� ��"}, + {24, 265, L"�������"}, + {24, 263, L"���������� �����"}, + {24, 273, L"����"}, + {24, 275, L"�������"}, + {24, 264, L"��������� ����"}, + {24, 268, L"������������ ����"}, + {24, 266, L"��������� ���."}, + {24, 267, L"����������� ���."}, + {24, 269, L"������������� ���."}, + {24, 270, L"������ ���."}, + {24, 272, L"������� ���."}, + {24, 276, L"��������� ���."}, + {24, 262, L"�������� ��������� ��"}, + {24, 271, L"���������� ��"}, + {24, 274, L"����-��������� ��������� ��"}, + {24, 277, L"����������� ��"}, + {24, 278, L"���������� ���."}, + {24, 279, L"������������ ���."}, + {24, 280, L"��������� ���."}, + {24, 282, L"����������� ���."}, + {24, 281, L"�����-���������� �� - ����"}, + {24, 283, L"�����-�������� ��"}, + {24, 284, L"������������ ���."}, + {24, 285, L"�������� ���."}, + {24, 286, L"������������ ���."}, + {24, 287, L"����������� ���."}, + {24, 288, L"���������� ���."}, + {24, 289, L"��������� ���."}, + {24, 290, L"����������� ���."}, + {24, 291, L"������� ���."}, + {24, 292, L"�������� ���."}, + {24, 293, L"���������� ���."}, + {24, 294, L"��������� ���."}, + {24, 295, L"��������� ���."}, + {24, 296, L"���������� ���."}, + {24, 297, L"���������� ���."}, + {24, 298, L"�������� ���."}, + {24, 299, L"�������� ���."}, + {24, 300, L"����������� ���."}, + {24, 301, L"������"}, + {24, 304, L"��������"}, + {24, 305, L"���������"}, + {24, 306, L"���������-��������"}, + {24, 307, L"��������"}, + {24, 308, L"���������-���������"}, + {24, 311, L"�������� ������ - ������"}, + {24, 313, L"�����"}, + {24, 309, L"������������� ����"}, + {24, 312, L"�������������� ����"}, + {24, 302, L"������������ ���."}, + {24, 303, L"������������� ���."}, + {24, 310, L"���������� ���."}, + {81, 1055, L"����"}, + {81, 1058, L"������"}, + {81, 1056, L"����������"}, + {81, 1057, L"��������"}, + {81, 3153, L"����"}, {81, 2291, lpwszOther}, - {82, 2932, _T("������")}, - {82, 1060, _T("�������")}, - {82, 3084, _T("��������")}, - {82, 3011, _T("�����")}, - {82, 3306, _T("�������")}, - {82, 1059, _T("������")}, - {82, 3145, _T("��������")}, + {82, 2932, L"������"}, + {82, 1060, L"�������"}, + {82, 3084, L"��������"}, + {82, 3011, L"�����"}, + {82, 3306, L"�������"}, + {82, 1059, L"������"}, + {82, 3145, L"��������"}, {82, 2292, lpwszOther}, - {97, 1061, _T("�����")}, + {97, 1061, L"�����"}, {97, 2293, lpwszOther}, - {96, 1062, _T("�����")}, + {96, 1062, L"�����"}, {96, 2294, lpwszOther}, - {99, 1063, _T("������")}, + {99, 1063, L"������"}, {99, 2295, lpwszOther}, - {100, 1064, _T("������-����-�������")}, + {100, 1064, L"������-����-�������"}, {100, 2296, lpwszOther}, - {101, 1065, _T("�������")}, + {101, 1065, L"�������"}, {101, 2297, lpwszOther}, - {102, 1066, _T("�����")}, + {102, 1066, L"�����"}, {102, 2298, lpwszOther}, - {83, 1067, _T("������")}, - {83, 3158, _T("�������")}, - {83, 1068, _T("����")}, - {83, 3129, _T("�������")}, - {83, 1069, _T("������")}, - {83, 1070, _T("�������")}, + {83, 1067, L"������"}, + {83, 3158, L"�������"}, + {83, 1068, L"����"}, + {83, 3129, L"�������"}, + {83, 1069, L"������"}, + {83, 1070, L"�������"}, {83, 2299, lpwszOther}, - {86, 3345, _T("������")}, - {86, 1071, _T("�����")}, - {86, 2992, _T("�����")}, - {86, 3175, _T("�������")}, - {86, 3363, _T("���-��")}, - {86, 2884, _T("����-����")}, - {86, 3243, _T("����-�����")}, - {86, 1074, _T("����-����")}, - {86, 3348, _T("��������")}, - {86, 3241, _T("������")}, - {86, 1075, _T("���������")}, - {86, 3350, _T("�������-�����")}, - {86, 2982, _T("��������")}, - {86, 2971, _T("����-����")}, - {86, 3136, _T("�������")}, - {86, 1080, _T("�������")}, - {86, 3303, _T("������")}, - {86, 3050, _T("�������")}, - {86, 3151, _T("����� ���")}, - {86, 3141, _T("�������")}, - {86, 3012, _T("����� �� ����")}, - {86, 1081, _T("������")}, - {86, 1077, _T("����-����")}, - {86, 1079, _T("������")}, - {86, 1078, _T("�����")}, - {86, 1076, _T("������")}, - {86, 2929, _T("����")}, - {86, 2928, _T("�����")}, + {86, 3345, L"������"}, + {86, 1071, L"�����"}, + {86, 2992, L"�����"}, + {86, 3175, L"�������"}, + {86, 3363, L"���-��"}, + {86, 2884, L"����-����"}, + {86, 3243, L"����-�����"}, + {86, 1074, L"����-����"}, + {86, 3348, L"��������"}, + {86, 3241, L"������"}, + {86, 1075, L"���������"}, + {86, 3350, L"�������-�����"}, + {86, 2982, L"��������"}, + {86, 2971, L"����-����"}, + {86, 3136, L"�������"}, + {86, 1080, L"�������"}, + {86, 3303, L"������"}, + {86, 3050, L"�������"}, + {86, 3151, L"����� ���"}, + {86, 3141, L"�������"}, + {86, 3012, L"����� �� ����"}, + {86, 1081, L"������"}, + {86, 1077, L"����-����"}, + {86, 1079, L"������"}, + {86, 1078, L"�����"}, + {86, 1076, L"������"}, + {86, 2929, L"����"}, + {86, 2928, L"�����"}, {86, 2300, lpwszOther}, - {95, 3315, _T("��������")}, - {95, 1082, _T("����")}, - {95, 1083, _T("�������")}, - {95, 3144, _T("���������")}, - {95, 3025, _T("������")}, - {95, 3277, _T("�������")}, - {95, 1084, _T("������")}, + {95, 3315, L"��������"}, + {95, 1082, L"����"}, + {95, 1083, L"�������"}, + {95, 3144, L"���������"}, + {95, 3025, L"������"}, + {95, 3277, L"�������"}, + {95, 1084, L"������"}, {95, 2301, lpwszOther}, - {103, 1085, _T("��������")}, + {103, 1085, L"��������"}, {103, 2302, lpwszOther}, - {79, 1086, _T("�����")}, + {79, 1086, L"�����"}, {79, 2303, lpwszOther}, - {85, 1087, _T("������")}, + {85, 1087, L"������"}, {85, 2304, lpwszOther}, - {87, 1088, _T("�������")}, + {87, 1088, L"�������"}, {87, 2305, lpwszOther}, - {104, 1089, _T("����")}, + {104, 1089, L"����"}, {104, 2306, lpwszOther}, - {84, 1090, _T("�����")}, - {84, 1091, _T("���������")}, - {84, 1092, _T("����-���")}, - {84, 3242, _T("������")}, - {84, 1093, _T("������")}, - {84, 1094, _T("������ (������)")}, - {84, 1095, _T("��������")}, - {84, 3245, _T("������")}, - {84, 3083, _T("���������")}, - {84, 1096, _T("��������")}, - {84, 1097, _T("���������")}, - {84, 1098, _T("��������")}, - {84, 1099, _T("��������")}, - {84, 2868, _T("���������")}, - {84, 1100, _T("��������")}, - {84, 1101, _T("������������� (���.-���. ���.)")}, - {84, 1102, _T("������")}, - {84, 1103, _T("�������������")}, - {84, 1104, _T("�����������")}, - {84, 3166, _T("������")}, - {84, 1105, _T("�����-������")}, - {84, 2927, _T("�����")}, - {84, 1106, _T("��������")}, - {84, 1107, _T("�������")}, - {84, 1108, _T("����-�����������")}, - {84, 1109, _T("�������")}, - {84, 1110, _T("���������")}, + {84, 1090, L"�����"}, + {84, 1091, L"���������"}, + {84, 1092, L"����-���"}, + {84, 3242, L"������"}, + {84, 1093, L"������"}, + {84, 1094, L"������ (������)"}, + {84, 1095, L"��������"}, + {84, 3245, L"������"}, + {84, 3083, L"���������"}, + {84, 1096, L"��������"}, + {84, 1097, L"���������"}, + {84, 1098, L"��������"}, + {84, 1099, L"��������"}, + {84, 2868, L"���������"}, + {84, 1100, L"��������"}, + {84, 1101, L"������������� (���.-���. ���.)"}, + {84, 1102, L"������"}, + {84, 1103, L"�������������"}, + {84, 1104, L"�����������"}, + {84, 3166, L"������"}, + {84, 1105, L"�����-������"}, + {84, 2927, L"�����"}, + {84, 1106, L"��������"}, + {84, 1107, L"�������"}, + {84, 1108, L"����-�����������"}, + {84, 1109, L"�������"}, + {84, 1110, L"���������"}, {84, 2307, lpwszOther}, - {105, 1111, _T("��������")}, + {105, 1111, L"��������"}, {105, 2308, lpwszOther}, - {106, 1112, _T("����")}, + {106, 1112, L"����"}, {106, 2309, lpwszOther}, - {107, 1113, _T("�������")}, - {107, 1114, _T("��������")}, - {107, 1115, _T("�������")}, - {107, 2954, _T("�����")}, + {107, 1113, L"�������"}, + {107, 1114, L"��������"}, + {107, 1115, L"�������"}, + {107, 2954, L"�����"}, {107, 2310, lpwszOther}, - {92, 1116, _T("������")}, - {92, 1117, _T("������-����")}, - {92, 3027, _T("����-�����")}, - {92, 1118, _T("�������")}, - {92, 1119, _T("��")}, - {92, 1120, _T("�����")}, - {92, 2933, _T("���������")}, + {92, 1116, L"������"}, + {92, 1117, L"������-����"}, + {92, 3027, L"����-�����"}, + {92, 1118, L"�������"}, + {92, 1119, L"��"}, + {92, 1120, L"�����"}, + {92, 2933, L"���������"}, {92, 2311, lpwszOther}, - {76, 3214, _T("������ (�����)")}, - {76, 1121, _T("�������")}, - {76, 2869, _T("��������")}, - {76, 3262, _T("������")}, - {76, 1122, _T("�����")}, - {76, 1123, _T("������")}, - {76, 1124, _T("������")}, - {76, 3043, _T("������")}, + {76, 3214, L"������ (�����)"}, + {76, 1121, L"�������"}, + {76, 2869, L"��������"}, + {76, 3262, L"������"}, + {76, 1122, L"�����"}, + {76, 1123, L"������"}, + {76, 1124, L"������"}, + {76, 3043, L"������"}, {76, 2312, lpwszOther}, - {29, 1125, _T("�������")}, + {29, 1125, L"�������"}, {29, 2313, lpwszOther}, - {108, 1126, _T("����")}, - {108, 3240, _T("�������")}, + {108, 1126, L"����"}, + {108, 3240, L"�������"}, {108, 2314, lpwszOther}, - {88, 1127, _T("���-������")}, + {88, 1127, L"���-������"}, {88, 2315, lpwszOther}, - {109, 1128, _T("��������")}, + {109, 1128, L"��������"}, {109, 2316, lpwszOther}, - {110, 1129, _T("������")}, + {110, 1129, L"������"}, {110, 2317, lpwszOther}, - {111, 1130, _T("������-����")}, - {111, 1131, _T("�����-������")}, + {111, 1130, L"������-����"}, + {111, 1131, L"�����-������"}, {111, 2318, lpwszOther}, - {112, 1132, _T("����")}, + {112, 1132, L"����"}, {112, 2319, lpwszOther}, - {113, 1133, _T("����-�����")}, - {113, 1134, _T("�������")}, + {113, 1133, L"����-�����"}, + {113, 1134, L"�������"}, {113, 2320, lpwszOther}, - {114, 1135, _T("�����")}, + {114, 1135, L"�����"}, {114, 2321, lpwszOther}, - {115, 1136, _T("��������")}, + {115, 1136, L"��������"}, {115, 2322, lpwszOther}, - {116, 1137, _T("���-����")}, - {116, 1138, _T("�����")}, - {116, 1139, _T("������")}, + {116, 1137, L"���-����"}, + {116, 1138, L"�����"}, + {116, 1139, L"������"}, {116, 2323, lpwszOther}, - {117, 1140, _T("������")}, + {117, 1140, L"������"}, {117, 2324, lpwszOther}, - {122, 1141, _T("���������")}, + {122, 1141, L"���������"}, {122, 2325, lpwszOther}, - {89, 1072, _T("�����")}, - {89, 1073, _T("�������")}, - {89, 1142, _T("����")}, + {89, 1072, L"�����"}, + {89, 1073, L"�������"}, + {89, 1142, L"����"}, {89, 2326, lpwszOther}, - {94, 3250, _T("������")}, - {94, 1143, _T("��-����")}, + {94, 3250, L"������"}, + {94, 1143, L"��-����"}, {94, 2327, lpwszOther}, - {78, 1144, _T("������")}, + {78, 1144, L"������"}, {78, 2328, lpwszOther}, - {91, 1145, _T("�������")}, - {91, 3307, _T("���������")}, - {91, 3308, _T("�������")}, + {91, 1145, L"�������"}, + {91, 3307, L"���������"}, + {91, 3308, L"�������"}, {91, 2329, lpwszOther}, - {119, 1146, _T("�������")}, - {119, 1147, _T("������")}, + {119, 1146, L"�������"}, + {119, 1147, L"������"}, {119, 2330, lpwszOther}, - {120, 1148, _T("������")}, + {120, 1148, L"������"}, {120, 2331, lpwszOther}, - {132, 1149, _T("����")}, + {132, 1149, L"����"}, {132, 2332, lpwszOther}, - {90, 1150, _T("�������")}, - {90, 3079, _T("�������")}, + {90, 1150, L"�������"}, + {90, 3079, L"�������"}, {90, 2333, lpwszOther}, - {77, 1152, _T("������")}, - {77, 1153, _T("�������")}, - {77, 3080, _T("�����")}, - {77, 1151, _T("��������")}, - {77, 1154, _T("�������")}, - {77, 1155, _T("�������")}, + {77, 1152, L"������"}, + {77, 1153, L"�������"}, + {77, 3080, L"�����"}, + {77, 1151, L"��������"}, + {77, 1154, L"�������"}, + {77, 1155, L"�������"}, {77, 2334, lpwszOther}, - {93, 3362, _T("�������")}, - {93, 3137, _T("�������")}, - {93, 3273, _T("�����")}, - {93, 1156, _T("���������")}, - {93, 1157, _T("������")}, - {93, 3167, _T("������")}, - {93, 3347, _T("�������")}, - {93, 1158, _T("�����")}, - {93, 1159, _T("��������")}, - {93, 1160, _T("���������")}, - {93, 1161, _T("�������")}, - {93, 1162, _T("������")}, - {93, 1163, _T("�������")}, - {93, 1164, _T("������")}, + {93, 3362, L"�������"}, + {93, 3137, L"�������"}, + {93, 3273, L"�����"}, + {93, 1156, L"���������"}, + {93, 1157, L"������"}, + {93, 3167, L"������"}, + {93, 3347, L"�������"}, + {93, 1158, L"�����"}, + {93, 1159, L"��������"}, + {93, 1160, L"���������"}, + {93, 1161, L"�������"}, + {93, 1162, L"������"}, + {93, 1163, L"�������"}, + {93, 1164, L"������"}, {93, 2335, lpwszOther}, - {121, 1165, _T("������")}, - {121, 3319, _T("����")}, + {121, 1165, L"������"}, + {121, 3319, L"����"}, {121, 2336, lpwszOther}, - {98, 1166, _T("�������")}, + {98, 1166, L"�������"}, {98, 2337, lpwszOther}, - {75, 3176, _T("�������")}, - {75, 3339, _T("�������")}, - {75, 1167, _T("�������")}, - {75, 1168, _T("�����")}, + {75, 3176, L"�������"}, + {75, 3339, L"�������"}, + {75, 1167, L"�������"}, + {75, 1168, L"�����"}, {75, 2338, lpwszOther}, - {123, 1914, _T("��������")}, - {123, 2957, _T("���� ���")}, - {123, 1915, _T("�������")}, - {123, 3331, _T("�������")}, - {123, 1916, _T("��������")}, - {123, 3001, _T("�������")}, - {123, 1917, _T("��������")}, - {123, 3217, _T("�������")}, - {123, 3064, _T("����")}, - {123, 3020, _T("����� �����")}, - {123, 1918, _T("������")}, - {123, 3238, _T("�������")}, + {123, 1914, L"��������"}, + {123, 2957, L"���� ���"}, + {123, 1915, L"�������"}, + {123, 3331, L"�������"}, + {123, 1916, L"��������"}, + {123, 3001, L"�������"}, + {123, 1917, L"��������"}, + {123, 3217, L"�������"}, + {123, 3064, L"����"}, + {123, 3020, L"����� �����"}, + {123, 1918, L"������"}, + {123, 3238, L"�������"}, {123, 2339, lpwszOther}, - {454, 1192, _T("����-����")}, + {454, 1192, L"����-����"}, {454, 2366, lpwszOther}, - {124, 1919, _T("����-����")}, + {124, 1919, L"����-����"}, {124, 2340, lpwszOther}, - {453, 1193, _T("������")}, + {453, 1193, L"������"}, {453, 2368, lpwszOther}, - {126, 1921, _T("�������")}, + {126, 1921, L"�������"}, {126, 2342, lpwszOther}, - {127, 1922, _T("�������")}, + {127, 1922, L"�������"}, {127, 2343, lpwszOther}, - {128, 1923, _T("�������")}, + {128, 1923, L"�������"}, {128, 2344, lpwszOther}, - {129, 1924, _T("����")}, + {129, 1924, L"����"}, {129, 2345, lpwszOther}, - {130, 1925, _T("����������")}, - {130, 1926, _T("���������")}, - {130, 1928, _T("�������")}, - {130, 1929, _T("����������")}, - {130, 3235, _T("��������")}, - {130, 1927, _T("������")}, - {130, 3323, _T("��������")}, + {130, 1925, L"����������"}, + {130, 1926, L"���������"}, + {130, 1928, L"�������"}, + {130, 1929, L"����������"}, + {130, 3235, L"��������"}, + {130, 1927, L"������"}, + {130, 3323, L"��������"}, {130, 2346, lpwszOther}, - {131, 1930, _T("�����")}, + {131, 1930, L"�����"}, {131, 2347, lpwszOther}, - {133, 1931, _T("����-������")}, + {133, 1931, L"����-������"}, {133, 2348, lpwszOther}, - {125, 1920, _T("����")}, + {125, 1920, L"����"}, {125, 2341, lpwszOther}, - {134, 1932, _T("�������")}, + {134, 1932, L"�������"}, {134, 2349, lpwszOther}, - {135, 1933, _T("���������")}, + {135, 1933, L"���������"}, {135, 2350, lpwszOther}, - {136, 1934, _T("��������")}, + {136, 1934, L"��������"}, {136, 2351, lpwszOther}, - {137, 1935, _T("����")}, + {137, 1935, L"����"}, {137, 2352, lpwszOther}, - {138, 3055, _T("����������")}, - {138, 3049, _T("��������")}, - {138, 3330, _T("�������")}, - {138, 1169, _T("��������")}, - {138, 3106, _T("��������")}, - {138, 1170, _T("��������")}, - {138, 1171, _T("��������")}, - {138, 1172, _T("���������")}, - {138, 3365, _T("������")}, - {138, 1173, _T("�������")}, - {138, 3104, _T("�������")}, - {138, 3366, _T("����������")}, - {138, 1174, _T("������")}, - {138, 2964, _T("��������")}, - {138, 3113, _T("���������")}, - {138, 1175, _T("��������")}, - {138, 2920, _T("�������-����")}, - {138, 2889, _T("����-����")}, - {138, 1176, _T("������")}, - {138, 2903, _T("���� �������")}, - {138, 1177, _T("�������")}, - {138, 1178, _T("�������")}, - {138, 2946, _T("��������")}, - {138, 1179, _T("�������")}, - {138, 1180, _T("��������")}, + {138, 3055, L"����������"}, + {138, 3049, L"��������"}, + {138, 3330, L"�������"}, + {138, 1169, L"��������"}, + {138, 3106, L"��������"}, + {138, 1170, L"��������"}, + {138, 1171, L"��������"}, + {138, 1172, L"���������"}, + {138, 3365, L"������"}, + {138, 1173, L"�������"}, + {138, 3104, L"�������"}, + {138, 3366, L"����������"}, + {138, 1174, L"������"}, + {138, 2964, L"��������"}, + {138, 3113, L"���������"}, + {138, 1175, L"��������"}, + {138, 2920, L"�������-����"}, + {138, 2889, L"����-����"}, + {138, 1176, L"������"}, + {138, 2903, L"���� �������"}, + {138, 1177, L"�������"}, + {138, 1178, L"�������"}, + {138, 2946, L"��������"}, + {138, 1179, L"�������"}, + {138, 1180, L"��������"}, {138, 2353, lpwszOther}, - {139, 407, _T("���������")}, - {139, 426, _T("������")}, - {139, 378, _T("�����")}, - {139, 412, _T("�������")}, - {139, 446, _T("������")}, - {139, 434, _T("�������")}, - {139, 416, _T("��������")}, - {139, 428, _T("��������")}, - {139, 440, _T("���������")}, - {139, 352, _T("�������")}, - {139, 394, _T("��������")}, - {139, 374, _T("���������")}, - {139, 448, _T("������")}, - {139, 390, _T("�������")}, - {139, 402, _T("��������")}, - {139, 396, _T("�������� ��������")}, - {139, 370, _T("��������")}, - {139, 368, _T("�������")}, - {139, 444, _T("����������")}, - {139, 388, _T("������")}, - {139, 408, _T("��������")}, - {139, 430, _T("��������")}, - {139, 358, _T("�����������")}, - {139, 418, _T("��������")}, - {139, 354, _T("�����������")}, - {139, 376, _T("���������")}, - {139, 414, _T("���������")}, - {139, 380, _T("�������")}, - {139, 372, _T("�������")}, - {139, 424, _T("�������")}, - {139, 348, _T("���")}, - {139, 392, _T("��������")}, - {139, 386, _T("��������")}, - {139, 438, _T("������")}, - {139, 362, _T("���-������")}, - {139, 360, _T("���-����")}, - {139, 432, _T("���-�������")}, - {139, 350, _T("���-�������")}, - {139, 366, _T("�����")}, - {139, 420, _T("��������")}, - {139, 442, _T("������")}, - {139, 364, _T("������������")}, - {139, 450, _T("������-����")}, - {139, 356, _T("���-������")}, - {139, 382, _T("�������� ������")}, - {139, 398, _T("�������� ��������")}, - {139, 410, _T("��������")}, - {139, 422, _T("�����")}, - {139, 406, _T("����������� ����� ��������")}, - {139, 404, _T("�������")}, - {139, 384, _T("����� ������")}, - {139, 400, _T("����� ��������")}, - {139, 436, _T("���")}, - {140, 1238, _T("����-�����")}, + {139, 407, L"���������"}, + {139, 426, L"������"}, + {139, 378, L"�����"}, + {139, 412, L"�������"}, + {139, 446, L"������"}, + {139, 434, L"�������"}, + {139, 416, L"��������"}, + {139, 428, L"��������"}, + {139, 440, L"���������"}, + {139, 352, L"�������"}, + {139, 394, L"��������"}, + {139, 374, L"���������"}, + {139, 448, L"������"}, + {139, 390, L"�������"}, + {139, 402, L"��������"}, + {139, 396, L"�������� ��������"}, + {139, 370, L"��������"}, + {139, 368, L"�������"}, + {139, 444, L"����������"}, + {139, 388, L"������"}, + {139, 408, L"��������"}, + {139, 430, L"��������"}, + {139, 358, L"�����������"}, + {139, 418, L"��������"}, + {139, 354, L"�����������"}, + {139, 376, L"���������"}, + {139, 414, L"���������"}, + {139, 380, L"�������"}, + {139, 372, L"�������"}, + {139, 424, L"�������"}, + {139, 348, L"���"}, + {139, 392, L"��������"}, + {139, 386, L"��������"}, + {139, 438, L"������"}, + {139, 362, L"���-������"}, + {139, 360, L"���-����"}, + {139, 432, L"���-�������"}, + {139, 350, L"���-�������"}, + {139, 366, L"�����"}, + {139, 420, L"��������"}, + {139, 442, L"������"}, + {139, 364, L"������������"}, + {139, 450, L"������-����"}, + {139, 356, L"���-������"}, + {139, 382, L"�������� ������"}, + {139, 398, L"�������� ��������"}, + {139, 410, L"��������"}, + {139, 422, L"�����"}, + {139, 406, L"����������� ����� ��������"}, + {139, 404, L"�������"}, + {139, 384, L"����� ������"}, + {139, 400, L"����� ��������"}, + {139, 436, L"���"}, + {140, 1238, L"����-�����"}, {140, 2442, lpwszOther}, - {141, 1239, _T("������-�����")}, + {141, 1239, L"������-�����"}, {141, 2441, lpwszOther}, - {142, 1240, _T("������")}, + {142, 1240, L"������"}, {142, 2440, lpwszOther}, - {143, 1241, _T("���������")}, + {143, 1241, L"���������"}, {143, 2439, lpwszOther}, - {146, 1242, _T("���������")}, + {146, 1242, L"���������"}, {146, 2438, lpwszOther}, - {144, 1243, _T("��-���")}, + {144, 1243, L"��-���"}, {144, 2437, lpwszOther}, - {145, 1244, _T("��������")}, - {145, 3094, _T("����� �����")}, - {145, 1245, _T("���-��-�������")}, - {145, 1246, _T("���-�����")}, + {145, 1244, L"��������"}, + {145, 3094, L"����� �����"}, + {145, 1245, L"���-��-�������"}, + {145, 1246, L"���-�����"}, {145, 2436, lpwszOther}, - {147, 1247, _T("�������")}, + {147, 1247, L"�������"}, {147, 2435, lpwszOther}, - {452, 1190, _T("��������-������")}, + {452, 1190, L"��������-������"}, {452, 2364, lpwszOther}, - {149, 1248, _T("����-�-�����")}, + {149, 1248, L"����-�-�����"}, {149, 2434, lpwszOther}, - {148, 1249, _T("���������")}, + {148, 1249, L"���������"}, {148, 2433, lpwszOther}, - {173, 1250, _T("���������")}, + {173, 1250, L"���������"}, {173, 2432, lpwszOther}, - {150, 1251, _T("������������")}, + {150, 1251, L"������������"}, {150, 2431, lpwszOther}, - {151, 1252, _T("����-��������")}, + {151, 1252, L"����-��������"}, {151, 2430, lpwszOther}, - {152, 1253, _T("������")}, + {152, 1253, L"������"}, {152, 2429, lpwszOther}, - {153, 1254, _T("����")}, + {153, 1254, L"����"}, {153, 2428, lpwszOther}, - {154, 1255, _T("�����-�������")}, + {154, 1255, L"�����-�������"}, {154, 2427, lpwszOther}, - {155, 1256, _T("������")}, + {155, 1256, L"������"}, {155, 2426, lpwszOther}, - {156, 1257, _T("���-����")}, + {156, 1257, L"���-����"}, {156, 2425, lpwszOther}, - {157, 1258, _T("������")}, + {157, 1258, L"������"}, {157, 2424, lpwszOther}, - {158, 1259, _T("���������")}, - {158, 1260, _T("������")}, + {158, 1259, L"���������"}, + {158, 1260, L"������"}, {158, 2423, lpwszOther}, - {159, 1261, _T("�������")}, + {159, 1261, L"�������"}, {159, 2422, lpwszOther}, - {160, 1262, _T("������")}, + {160, 1262, L"������"}, {160, 2421, lpwszOther}, - {161, 1263, _T("��������")}, + {161, 1263, L"��������"}, {161, 2420, lpwszOther}, - {162, 1264, _T("����")}, + {162, 1264, L"����"}, {162, 2419, lpwszOther}, - {163, 1265, _T("���-���������")}, + {163, 1265, L"���-���������"}, {163, 2418, lpwszOther}, - {164, 1266, _T("���������")}, + {164, 1266, L"���������"}, {164, 2417, lpwszOther}, - {165, 1267, _T("������")}, + {165, 1267, L"������"}, {165, 2416, lpwszOther}, - {166, 1268, _T("������")}, + {166, 1268, L"������"}, {166, 2415, lpwszOther}, - {167, 1269, _T("����������")}, + {167, 1269, L"����������"}, {167, 2414, lpwszOther}, - {168, 1270, _T("����-��-�����")}, + {168, 1270, L"����-��-�����"}, {168, 2413, lpwszOther}, - {169, 1271, _T("����������")}, + {169, 1271, L"����������"}, {169, 2412, lpwszOther}, - {170, 1272, _T("��������")}, + {170, 1272, L"��������"}, {170, 2411, lpwszOther}, - {171, 1273, _T("��������")}, - {171, 1274, _T("����")}, + {171, 1273, L"��������"}, + {171, 1274, L"����"}, {171, 2410, lpwszOther}, - {172, 1275, _T("��������")}, + {172, 1275, L"��������"}, {172, 2409, lpwszOther}, - {174, 1854, _T("�����")}, + {174, 1854, L"�����"}, {174, 2495, lpwszOther}, - {175, 1855, _T("������")}, + {175, 1855, L"������"}, {175, 2494, lpwszOther}, - {176, 1856, _T("������")}, - {176, 1857, _T("�����-����")}, + {176, 1856, L"������"}, + {176, 1857, L"�����-����"}, {176, 2493, lpwszOther}, - {177, 1858, _T("��������")}, + {177, 1858, L"��������"}, {177, 2492, lpwszOther}, - {178, 1859, _T("��������")}, + {178, 1859, L"��������"}, {178, 2491, lpwszOther}, - {179, 1860, _T("���������")}, + {179, 1860, L"���������"}, {179, 2490, lpwszOther}, - {180, 1861, _T("���������")}, + {180, 1861, L"���������"}, {180, 2489, lpwszOther}, - {181, 1862, _T("������")}, + {181, 1862, L"������"}, {181, 2488, lpwszOther}, - {182, 1863, _T("�����")}, + {182, 1863, L"�����"}, {182, 2487, lpwszOther}, - {183, 1864, _T("�������")}, + {183, 1864, L"�������"}, {183, 2486, lpwszOther}, - {184, 1865, _T("�����")}, + {184, 1865, L"�����"}, {184, 2485, lpwszOther}, - {185, 1866, _T("�������")}, + {185, 1866, L"�������"}, {185, 2484, lpwszOther}, - {186, 3312, _T("�����")}, - {186, 1867, _T("����")}, - {186, 1868, _T("�������")}, + {186, 3312, L"�����"}, + {186, 1867, L"����"}, + {186, 1868, L"�������"}, {186, 2483, lpwszOther}, - {187, 1869, _T("������")}, + {187, 1869, L"������"}, {187, 2482, lpwszOther}, - {23, 1870, _T("������")}, + {23, 1870, L"������"}, {23, 2481, lpwszOther}, - {188, 1871, _T("����")}, + {188, 1871, L"����"}, {188, 2480, lpwszOther}, - {189, 1872, _T("�����")}, + {189, 1872, L"�����"}, {189, 2479, lpwszOther}, - {190, 1873, _T("�������")}, + {190, 1873, L"�������"}, {190, 2478, lpwszOther}, - {191, 1874, _T("������")}, + {191, 1874, L"������"}, {191, 2477, lpwszOther}, - {193, 1875, _T("�������")}, + {193, 1875, L"�������"}, {193, 2476, lpwszOther}, - {192, 1876, _T("����������")}, + {192, 1876, L"����������"}, {192, 2475, lpwszOther}, - {194, 1877, _T("��������")}, + {194, 1877, L"��������"}, {194, 2474, lpwszOther}, - {195, 1878, _T("������")}, + {195, 1878, L"������"}, {195, 2473, lpwszOther}, - {196, 1879, _T("��������")}, + {196, 1879, L"��������"}, {196, 2472, lpwszOther}, - {197, 1880, _T("�������")}, + {197, 1880, L"�������"}, {197, 2471, lpwszOther}, - {198, 1881, _T("����-���")}, + {198, 1881, L"����-���"}, {198, 2470, lpwszOther}, - {199, 1882, _T("�������")}, + {199, 1882, L"�������"}, {199, 2469, lpwszOther}, - {200, 1883, _T("������������")}, + {200, 1883, L"������������"}, {200, 2468, lpwszOther}, - {201, 1884, _T("��������")}, + {201, 1884, L"��������"}, {201, 2467, lpwszOther}, - {202, 1885, _T("������")}, + {202, 1885, L"������"}, {202, 2466, lpwszOther}, - {203, 1886, _T("������")}, - {203, 1887, _T("�����")}, + {203, 1886, L"������"}, + {203, 1887, L"�����"}, {203, 2465, lpwszOther}, - {204, 1888, _T("������")}, + {204, 1888, L"������"}, {204, 2464, lpwszOther}, - {205, 1889, _T("�������")}, + {205, 1889, L"�������"}, {205, 2463, lpwszOther}, - {206, 1890, _T("������")}, + {206, 1890, L"������"}, {206, 2462, lpwszOther}, - {207, 1891, _T("������")}, + {207, 1891, L"������"}, {207, 2461, lpwszOther}, - {208, 1892, _T("������")}, + {208, 1892, L"������"}, {208, 2460, lpwszOther}, - {209, 1893, _T("���-����")}, + {209, 1893, L"���-����"}, {209, 2459, lpwszOther}, - {210, 1894, _T("�������")}, + {210, 1894, L"�������"}, {210, 2458, lpwszOther}, - {211, 1895, _T("��������")}, + {211, 1895, L"��������"}, {211, 2457, lpwszOther}, - {212, 1896, _T("�����")}, + {212, 1896, L"�����"}, {212, 2456, lpwszOther}, - {213, 1897, _T("��������")}, + {213, 1897, L"��������"}, {213, 2455, lpwszOther}, - {214, 1898, _T("������")}, + {214, 1898, L"������"}, {214, 2454, lpwszOther}, - {215, 1899, _T("�������")}, + {215, 1899, L"�������"}, {215, 2453, lpwszOther}, - {216, 1900, _T("���-��-�����")}, - {216, 1901, _T("������")}, + {216, 1900, L"���-��-�����"}, + {216, 1901, L"������"}, {216, 2452, lpwszOther}, - {217, 1902, _T("����")}, + {217, 1902, L"����"}, {217, 2451, lpwszOther}, - {218, 1903, _T("�����")}, + {218, 1903, L"�����"}, {218, 2450, lpwszOther}, - {219, 1904, _T("�������")}, + {219, 1904, L"�������"}, {219, 2449, lpwszOther}, - {220, 1905, _T("�����")}, + {220, 1905, L"�����"}, {220, 2448, lpwszOther}, - {222, 1906, _T("��������")}, + {222, 1906, L"��������"}, {222, 2447, lpwszOther}, - {223, 1907, _T("������")}, + {223, 1907, L"������"}, {223, 2446, lpwszOther}, - {221, 1908, _T("������")}, + {221, 1908, L"������"}, {221, 2445, lpwszOther}, - {224, 1909, _T("�����-�����")}, + {224, 1909, L"�����-�����"}, {224, 2444, lpwszOther}, - {225, 1910, _T("������")}, - {225, 1913, _T("������������")}, - {225, 1912, _T("��������")}, - {225, 3033, _T("��������")}, - {225, 1911, _T("��������")}, + {225, 1910, L"������"}, + {225, 1913, L"������������"}, + {225, 1912, L"��������"}, + {225, 3033, L"��������"}, + {225, 1911, L"��������"}, {225, 2443, lpwszOther}, - {39, 314, _T("����")}, - {39, 315, _T("��������� ���.")}, - {39, 316, _T("��������� ���.")}, - {39, 317, _T("���������������� ���.")}, - {39, 318, _T("�������� ���.")}, - {39, 319, _T("����������� ���.")}, - {39, 320, _T("������������ ���.")}, - {39, 321, _T("����������� ���.")}, - {39, 322, _T("�����-����������� ���.")}, - {39, 323, _T("�������� ���.")}, - {39, 324, _T("�������������� ���.")}, - {39, 325, _T("����")}, - {39, 326, _T("��������� ���.")}, - {39, 327, _T("��������� ���.")}, - {39, 328, _T("������������ ���.")}, - {39, 329, _T("�������� ���.")}, - {39, 330, _T("���������� ���.")}, - {39, 331, _T("��������� ���.")}, - {39, 332, _T("������� ���.")}, - {39, 333, _T("������������� ���.")}, - {39, 334, _T("����������� ���.")}, - {39, 335, _T("���������� ���.")}, - {39, 336, _T("����������� ���.")}, - {39, 337, _T("���������� ���.")}, - {39, 338, _T("������������ ���.")}, - {39, 339, _T("����������� ���.")}, - {40, 602, _T("��� ����")}, - {40, 604, _T("�������")}, - {40, 603, _T("����")}, - {40, 608, _T("����")}, - {40, 606, _T("���������")}, - {40, 3099, _T("����-��-���")}, - {40, 605, _T("�������")}, - {40, 3174, _T("��������")}, - {40, 609, _T("����������")}, - {40, 607, _T("����")}, - {40, 610, _T("�����")}, - {40, 611, _T("���������")}, + {39, 314, L"����"}, + {39, 315, L"��������� ���."}, + {39, 316, L"��������� ���."}, + {39, 317, L"���������������� ���."}, + {39, 318, L"�������� ���."}, + {39, 319, L"����������� ���."}, + {39, 320, L"������������ ���."}, + {39, 321, L"����������� ���."}, + {39, 322, L"�����-����������� ���."}, + {39, 323, L"�������� ���."}, + {39, 324, L"�������������� ���."}, + {39, 325, L"����"}, + {39, 326, L"��������� ���."}, + {39, 327, L"��������� ���."}, + {39, 328, L"������������ ���."}, + {39, 329, L"�������� ���."}, + {39, 330, L"���������� ���."}, + {39, 331, L"��������� ���."}, + {39, 332, L"������� ���."}, + {39, 333, L"������������� ���."}, + {39, 334, L"����������� ���."}, + {39, 335, L"���������� ���."}, + {39, 336, L"����������� ���."}, + {39, 337, L"���������� ���."}, + {39, 338, L"������������ ���."}, + {39, 339, L"����������� ���."}, + {40, 602, L"��� ����"}, + {40, 604, L"�������"}, + {40, 603, L"����"}, + {40, 608, L"����"}, + {40, 606, L"���������"}, + {40, 3099, L"����-��-���"}, + {40, 605, L"�������"}, + {40, 3174, L"��������"}, + {40, 609, L"����������"}, + {40, 607, L"����"}, + {40, 610, L"�����"}, + {40, 611, L"���������"}, {40, 2541, lpwszOther}, - {32, 612, _T("������")}, + {32, 612, L"������"}, {32, 2540, lpwszOther}, - {33, 613, _T("�������-��-�����")}, + {33, 613, L"�������-��-�����"}, {33, 2539, lpwszOther}, - {340, 341, _T("�����")}, - {340, 342, _T("��������� ���.")}, - {340, 343, _T("��������� ���.")}, - {340, 344, _T("���������� ���.")}, - {340, 345, _T("����������� ���.")}, - {340, 346, _T("������� ���.")}, - {340, 347, _T("����������� ���.")}, - {38, 760, _T("���������")}, - {38, 767, _T("�����")}, - {38, 762, _T("������")}, - {38, 761, _T("��������")}, - {38, 763, _T("����")}, - {38, 769, _T("�����")}, - {38, 765, _T("����")}, - {38, 764, _T("����")}, - {38, 3117, _T("��������")}, - {38, 766, _T("�����")}, - {38, 768, _T("�������")}, + {340, 341, L"�����"}, + {340, 342, L"��������� ���."}, + {340, 343, L"��������� ���."}, + {340, 344, L"���������� ���."}, + {340, 345, L"����������� ���."}, + {340, 346, L"������� ���."}, + {340, 347, L"����������� ���."}, + {38, 760, L"���������"}, + {38, 767, L"�����"}, + {38, 762, L"������"}, + {38, 761, L"��������"}, + {38, 763, L"����"}, + {38, 769, L"�����"}, + {38, 765, L"����"}, + {38, 764, L"����"}, + {38, 3117, L"��������"}, + {38, 766, L"�����"}, + {38, 768, L"�������"}, {38, 2532, lpwszOther}, - {41, 3098, _T("������")}, - {41, 792, _T("�����������")}, - {41, 770, _T("������")}, - {41, 771, _T("����")}, - {41, 773, _T("�����")}, - {41, 776, _T("������-�������")}, - {41, 788, _T("�����")}, - {41, 789, _T("�����")}, - {41, 796, _T("�������")}, - {41, 777, _T("������������")}, - {41, 781, _T("�������")}, - {41, 786, _T("��������")}, - {41, 791, _T("���������")}, - {41, 793, _T("���������")}, - {41, 795, _T("�����")}, - {41, 787, _T("������������")}, - {41, 790, _T("������")}, - {41, 3133, _T("������")}, - {41, 794, _T("������")}, - {41, 782, _T("�������")}, - {41, 780, _T("�������")}, - {41, 779, _T("����")}, - {41, 774, _T("��������")}, - {41, 784, _T("������")}, - {41, 772, _T("�����")}, - {41, 775, _T("��������")}, - {41, 3116, _T("�������")}, - {41, 785, _T("�������")}, - {41, 778, _T("�����")}, - {41, 783, _T("�����")}, + {41, 3098, L"������"}, + {41, 792, L"�����������"}, + {41, 770, L"������"}, + {41, 771, L"����"}, + {41, 773, L"�����"}, + {41, 776, L"������-�������"}, + {41, 788, L"�����"}, + {41, 789, L"�����"}, + {41, 796, L"�������"}, + {41, 777, L"������������"}, + {41, 781, L"�������"}, + {41, 786, L"��������"}, + {41, 791, L"���������"}, + {41, 793, L"���������"}, + {41, 795, L"�����"}, + {41, 787, L"������������"}, + {41, 790, L"������"}, + {41, 3133, L"������"}, + {41, 794, L"������"}, + {41, 782, L"�������"}, + {41, 780, L"�������"}, + {41, 779, L"����"}, + {41, 774, L"��������"}, + {41, 784, L"������"}, + {41, 772, L"�����"}, + {41, 775, L"��������"}, + {41, 3116, L"�������"}, + {41, 785, L"�������"}, + {41, 778, L"�����"}, + {41, 783, L"�����"}, {41, 2531, lpwszOther}, - {42, 797, _T("����-����")}, - {42, 799, _T("������")}, - {42, 798, _T("�������")}, - {42, 800, _T("�����")}, + {42, 797, L"����-����"}, + {42, 799, L"������"}, + {42, 798, L"�������"}, + {42, 800, L"�����"}, {42, 2530, lpwszOther}, - {45, 802, _T("�������")}, - {45, 3075, _T("��������")}, - {45, 801, _T("������")}, - {45, 804, _T("��������")}, - {45, 803, _T("���������")}, - {45, 805, _T("��������")}, - {45, 3168, _T("������")}, - {45, 806, _T("�������")}, - {45, 807, _T("��������")}, - {45, 808, _T("��������")}, - {45, 809, _T("����������")}, - {45, 3131, _T("����������")}, - {45, 810, _T("��������")}, - {45, 3342, _T("�������")}, - {45, 811, _T("������")}, - {45, 812, _T("�����")}, - {45, 813, _T("�����")}, - {45, 814, _T("������")}, - {45, 3089, _T("������")}, - {45, 815, _T("��������")}, - {45, 816, _T("����������")}, - {45, 817, _T("���������")}, - {45, 818, _T("����")}, - {45, 819, _T("������")}, - {45, 820, _T("���������")}, - {45, 2976, _T("������")}, - {45, 2988, _T("���������")}, - {45, 821, _T("���������")}, - {45, 3088, _T("�������")}, - {45, 822, _T("�������")}, - {45, 823, _T("������")}, - {45, 824, _T("��������")}, - {45, 825, _T("�������")}, - {45, 3343, _T("����")}, - {45, 2867, _T("������")}, - {45, 2986, _T("����-������")}, - {45, 826, _T("��������")}, - {45, 3063, _T("��������")}, - {45, 827, _T("������")}, - {45, 3140, _T("���������")}, - {45, 828, _T("������")}, - {45, 829, _T("�������")}, - {45, 830, _T("��������")}, + {45, 802, L"�������"}, + {45, 3075, L"��������"}, + {45, 801, L"������"}, + {45, 804, L"��������"}, + {45, 803, L"���������"}, + {45, 805, L"��������"}, + {45, 3168, L"������"}, + {45, 806, L"�������"}, + {45, 807, L"��������"}, + {45, 808, L"��������"}, + {45, 809, L"����������"}, + {45, 3131, L"����������"}, + {45, 810, L"��������"}, + {45, 3342, L"�������"}, + {45, 811, L"������"}, + {45, 812, L"�����"}, + {45, 813, L"�����"}, + {45, 814, L"������"}, + {45, 3089, L"������"}, + {45, 815, L"��������"}, + {45, 816, L"����������"}, + {45, 817, L"���������"}, + {45, 818, L"����"}, + {45, 819, L"������"}, + {45, 820, L"���������"}, + {45, 2976, L"������"}, + {45, 2988, L"���������"}, + {45, 821, L"���������"}, + {45, 3088, L"�������"}, + {45, 822, L"�������"}, + {45, 823, L"������"}, + {45, 824, L"��������"}, + {45, 825, L"�������"}, + {45, 3343, L"����"}, + {45, 2867, L"������"}, + {45, 2986, L"����-������"}, + {45, 826, L"��������"}, + {45, 3063, L"��������"}, + {45, 827, L"������"}, + {45, 3140, L"���������"}, + {45, 828, L"������"}, + {45, 829, L"�������"}, + {45, 830, L"��������"}, {45, 2529, lpwszOther}, - {44, 831, _T("��������")}, - {44, 832, _T("�������")}, - {44, 836, _T("��������")}, - {44, 835, _T("��������")}, - {44, 834, _T("�����")}, - {44, 833, _T("������")}, + {44, 831, L"��������"}, + {44, 832, L"�������"}, + {44, 836, L"��������"}, + {44, 835, L"��������"}, + {44, 834, L"�����"}, + {44, 833, L"������"}, {44, 2528, lpwszOther}, - {46, 3007, _T("�����")}, - {46, 837, _T("��������")}, - {46, 838, _T("�����-�����")}, - {46, 3371, _T("�������")}, - {46, 839, _T("������-�������")}, - {46, 840, _T("������")}, - {46, 841, _T("���������")}, - {46, 3163, _T("��������")}, - {46, 842, _T("����")}, - {46, 843, _T("����������")}, - {46, 3015, _T("����������")}, - {46, 844, _T("������")}, - {46, 2921, _T("��������")}, - {46, 845, _T("������")}, - {46, 846, _T("����������")}, - {46, 847, _T("�������")}, - {46, 848, _T("��������")}, - {46, 849, _T("����������")}, - {46, 3010, _T("�����������")}, - {46, 850, _T("����")}, - {46, 851, _T("���������")}, - {46, 3072, _T("������")}, - {46, 852, _T("��������")}, - {46, 853, _T("��������")}, - {46, 854, _T("�������")}, - {46, 855, _T("�����������")}, - {46, 3082, _T("���������")}, - {46, 3309, _T("������")}, - {46, 856, _T("�����")}, - {46, 857, _T("����")}, - {46, 3138, _T("�������")}, - {46, 858, _T("��������")}, - {46, 859, _T("�������")}, - {46, 2872, _T("�������")}, - {46, 2965, _T("������")}, - {46, 3135, _T("�����")}, - {46, 3156, _T("�������")}, - {46, 3192, _T("���������")}, - {46, 860, _T("�������")}, - {46, 861, _T("������")}, - {46, 2864, _T("��������")}, - {46, 862, _T("��������")}, - {46, 3009, _T("���������")}, - {46, 2993, _T("���������")}, - {46, 863, _T("����������")}, - {46, 864, _T("����������")}, - {46, 865, _T("������")}, - {46, 866, _T("������")}, - {46, 3191, _T("����������")}, - {46, 2974, _T("�����-��������")}, - {46, 3127, _T("��������")}, - {46, 867, _T("��������")}, - {46, 868, _T("��������")}, - {46, 869, _T("���������-��-�����")}, - {46, 3373, _T("�������")}, - {46, 3313, _T("�������")}, - {46, 870, _T("��������")}, - {46, 3045, _T("��������")}, - {46, 2906, _T("������")}, + {46, 3007, L"�����"}, + {46, 837, L"��������"}, + {46, 838, L"�����-�����"}, + {46, 3371, L"�������"}, + {46, 839, L"������-�������"}, + {46, 840, L"������"}, + {46, 841, L"���������"}, + {46, 3163, L"��������"}, + {46, 842, L"����"}, + {46, 843, L"����������"}, + {46, 3015, L"����������"}, + {46, 844, L"������"}, + {46, 2921, L"��������"}, + {46, 845, L"������"}, + {46, 846, L"����������"}, + {46, 847, L"�������"}, + {46, 848, L"��������"}, + {46, 849, L"����������"}, + {46, 3010, L"�����������"}, + {46, 850, L"����"}, + {46, 851, L"���������"}, + {46, 3072, L"������"}, + {46, 852, L"��������"}, + {46, 853, L"��������"}, + {46, 854, L"�������"}, + {46, 855, L"�����������"}, + {46, 3082, L"���������"}, + {46, 3309, L"������"}, + {46, 856, L"�����"}, + {46, 857, L"����"}, + {46, 3138, L"�������"}, + {46, 858, L"��������"}, + {46, 859, L"�������"}, + {46, 2872, L"�������"}, + {46, 2965, L"������"}, + {46, 3135, L"�����"}, + {46, 3156, L"�������"}, + {46, 3192, L"���������"}, + {46, 860, L"�������"}, + {46, 861, L"������"}, + {46, 2864, L"��������"}, + {46, 862, L"��������"}, + {46, 3009, L"���������"}, + {46, 2993, L"���������"}, + {46, 863, L"����������"}, + {46, 864, L"����������"}, + {46, 865, L"������"}, + {46, 866, L"������"}, + {46, 3191, L"����������"}, + {46, 2974, L"�����-��������"}, + {46, 3127, L"��������"}, + {46, 867, L"��������"}, + {46, 868, L"��������"}, + {46, 869, L"���������-��-�����"}, + {46, 3373, L"�������"}, + {46, 3313, L"�������"}, + {46, 870, L"��������"}, + {46, 3045, L"��������"}, + {46, 2906, L"������"}, {46, 2527, lpwszOther}, - {48, 871, _T("�����")}, - {48, 873, _T("��������")}, - {48, 3147, _T("�����")}, - {48, 872, _T("��������")}, - {48, 3178, _T("���������")}, + {48, 871, L"�����"}, + {48, 873, L"��������"}, + {48, 3147, L"�����"}, + {48, 872, L"��������"}, + {48, 3178, L"���������"}, {48, 2526, lpwszOther}, - {49, 3006, _T("�����")}, - {49, 874, _T("����������")}, - {49, 875, _T("������")}, - {49, 3285, _T("�������")}, - {49, 876, _T("�������")}, - {49, 3126, _T("�����")}, + {49, 3006, L"�����"}, + {49, 874, L"����������"}, + {49, 875, L"������"}, + {49, 3285, L"�������"}, + {49, 876, L"�������"}, + {49, 3126, L"�����"}, {49, 2525, lpwszOther}, - {50, 3377, _T("������")}, - {50, 3067, _T("������")}, - {50, 877, _T("������")}, - {50, 3065, _T("���������")}, - {50, 3066, _T("����")}, - {50, 878, _T("�������")}, - {50, 3069, _T("����")}, - {50, 3068, _T("���������")}, + {50, 3377, L"������"}, + {50, 3067, L"������"}, + {50, 877, L"������"}, + {50, 3065, L"���������"}, + {50, 3066, L"����"}, + {50, 878, L"�������"}, + {50, 3069, L"����"}, + {50, 3068, L"���������"}, {50, 2524, lpwszOther}, - {51, 879, _T("���������")}, + {51, 879, L"���������"}, {51, 2523, lpwszOther}, - {34, 880, _T("��������")}, - {34, 3125, _T("��������")}, - {34, 881, _T("���������")}, - {34, 890, _T("�������")}, - {34, 3076, _T("������")}, - {34, 882, _T("��������")}, - {34, 3070, _T("�����")}, - {34, 888, _T("�����")}, - {34, 886, _T("���������")}, - {34, 891, _T("��-�������")}, - {34, 3310, _T("����� �� ���")}, - {34, 883, _T("������")}, - {34, 884, _T("������")}, - {34, 885, _T("��������")}, - {34, 892, _T("������")}, - {34, 3179, _T("������ �� �������")}, - {34, 3177, _T("���-�������")}, - {34, 3289, _T("�����-����-��-��������")}, - {34, 889, _T("��������")}, - {34, 887, _T("�������")}, - {34, 893, _T("�����")}, + {34, 880, L"��������"}, + {34, 3125, L"��������"}, + {34, 881, L"���������"}, + {34, 890, L"�������"}, + {34, 3076, L"������"}, + {34, 882, L"��������"}, + {34, 3070, L"�����"}, + {34, 888, L"�����"}, + {34, 886, L"���������"}, + {34, 891, L"��-�������"}, + {34, 3310, L"����� �� ���"}, + {34, 883, L"������"}, + {34, 884, L"������"}, + {34, 885, L"��������"}, + {34, 892, L"������"}, + {34, 3179, L"������ �� �������"}, + {34, 3177, L"���-�������"}, + {34, 3289, L"�����-����-��-��������"}, + {34, 889, L"��������"}, + {34, 887, L"�������"}, + {34, 893, L"�����"}, {34, 2522, lpwszOther}, - {52, 3318, _T("�����")}, - {52, 3278, _T("��������")}, - {52, 906, _T("�������")}, - {52, 894, _T("������")}, - {52, 895, _T("�������")}, - {52, 905, _T("������")}, - {52, 896, _T("�����")}, - {52, 897, _T("�����")}, - {52, 3369, _T("�������")}, - {52, 3327, _T("�������")}, - {52, 898, _T("�����")}, - {52, 899, _T("������")}, - {52, 907, _T("�������")}, - {52, 908, _T("�������")}, - {52, 900, _T("����")}, - {52, 901, _T("���")}, - {52, 3368, _T("���-����")}, - {52, 3384, _T("��������")}, - {52, 3252, _T("������")}, - {52, 902, _T("������")}, - {52, 903, _T("�����")}, - {52, 3130, _T("����")}, - {52, 904, _T("���������")}, + {52, 3318, L"�����"}, + {52, 3278, L"��������"}, + {52, 906, L"�������"}, + {52, 894, L"������"}, + {52, 895, L"�������"}, + {52, 905, L"������"}, + {52, 896, L"�����"}, + {52, 897, L"�����"}, + {52, 3369, L"�������"}, + {52, 3327, L"�������"}, + {52, 898, L"�����"}, + {52, 899, L"������"}, + {52, 907, L"�������"}, + {52, 908, L"�������"}, + {52, 900, L"����"}, + {52, 901, L"���"}, + {52, 3368, L"���-����"}, + {52, 3384, L"��������"}, + {52, 3252, L"������"}, + {52, 902, L"������"}, + {52, 903, L"�����"}, + {52, 3130, L"����"}, + {52, 904, L"���������"}, {52, 2521, lpwszOther}, - {53, 2939, _T("����������")}, - {53, 3054, _T("�����")}, - {53, 909, _T("����������")}, - {53, 2934, _T("��������")}, - {53, 913, _T("������")}, - {53, 2935, _T("�������")}, - {53, 912, _T("������")}, - {53, 2905, _T("�������")}, - {53, 911, _T("����")}, - {53, 2936, _T("���������")}, - {53, 2937, _T("��������")}, - {53, 910, _T("������")}, + {53, 2939, L"����������"}, + {53, 3054, L"�����"}, + {53, 909, L"����������"}, + {53, 2934, L"��������"}, + {53, 913, L"������"}, + {53, 2935, L"�������"}, + {53, 912, L"������"}, + {53, 2905, L"�������"}, + {53, 911, L"����"}, + {53, 2936, L"���������"}, + {53, 2937, L"��������"}, + {53, 910, L"������"}, {53, 2520, lpwszOther}, - {54, 914, _T("�������")}, - {54, 915, _T("���������")}, - {54, 916, _T("������")}, - {54, 918, _T("��������")}, - {54, 919, _T("�������")}, - {54, 3173, _T("���������")}, - {54, 917, _T("������")}, + {54, 914, L"�������"}, + {54, 915, L"���������"}, + {54, 916, L"������"}, + {54, 918, L"��������"}, + {54, 919, L"�������"}, + {54, 3173, L"���������"}, + {54, 917, L"������"}, {54, 2519, lpwszOther}, - {55, 920, _T("�����")}, + {55, 920, L"�����"}, {55, 2518, lpwszOther}, - {56, 3376, _T("��������")}, - {56, 921, _T("����������")}, + {56, 3376, L"��������"}, + {56, 921, L"����������"}, {56, 2517, lpwszOther}, - {57, 3142, _T("������")}, - {57, 922, _T("������")}, + {57, 3142, L"������"}, + {57, 922, L"������"}, {57, 2516, lpwszOther}, - {58, 923, _T("��������")}, - {58, 3154, _T("�����")}, - {58, 924, _T("�����")}, + {58, 923, L"��������"}, + {58, 3154, L"�����"}, + {58, 924, L"�����"}, {58, 2515, lpwszOther}, - {59, 925, _T("������")}, - {59, 926, _T("�������")}, - {59, 3234, _T("���������")}, - {59, 3275, _T("�����")}, - {59, 927, _T("�������")}, - {59, 3321, _T("������")}, - {59, 928, _T("�������")}, - {59, 929, _T("���������")}, - {59, 3281, _T("�����-�����")}, + {59, 925, L"������"}, + {59, 926, L"�������"}, + {59, 3234, L"���������"}, + {59, 3275, L"�����"}, + {59, 927, L"�������"}, + {59, 3321, L"������"}, + {59, 928, L"�������"}, + {59, 929, L"���������"}, + {59, 3281, L"�����-�����"}, {59, 2514, lpwszOther}, - {36, 930, _T("�����-�����")}, + {36, 930, L"�����-�����"}, {36, 2513, lpwszOther}, - {60, 931, _T("���������")}, - {60, 933, _T("�����")}, - {60, 932, _T("�����")}, - {60, 934, _T("�����")}, - {60, 935, _T("�����")}, - {60, 2977, _T("������")}, - {60, 3030, _T("������")}, - {60, 3091, _T("��������")}, - {60, 936, _T("���������")}, - {60, 937, _T("������")}, - {60, 3044, _T("���������")}, - {60, 3380, _T("������")}, + {60, 931, L"���������"}, + {60, 933, L"�����"}, + {60, 932, L"�����"}, + {60, 934, L"�����"}, + {60, 935, L"�����"}, + {60, 2977, L"������"}, + {60, 3030, L"������"}, + {60, 3091, L"��������"}, + {60, 936, L"���������"}, + {60, 937, L"������"}, + {60, 3044, L"���������"}, + {60, 3380, L"������"}, {60, 2512, lpwszOther}, - {61, 3190, _T("������������")}, - {61, 2857, _T("�����������")}, - {61, 938, _T("����")}, - {61, 3355, _T("���������")}, - {61, 939, _T("��������")}, + {61, 3190, L"������������"}, + {61, 2857, L"�����������"}, + {61, 938, L"����"}, + {61, 3355, L"���������"}, + {61, 939, L"��������"}, {61, 2511, lpwszOther}, - {62, 940, _T("��������")}, - {62, 941, _T("�������")}, - {62, 3164, _T("�������")}, - {62, 942, _T("�������")}, - {62, 943, _T("�������")}, - {62, 3237, _T("��������")}, - {62, 3165, _T("������ ����")}, - {62, 944, _T("��������")}, - {62, 945, _T("������")}, - {62, 3008, _T("�����")}, - {62, 3150, _T("�������")}, - {62, 946, _T("�������")}, - {62, 947, _T("�����")}, - {62, 948, _T("�����")}, - {62, 2958, _T("����")}, + {62, 940, L"��������"}, + {62, 941, L"�������"}, + {62, 3164, L"�������"}, + {62, 942, L"�������"}, + {62, 943, L"�������"}, + {62, 3237, L"��������"}, + {62, 3165, L"������ ����"}, + {62, 944, L"��������"}, + {62, 945, L"������"}, + {62, 3008, L"�����"}, + {62, 3150, L"�������"}, + {62, 946, L"�������"}, + {62, 947, L"�����"}, + {62, 948, L"�����"}, + {62, 2958, L"����"}, {62, 2510, lpwszOther}, - {35, 949, _T("��������")}, - {35, 950, _T("�����")}, + {35, 949, L"��������"}, + {35, 950, L"�����"}, {35, 2509, lpwszOther}, - {63, 952, _T("������")}, - {63, 951, _T("��������")}, - {63, 954, _T("���������")}, - {63, 955, _T("�������")}, - {63, 953, _T("����")}, + {63, 952, L"������"}, + {63, 951, L"��������"}, + {63, 954, L"���������"}, + {63, 955, L"�������"}, + {63, 953, L"����"}, {63, 2508, lpwszOther}, - {64, 956, _T("���-������")}, + {64, 956, L"���-������"}, {64, 2507, lpwszOther}, - {74, 957, _T("�������")}, - {74, 960, _T("���")}, - {74, 958, _T("����-���")}, - {74, 959, _T("�������")}, + {74, 957, L"�������"}, + {74, 960, L"���"}, + {74, 958, L"����-���"}, + {74, 959, L"�������"}, {74, 2506, lpwszOther}, - {65, 961, _T("����������")}, - {65, 962, _T("������")}, - {65, 3101, _T("������")}, - {65, 963, _T("������")}, - {65, 964, _T("������")}, - {65, 965, _T("����������")}, - {65, 966, _T("��������")}, + {65, 961, L"����������"}, + {65, 962, L"������"}, + {65, 3101, L"������"}, + {65, 963, L"������"}, + {65, 964, L"������"}, + {65, 965, L"����������"}, + {65, 966, L"��������"}, {65, 2505, lpwszOther}, - {66, 968, _T("�����")}, - {66, 967, _T("�������")}, - {66, 969, _T("�������")}, + {66, 968, L"�����"}, + {66, 967, L"�������"}, + {66, 969, L"�������"}, {66, 2504, lpwszOther}, - {67, 970, _T("��������")}, + {67, 970, L"��������"}, {67, 2503, lpwszOther}, - {68, 2888, _T("������")}, - {68, 971, _T("����")}, - {68, 979, _T("�����")}, - {68, 972, _T("�������")}, - {68, 980, _T("�����")}, - {68, 973, _T("����")}, - {68, 3375, _T("���������")}, - {68, 3159, _T("�������")}, - {68, 974, _T("�������")}, - {68, 975, _T("�����")}, - {68, 976, _T("���������")}, - {68, 977, _T("����")}, - {68, 978, _T("��������")}, + {68, 2888, L"������"}, + {68, 971, L"����"}, + {68, 979, L"�����"}, + {68, 972, L"�������"}, + {68, 980, L"�����"}, + {68, 973, L"����"}, + {68, 3375, L"���������"}, + {68, 3159, L"�������"}, + {68, 974, L"�������"}, + {68, 975, L"�����"}, + {68, 976, L"���������"}, + {68, 977, L"����"}, + {68, 978, L"��������"}, {68, 2502, lpwszOther}, - {37, 996, _T("�������")}, - {37, 983, _T("��������")}, - {37, 997, _T("����")}, - {37, 984, _T("�����")}, - {37, 998, _T("�����")}, - {37, 987, _T("����")}, - {37, 988, _T("�����")}, - {37, 993, _T("�������-������")}, - {37, 3037, _T("�����")}, - {37, 989, _T("����")}, - {37, 985, _T("�������")}, - {37, 991, _T("���")}, - {37, 3161, _T("�����")}, - {37, 990, _T("�����")}, - {37, 994, _T("����")}, - {37, 995, _T("�����")}, - {37, 999, _T("������")}, - {37, 981, _T("�����")}, - {37, 3374, _T("���������")}, - {37, 992, _T("����")}, - {37, 982, _T("���������")}, - {37, 986, _T("������")}, - {37, 3314, _T("�������")}, + {37, 996, L"�������"}, + {37, 983, L"��������"}, + {37, 997, L"����"}, + {37, 984, L"�����"}, + {37, 998, L"�����"}, + {37, 987, L"����"}, + {37, 988, L"�����"}, + {37, 993, L"�������-������"}, + {37, 3037, L"�����"}, + {37, 989, L"����"}, + {37, 985, L"�������"}, + {37, 991, L"���"}, + {37, 3161, L"�����"}, + {37, 990, L"�����"}, + {37, 994, L"����"}, + {37, 995, L"�����"}, + {37, 999, L"������"}, + {37, 981, L"�����"}, + {37, 3374, L"���������"}, + {37, 992, L"����"}, + {37, 982, L"���������"}, + {37, 986, L"������"}, + {37, 3314, L"�������"}, {37, 2501, lpwszOther}, - {69, 1003, _T("���������")}, - {69, 1000, _T("������")}, - {69, 1001, _T("�����")}, - {69, 1004, _T("�����")}, - {69, 1002, _T("�����")}, + {69, 1003, L"���������"}, + {69, 1000, L"������"}, + {69, 1001, L"�����"}, + {69, 1004, L"�����"}, + {69, 1002, L"�����"}, {69, 2500, lpwszOther}, - {70, 1005, _T("����")}, - {70, 3291, _T("���������-����")}, - {70, 1007, _T("������-�������")}, - {70, 1008, _T("�������-����")}, - {70, 3019, _T("��������")}, - {70, 1010, _T("�����")}, - {70, 1009, _T("�������")}, - {70, 1015, _T("�������")}, - {70, 3105, _T("��������� �����")}, - {70, 1006, _T("�����")}, - {70, 3246, _T("�����")}, - {70, 1011, _T("�������")}, - {70, 1012, _T("����-���-�����")}, - {70, 1014, _T("�����-���������")}, - {70, 1013, _T("�������-���-�����")}, + {70, 1005, L"����"}, + {70, 3291, L"���������-����"}, + {70, 1007, L"������-�������"}, + {70, 1008, L"�������-����"}, + {70, 3019, L"��������"}, + {70, 1010, L"�����"}, + {70, 1009, L"�������"}, + {70, 1015, L"�������"}, + {70, 3105, L"��������� �����"}, + {70, 1006, L"�����"}, + {70, 3246, L"�����"}, + {70, 1011, L"�������"}, + {70, 1012, L"����-���-�����"}, + {70, 1014, L"�����-���������"}, + {70, 1013, L"�������-���-�����"}, {70, 2499, lpwszOther}, - {71, 1016, _T("����")}, - {71, 1019, _T("�����")}, - {71, 1017, _T("������")}, - {71, 1018, _T("����")}, - {71, 1020, _T("����")}, - {71, 1021, _T("���������")}, - {71, 1022, _T("�����")}, - {71, 3189, _T("��������")}, - {71, 1023, _T("������")}, - {71, 1024, _T("��������")}, - {71, 1025, _T("�������")}, - {71, 1026, _T("�������")}, - {71, 1027, _T("������")}, - {71, 1028, _T("������")}, - {71, 1029, _T("������")}, - {71, 1030, _T("�����")}, + {71, 1016, L"����"}, + {71, 1019, L"�����"}, + {71, 1017, L"������"}, + {71, 1018, L"����"}, + {71, 1020, L"����"}, + {71, 1021, L"���������"}, + {71, 1022, L"�����"}, + {71, 3189, L"��������"}, + {71, 1023, L"������"}, + {71, 1024, L"��������"}, + {71, 1025, L"�������"}, + {71, 1026, L"�������"}, + {71, 1027, L"������"}, + {71, 1028, L"������"}, + {71, 1029, L"������"}, + {71, 1030, L"�����"}, {71, 2498, lpwszOther}, - {72, 2883, _T("������")}, - {72, 1031, _T("��������")}, - {72, 1032, _T("�������")}, - {72, 1037, _T("�������")}, - {72, 1036, _T("�����")}, - {72, 1042, _T("����")}, - {72, 1033, _T("������")}, - {72, 1034, _T("���������")}, - {72, 1041, _T("����")}, - {72, 1039, _T("�����")}, - {72, 1043, _T("�����������")}, - {72, 1040, _T("���������")}, - {72, 1038, _T("���������")}, + {72, 2883, L"������"}, + {72, 1031, L"��������"}, + {72, 1032, L"�������"}, + {72, 1037, L"�������"}, + {72, 1036, L"�����"}, + {72, 1042, L"����"}, + {72, 1033, L"������"}, + {72, 1034, L"���������"}, + {72, 1041, L"����"}, + {72, 1039, L"�����"}, + {72, 1043, L"�����������"}, + {72, 1040, L"���������"}, + {72, 1038, L"���������"}, {72, 2497, lpwszOther}, - {73, 3013, _T("�����")}, - {73, 1044, _T("�����")}, - {73, 1045, _T("������-����")}, - {73, 1046, _T("������")}, - {73, 1047, _T("���������")}, - {73, 1048, _T("�����")}, - {73, 1049, _T("�����")}, - {73, 1050, _T("�������")}, - {73, 1051, _T("��������")}, - {73, 1052, _T("������")}, - {73, 1053, _T("�����")}, - {73, 1054, _T("��������")}, + {73, 3013, L"�����"}, + {73, 1044, L"�����"}, + {73, 1045, L"������-����"}, + {73, 1046, L"������"}, + {73, 1047, L"���������"}, + {73, 1048, L"�����"}, + {73, 1049, L"�����"}, + {73, 1050, L"�������"}, + {73, 1051, L"��������"}, + {73, 1052, L"������"}, + {73, 1053, L"�����"}, + {73, 1054, L"��������"}, {0, NULL} };//*/ diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index ccb253a53f..5422fd32f8 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -496,7 +496,7 @@ int CMraProto::SetStatus(int iNewStatus) case ID_STATUS_DND: case ID_STATUS_FREECHAT: case ID_STATUS_INVISIBLE: - MraSendNewStatus(m_iDesiredStatus, m_iXStatus, _T(""), _T("")); + MraSendNewStatus(m_iDesiredStatus, m_iXStatus, L"", L""); case ID_STATUS_CONNECTING: // ������������� ������� � ����� ������ (����� offline) �� ������� connecting, ���� �� �� ������ ����� �������� if (dwOldStatusMode == ID_STATUS_CONNECTING && iNewStatus != m_iDesiredStatus) @@ -526,11 +526,11 @@ HANDLE CMraProto::GetAwayMsg(MCONTACT hContact) SYSTEMTIME tt = { 0 }; dwTime = getDword(hContact, DBSETTING_BLOGSTATUSTIME, 0); if (dwTime && MakeLocalSystemTimeFromTime32(dwTime, &tt)) - mir_sntprintf(szTime, _T("%04ld.%02ld.%02ld %02ld:%02ld: "), tt.wYear, tt.wMonth, tt.wDay, tt.wHour, tt.wMinute); + mir_sntprintf(szTime, L"%04ld.%02ld.%02ld %02ld:%02ld: ", tt.wYear, tt.wMonth, tt.wDay, tt.wHour, tt.wMinute); else szTime[0] = 0; - mir_sntprintf(szStatusDesc, _T("%s%s"), szTime, szBlogStatus.c_str()); + mir_sntprintf(szStatusDesc, L"%s%s", szTime, szBlogStatus.c_str()); iRet = GetTickCount(); ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)iRet, (LPARAM)szStatusDesc); } @@ -549,7 +549,7 @@ int CMraProto::SetAwayMsg(int iStatus, const TCHAR *msg) // �� ���������� ����� ��������� ����� ��� ���������, ��� ��������� ������ ���� ��������� if (dwStatus != ID_STATUS_ONLINE || IsXStatusValid(dwXStatus) == FALSE) { dwStatusDescSize = min(dwStatusDescSize, STATUS_DESC_MAX); - MraSendNewStatus(dwStatus, dwXStatus, _T(""), msg); + MraSendNewStatus(dwStatus, dwXStatus, L"", msg); } return 0; } diff --git a/protocols/MRA/src/MraRTFMsg.cpp b/protocols/MRA/src/MraRTFMsg.cpp index 61d305d08e..ab7077f9d1 100644 --- a/protocols/MRA/src/MraRTFMsg.cpp +++ b/protocols/MRA/src/MraRTFMsg.cpp @@ -100,9 +100,9 @@ DWORD MraTextToRTFData(LPSTR lpszMessage, size_t dwMessageSize, LPSTR lpszMessag bool MraIsMessageFlashAnimation(const CMStringW &lpwszMessage) { - int iStart = lpwszMessage.Find(_T("<SMILE>id=flas")); + int iStart = lpwszMessage.Find(L"<SMILE>id=flas"); if (iStart != -1) - if (lpwszMessage.Find(_T("'</SMILE>"), iStart) != -1) + if (lpwszMessage.Find(L"'</SMILE>", iStart) != -1) return true; return false; diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp index 0b3b289de4..0cb54e6522 100644 --- a/protocols/MRA/src/MraSendCommand.cpp +++ b/protocols/MRA/src/MraSendCommand.cpp @@ -87,7 +87,7 @@ DWORD CMraProto::MraMessage(BOOL bAddToQueue, MCONTACT hContact, DWORD dwAckType if (dwFlags & MESSAGE_FLAG_AUTHORIZE) { OutBuffer buf; buf.SetUL(2); - buf.SetLPSW(_T(""));//***deb possible nick here + buf.SetLPSW(L"");//***deb possible nick here buf.SetLPSW(lpwszMessage); lpszMessageConverted = mir_base64_encode(buf.Data(), (int)buf.Len()); dwMessageConvertedSize = mir_strlen(lpszMessageConverted); @@ -203,8 +203,8 @@ DWORD CMraProto::MraAddContact(MCONTACT hContact, DWORD dwContactFlag, DWORD dwG // pack auth message OutBuffer buf2; buf2.SetUL(2); - buf2.SetLPSW(_T(""));//***deb possible nick here - buf2.SetLPSW((wszAuthMessage == NULL) ? _T("") : *wszAuthMessage); + buf2.SetLPSW(L"");//***deb possible nick here + buf2.SetLPSW((wszAuthMessage == NULL) ? L"" : *wszAuthMessage); buf.SetLPS(CMStringA(ptrA(mir_base64_encode(buf2.Data(), (int)buf2.Len())))); buf.SetUL(0); @@ -393,7 +393,7 @@ HANDLE CMraProto::MraWPRequestByEMail(MCONTACT hContact, DWORD dwAckType, CMStri DWORD dwRequestFlags = 0; SetBit(dwRequestFlags, MRIM_CS_WP_REQUEST_PARAM_USER); SetBit(dwRequestFlags, MRIM_CS_WP_REQUEST_PARAM_DOMAIN); - return MraWPRequestW(hContact, dwAckType, dwRequestFlags, szUser, szDomain, _T(""), _T(""), _T(""), 0, 0, 0, 0, 0, 0, 0, 0, 0); + return MraWPRequestW(hContact, dwAckType, dwRequestFlags, szUser, szDomain, L"", L"", L"", 0, 0, 0, 0, 0, 0, 0, 0, 0); } // �������� ������ diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index b06913d615..ebeb34d92d 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -878,7 +878,7 @@ void CMraProto::ShowFormattedErrorMessage(LPWSTR lpwszErrText, DWORD dwErrorCode else { dwErrDescriptionSize = (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErrorCode, 0, szErrDescription, (_countof(szErrDescription) - sizeof(WCHAR)), NULL) - 2); szErrDescription[dwErrDescriptionSize] = 0; - mir_sntprintf(szErrorText, _T("%s %lu: %s"), TranslateTS(lpwszErrText), dwErrorCode, szErrDescription); + mir_sntprintf(szErrorText, L"%s %lu: %s", TranslateTS(lpwszErrText), dwErrorCode, szErrDescription); } MraPopupShowFromAgentW(MRA_POPUP_TYPE_ERROR, 0, szErrorText); } @@ -1009,7 +1009,7 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP if (dat->ppro->mraGetStringW(NULL, szValueName, szBuff)) SetDlgItemText(hWndDlg, IDC_XMSG, szBuff.c_str()); // custom xstatus description else // default xstatus description - SetDlgItemText(hWndDlg, IDC_XMSG, _T("")); + SetDlgItemText(hWndDlg, IDC_XMSG, L""); SendMessage(hWndDlg, WM_TIMER, 0, 0); SetTimer(hWndDlg, 1, 1000, 0); @@ -1124,7 +1124,7 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg, UINT message, WPARAM w DWORD dwTime = dat->ppro->getDword(dat->hContact, DBSETTING_BLOGSTATUSTIME, 0); if (dwTime && MakeLocalSystemTimeFromTime32(dwTime, &stBlogStatusTime)) - szBuff.Format(_T("%s: %04ld.%02ld.%02ld %02ld:%02ld"), TranslateT("Written"), + szBuff.Format(L"%s: %04ld.%02ld.%02ld %02ld:%02ld", TranslateT("Written"), stBlogStatusTime.wYear, stBlogStatusTime.wMonth, stBlogStatusTime.wDay, stBlogStatusTime.wHour, stBlogStatusTime.wMinute); else szBuff.Empty(); @@ -1176,7 +1176,7 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg, UINT message, WPARAM w size_t dwMessageSize = GetWindowTextLength(GetDlgItem(hWndDlg, IDC_MSG_TO_SEND)); EnableWindow(GetDlgItem(hWndDlg, IDOK), (int)dwMessageSize); - mir_sntprintf(tszBuff, _T("%d/%d"), dwMessageSize, MICBLOG_STATUS_MAX); + mir_sntprintf(tszBuff, L"%d/%d", dwMessageSize, MICBLOG_STATUS_MAX); SetDlgItemText(hWndDlg, IDC_STATIC_CHARS_COUNTER, tszBuff); } break; @@ -1250,7 +1250,7 @@ DWORD FindFile(LPWSTR lpszFolder, DWORD dwFolderLen, LPWSTR lpszFileName, DWORD dwPathLen++; } szPath[dwPathLen] = 0; - mir_tstrcat(szPath, _T("*.*")); + mir_tstrcat(szPath, L"*.*"); dwRetErrorCode = ERROR_FILE_NOT_FOUND; prdsiItems[dwRecDeepCurPos].dwFileNameLen = 0; @@ -1261,11 +1261,11 @@ DWORD FindFile(LPWSTR lpszFolder, DWORD dwFolderLen, LPWSTR lpszFileName, DWORD while (dwRetErrorCode == ERROR_FILE_NOT_FOUND && FindNextFile(prdsiItems[dwRecDeepCurPos].hFind, &prdsiItems[dwRecDeepCurPos].w32fdFindFileData)) { if (prdsiItems[dwRecDeepCurPos].w32fdFindFileData.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) {// folder - if (CompareString(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, -1, _T("."), 1) != CSTR_EQUAL) - if (CompareString(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, -1, _T(".."), 2) != CSTR_EQUAL) { + if (CompareString(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, -1, L".", 1) != CSTR_EQUAL) + if (CompareString(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, -1, L"..", 2) != CSTR_EQUAL) { prdsiItems[dwRecDeepCurPos].dwFileNameLen = (int)mir_wstrlen(prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName) + 1; memcpy((szPath + dwPathLen), prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, (prdsiItems[dwRecDeepCurPos].dwFileNameLen*sizeof(WCHAR))); - mir_tstrcat(szPath, _T("\\*.*")); + mir_tstrcat(szPath, L"\\*.*"); dwPathLen += prdsiItems[dwRecDeepCurPos].dwFileNameLen; dwRecDeepCurPos++; @@ -1433,9 +1433,9 @@ static DWORD ReplaceInBuff(LPVOID lpInBuff, size_t dwInBuffSize, size_t dwReplac return dwRetErrorCode; } -static const LPTSTR lpszXMLTags[] = { _T("'"), _T("""), _T("&"), _T("<"), _T(">") }; +static const LPTSTR lpszXMLTags[] = { L"'", L""", L"&", L"<", L">" }; static const size_t dwXMLTagsCount[] = { (6 * sizeof(TCHAR)), (6 * sizeof(TCHAR)), (5 * sizeof(TCHAR)), (4 * sizeof(TCHAR)), (4 * sizeof(TCHAR)) }; -static const LPTSTR lpszXMLSymbols[] = { _T("\'"), _T("\""), _T("&"), _T("<"), _T(">") }; +static const LPTSTR lpszXMLSymbols[] = { L"\'", L"\"", L"&", L"<", L">" }; static const size_t dwXMLSymbolsCount[] = { sizeof(TCHAR), sizeof(TCHAR), sizeof(TCHAR), sizeof(TCHAR), sizeof(TCHAR) }; //Decode XML coded string. The function translate special xml code into standard characters. diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp index 03681834d9..902f9eac07 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -282,7 +282,7 @@ int CMraProto::MraRebuildStatusMenu(WPARAM, LPARAM) HGENMENU hRoot; { TCHAR szItem[MAX_PATH + 64]; - mir_sntprintf(szItem, _T("%s Custom Status"), m_tszUserName); + mir_sntprintf(szItem, L"%s Custom Status", m_tszUserName); CMenuItem mi; mi.root = pcli->pfnGetProtocolMenu(m_szModuleName); diff --git a/protocols/MRA/src/Mra_options.cpp b/protocols/MRA/src/Mra_options.cpp index 909a1b94f9..abf966c43f 100644 --- a/protocols/MRA/src/Mra_options.cpp +++ b/protocols/MRA/src/Mra_options.cpp @@ -14,7 +14,7 @@ INT_PTR CALLBACK DlgProcOptsAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARA if (ppro->mraGetStringW(NULL, "e-mail", szBuff)) SetDlgItemText(hWndDlg, IDC_LOGIN, szBuff.c_str()); } - SetDlgItemText(hWndDlg, IDC_PASSWORD, _T("")); + SetDlgItemText(hWndDlg, IDC_PASSWORD, L""); return TRUE; case WM_COMMAND: @@ -65,7 +65,7 @@ INT_PTR CALLBACK DlgProcAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lP if (ppro->mraGetStringW(NULL, "e-mail", szBuff)) SetDlgItemText(hWndDlg, IDC_LOGIN, szBuff.c_str()); } - SetDlgItemText(hWndDlg, IDC_PASSWORD, _T("")); + SetDlgItemText(hWndDlg, IDC_PASSWORD, L""); return TRUE; case WM_COMMAND: diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index 7ece81f274..133101acee 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -539,9 +539,9 @@ bool CMraProto::CmdOfflineMessageAck(BinBuffer &buf) if (dwTemp == NO_ERROR || dwTemp == ERROR_ACCESS_DENIED) MraOfflineMessageDel(dwMsgUIDL); else - ShowFormattedErrorMessage(_T("Offline message processing error, message will not deleted from server"), NO_ERROR); + ShowFormattedErrorMessage(L"Offline message processing error, message will not deleted from server", NO_ERROR); } - else ShowFormattedErrorMessage(_T("Offline message processing error, message will not deleted from server"), NO_ERROR); + else ShowFormattedErrorMessage(L"Offline message processing error, message will not deleted from server", NO_ERROR); return true; } @@ -558,7 +558,7 @@ bool CMraProto::CmdAuthAck(BinBuffer &buf) MraUpdateContactInfo(hContact); if (IsEMailChatAgent(szEmail) == FALSE) { - CMStringA szBuff = CreateBlobFromContact(hContact, _T("")); + CMStringA szBuff = CreateBlobFromContact(hContact, L""); DBEVENTINFO dbei = { sizeof(dbei) }; dbei.flags = DBEF_UTF; @@ -730,23 +730,23 @@ bool CMraProto::CmdContactAck(int cmd, int seq, BinBuffer &buf) } break; case CONTACT_OPER_ERROR:// ## ���������� ������ ���� ����������� - ShowFormattedErrorMessage(_T("Data been sent are invalid"), NO_ERROR); + ShowFormattedErrorMessage(L"Data been sent are invalid", NO_ERROR); break; case CONTACT_OPER_INTERR:// ## ��� ��������� ������� ��������� ���������� ������ - ShowFormattedErrorMessage(_T("Internal server error"), NO_ERROR); + ShowFormattedErrorMessage(L"Internal server error", NO_ERROR); break; case CONTACT_OPER_NO_SUCH_USER:// ## ������������ ������������ �� ���������� � ������� SetContactBasicInfoW(hContact, 0, SCBIF_SERVER_FLAG, 0, 0, 0, -1, 0, 0, 0, 0); - ShowFormattedErrorMessage(_T("No such user to add"), NO_ERROR); + ShowFormattedErrorMessage(L"No such user to add", NO_ERROR); break; case CONTACT_OPER_INVALID_INFO:// ## ������������ ��� ������������ - ShowFormattedErrorMessage(_T("Invalid user name"), NO_ERROR); + ShowFormattedErrorMessage(L"Invalid user name", NO_ERROR); break; case CONTACT_OPER_USER_EXISTS:// ## ������������ ��� ���� � �������-����� - ShowFormattedErrorMessage(_T("User already added"), NO_ERROR); + ShowFormattedErrorMessage(L"User already added", NO_ERROR); break; case CONTACT_OPER_GROUP_LIMIT:// ## ��������� ����������� ���������� ���������� ����� (20) - ShowFormattedErrorMessage(_T("Group limit is 20"), NO_ERROR); + ShowFormattedErrorMessage(L"Group limit is 20", NO_ERROR); break; default:// ## unknown error TCHAR szBuff[1024]; diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 4b99db4956..d5477896e7 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -304,7 +304,7 @@ INT_PTR CMraProto::MraSetListeningTo(WPARAM, LPARAM lParam) LISTENINGTOINFO *pliInfo = (LISTENINGTOINFO*)lParam; if (pliInfo == NULL || pliInfo->cbSize != sizeof(LISTENINGTOINFO)) { - MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, _T(""), 0); + MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, L"", 0); delSetting(DBSETTING_BLOGSTATUSMUSIC); } else if (pliInfo->dwFlags & LTI_UNICODE) { @@ -312,7 +312,7 @@ INT_PTR CMraProto::MraSetListeningTo(WPARAM, LPARAM lParam) if (ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT)) wszListeningTo = ptrT((LPWSTR)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%track%. %title% - %artist% - %player%", (LPARAM)pliInfo)); else - wszListeningTo.Format(L"%s. %s - %s - %s", pliInfo->ptszTrack ? pliInfo->ptszTrack : _T(""), pliInfo->ptszTitle ? pliInfo->ptszTitle : _T(""), pliInfo->ptszArtist ? pliInfo->ptszArtist : _T(""), pliInfo->ptszPlayer ? pliInfo->ptszPlayer : _T("")); + wszListeningTo.Format(L"%s. %s - %s - %s", pliInfo->ptszTrack ? pliInfo->ptszTrack : L"", pliInfo->ptszTitle ? pliInfo->ptszTitle : L"", pliInfo->ptszArtist ? pliInfo->ptszArtist : L"", pliInfo->ptszPlayer ? pliInfo->ptszPlayer : L""); mraSetStringExW(NULL, DBSETTING_BLOGSTATUSMUSIC, wszListeningTo); MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, wszListeningTo, 0); @@ -328,7 +328,7 @@ int CMraProto::MraMusicChanged(WPARAM wParam, LPARAM lParam) // stopped if (1 == lParam) { delSetting(DBSETTING_BLOGSTATUSMUSIC); - MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, _T(""), 0); + MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, L"", 0); } break; @@ -336,7 +336,7 @@ int CMraProto::MraMusicChanged(WPARAM wParam, LPARAM lParam) SONGINFO *psiSongInfo; if (WAT_RES_OK == CallService(MS_WAT_GETMUSICINFO, WAT_INF_UNICODE, (LPARAM)&psiSongInfo)) { CMStringW wszMusic; - wszMusic.Format(_T("%ld. %s - %s - %s"), psiSongInfo->track, psiSongInfo->artist, psiSongInfo->title, psiSongInfo->player); + wszMusic.Format(L"%ld. %s - %s - %s", psiSongInfo->track, psiSongInfo->artist, psiSongInfo->title, psiSongInfo->player); mraSetStringExW(NULL, DBSETTING_BLOGSTATUSMUSIC, wszMusic); MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, wszMusic, 0); } @@ -374,7 +374,7 @@ DWORD CMraProto::MraSetXStatusInternal(DWORD dwXStatus) DWORD dwOldStatusMode = InterlockedExchange((volatile LONG*)&m_iXStatus, dwXStatus); setByte(DBSETTING_XSTATUSID, (BYTE)dwXStatus); - MraSendNewStatus(m_iStatus, dwXStatus, _T(""), _T("")); + MraSendNewStatus(m_iStatus, dwXStatus, L"", L""); return dwOldStatusMode; } diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index 8739f0e239..27a002ceba 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -359,8 +359,8 @@ int CMsnProto::MSN_GetPassportAuth(void) time_t ts = time(NULL); TCHAR szTs1[64], szTs2[64]; - TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, ts, _T("I"), szTs1, _countof(szTs1), 0); - TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, ts + 20 * 60, _T("I"), szTs2, _countof(szTs2), 0); + TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, ts, L"I", szTs1, _countof(szTs1), 0); + TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, ts + 20 * 60, L"I", szTs2, _countof(szTs2), 0); CMStringA szAuthInfo(FORMAT, authPacket, int(ts), MyOptions.szEmail, ptrA(HtmlEncode(szPassword)), szTs1, szTs2); @@ -929,7 +929,7 @@ LRESULT CALLBACK AuthWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar * InternetGetCookieExA */ if (!fpInternetGetCookieExA) { - HMODULE hMod = LoadLibrary(_T("wininet.dll")); + HMODULE hMod = LoadLibrary(L"wininet.dll"); if (hMod) fpInternetGetCookieExA = (pfnInternetGetCookieExA)GetProcAddress(hMod, "InternetGetCookieExA"); } if (fpInternetGetCookieExA && @@ -969,7 +969,7 @@ void __cdecl CMsnProto::msn_IEAuthThread(void *pParam) HWND hWnd; MSG msg; WNDCLASSEX wc={0}; - static const TCHAR *ClassName = _T("SkypeLoginWindow"); + static const TCHAR *ClassName = L"SkypeLoginWindow"; CoInitialize(NULL); @@ -980,7 +980,7 @@ void __cdecl CMsnProto::msn_IEAuthThread(void *pParam) wc.lpszClassName = ClassName; RegisterClassEx(&wc); - if ((hWnd = CreateWindowEx(0, ClassName, _T("MSN Login"), WS_OVERLAPPEDWINDOW, + if ((hWnd = CreateWindowEx(0, ClassName, L"MSN Login", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 640, 480, HWND_DESKTOP, NULL, g_hInst, pParam))) { ShowWindow( hWnd, SW_SHOW ); diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index 99e6354cd1..9c13070bc1 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -26,8 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <m_history.h> static const TCHAR *m_ptszRoles[] = { - _T("admin"), - _T("user") + L"admin", + L"user" }; MCONTACT CMsnProto::MSN_GetChatInernalHandle(MCONTACT hContact) @@ -55,7 +55,7 @@ int CMsnProto::MSN_ChatInit(GCThreadData *info, const char *pszID, const char *p TCHAR szName[512]; InterlockedIncrement(&m_chatID); if (*pszTopic) _tcsncpy(szName, _A2T(pszTopic), _countof(szName)); - else mir_sntprintf(szName, _T("%s %s%d"), + else mir_sntprintf(szName, L"%s %s%d", m_tszUserName, TranslateT("Chat #"), m_chatID); GCSESSION gcw = { sizeof(gcw) }; @@ -219,7 +219,7 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const TCHAR *mChatID) hContInitiator = MSN_HContactFromEmail(initiator->txt); gce.ptszText= GetContactNameT(hContInitiator); } - gce.ptszStatus = _T("admin"); + gce.ptszStatus = L"admin"; } if (gcd.iType) { @@ -330,7 +330,7 @@ static void ChatInviteSend(HANDLE hItem, HWND hwndList, STRLIST &str, CMsnProto int chk = SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0); if (chk) { if (IsHContactInfo(hItem)) { - TCHAR buf[128] = _T(""); + TCHAR buf[128] = L""; SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf); if (buf[0]) str.insert(mir_t2a(buf)); @@ -511,7 +511,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) GCDEST gcd = { m_szModuleName, gch->pDest->ptszID, GC_EVENT_MESSAGE }; GCEVENT gce = { sizeof(gce), &gcd }; gce.dwFlags = GCEF_ADDTOLOG; - gce.ptszNick = bError ? _T("") : dbv.ptszVal; + gce.ptszNick = bError ? L"" : dbv.ptszVal; gce.ptszUID = mir_a2t(MyOptions.szEmail); gce.time = time(NULL); gce.ptszText = gch->ptszText; @@ -574,7 +574,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) case 40: const TCHAR *pszRole = MSN_GCGetRole(MSN_GetThreadByChatId(gch->pDest->ptszID), _T2A(gch->ptszUID)); - MSN_Promoteuser(gch, (pszRole && !mir_tstrcmp(pszRole, _T("admin"))) ? "user" : "admin"); + MSN_Promoteuser(gch, (pszRole && !mir_tstrcmp(pszRole, L"admin")) ? "user" : "admin"); break; } break; @@ -605,7 +605,7 @@ int CMsnProto::MSN_GCMenuHook(WPARAM, LPARAM lParam) { { LPGENT("User &details"), 10, MENU_ITEM, FALSE }, { LPGENT("User &history"), 20, MENU_ITEM, FALSE }, - { _T(""), 100, MENU_SEPARATOR, FALSE }, + { L"", 100, MENU_SEPARATOR, FALSE }, { LPGENT("&Leave chat session"), 110, MENU_ITEM, FALSE } }; gcmi->nItems = _countof(Items); @@ -620,13 +620,13 @@ int CMsnProto::MSN_GCMenuHook(WPARAM, LPARAM lParam) { LPGENT("&Op user") , 40, MENU_ITEM, FALSE } }; GCThreadData* thread = MSN_GetThreadByChatId(gcmi->pszID); - if (thread && thread->mMe && mir_tstrcmpi(thread->mMe->role, _T("admin"))) { + if (thread && thread->mMe && mir_tstrcmpi(thread->mMe->role, L"admin")) { Items[2].bDisabled = TRUE; Items[3].bDisabled = TRUE; } else { const TCHAR *pszRole = MSN_GCGetRole(thread, email); - if (pszRole && !mir_tstrcmpi(pszRole, _T("admin"))) + if (pszRole && !mir_tstrcmpi(pszRole, L"admin")) Items[3].pszDesc = LPGENT("&Deop user"); } gcmi->nItems = _countof(Items); diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index a2a7dab1be..c2a02ae5c1 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -182,7 +182,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para msgBody = tHeader.readFromBuffer(msgBody); if (!(email = NEWSTR_ALLOCA(tHeader["From"]))) return; mChatID = mir_a2t(tHeader["To"]); - if (_tcsncmp(mChatID, _T("19:"), 3)) mChatID[0]=0; // NETID_THREAD + if (_tcsncmp(mChatID, L"19:", 3)) mChatID[0]=0; // NETID_THREAD msgBody = tHeader.readFromBuffer(msgBody); msgBody = tHeader.readFromBuffer(msgBody); nick = NEWSTR_ALLOCA(tHeader["IM-Display-Name"]); @@ -848,7 +848,7 @@ void CMsnProto::MSN_ProcessStatusMessage(ezxml_t xmli, const char* wlid) if (pCount > 12) lti.ptszType = mir_utf8decodeT(parts[12]); else lti.ptszType = mir_utf8decodeT(parts[1]); - TCHAR *cm = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)_T("%title% - %artist%"), (LPARAM)<i); + TCHAR *cm = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%title% - %artist%", (LPARAM)<i); setTString(hContact, "ListeningTo", cm); mir_free(cm); diff --git a/protocols/MSN/src/msn_links.cpp b/protocols/MSN/src/msn_links.cpp index 60e9f12147..d047b03213 100644 --- a/protocols/MSN/src/msn_links.cpp +++ b/protocols/MSN/src/msn_links.cpp @@ -34,7 +34,7 @@ static MCONTACT GetContact(TCHAR *arg, TCHAR **pemail, CMsnProto *proto) TCHAR *tok = _tcschr(arg, '&'); /* next token */ if (tok != NULL) *tok++ = '\0'; - if (_tcsnicmp(arg, _T("contact="), 8) == 0) { + if (_tcsnicmp(arg, L"contact=", 8) == 0) { arg += 8; UrlDecode(arg); email = arg; @@ -85,7 +85,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) /* add a contact to the list */ - if (_tcsnicmp(arg, _T("add?"), 4) == 0) { + if (_tcsnicmp(arg, L"add?", 4) == 0) { arg += 4; TCHAR *email; @@ -109,7 +109,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) } /* send a message to a contact */ /* "voice" and "video" not yet implemented, perform same action as "chat" */ - else if (_tcsnicmp(arg, _T("chat?"), 5) == 0) { + else if (_tcsnicmp(arg, L"chat?", 5) == 0) { arg += 5; MCONTACT hContact = GetContact(arg, NULL, proto); @@ -119,7 +119,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) return 0; } } - else if (_tcsnicmp(arg, _T("voice?"), 6) == 0) { + else if (_tcsnicmp(arg, L"voice?", 6) == 0) { arg += 6; MCONTACT hContact = GetContact(arg, NULL, proto); @@ -129,7 +129,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) return 0; } } - else if (_tcsnicmp(arg, _T("video?"), 6) == 0) { + else if (_tcsnicmp(arg, L"video?", 6) == 0) { arg += 6; MCONTACT hContact = GetContact(arg, NULL, proto); diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp index 99ea736122..364d437356 100644 --- a/protocols/MSN/src/msn_mail.cpp +++ b/protocols/MSN/src/msn_mail.cpp @@ -388,7 +388,7 @@ void CMsnProto::displayEmailCount(MCONTACT hContact) rtrimt(name); TCHAR szNick[128]; - mir_sntprintf(szNick, getByte("DisableHotmailJunk", 0) ? _T("%s [%d]") : _T("%s [%d][%d]"), name, mUnreadMessages, mUnreadJunkEmails); + mir_sntprintf(szNick, getByte("DisableHotmailJunk", 0) ? L"%s [%d]" : L"%s [%d][%d]", name, mUnreadMessages, mUnreadJunkEmails); nickChg = true; setTString(hContact, "Nick", szNick); diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 3ac3245410..6d5b581a89 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -118,7 +118,7 @@ void CMsnProto::InitCustomFolders(void) if (InitCstFldRan) return; TCHAR folder[MAX_PATH]; - mir_sntprintf(folder, _T("%%miranda_avatarcache%%\\%S"), m_szModuleName); + mir_sntprintf(folder, L"%%miranda_avatarcache%%\\%S", m_szModuleName); hCustomSmileyFolder = FoldersRegisterCustomPathT(LPGEN("Custom Smileys"), m_szModuleName, folder, m_tszUserName); InitCstFldRan = true; @@ -170,7 +170,7 @@ char* MSN_GetAvatarHash(char* szContext, char** pszUrl) // MSN_GetAvatarFileName - gets a file name for an contact's avatar void CMsnProto::MSN_GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext) { - size_t tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName); + size_t tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName); if (_taccess(pszDest, 0)) CreateDirectoryTreeT(pszDest); @@ -182,7 +182,7 @@ void CMsnProto::MSN_GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t char* szAvatarHash = MSN_GetAvatarHash(dbv.pszVal); if (szAvatarHash != NULL) { TCHAR *sztAvatarHash = mir_a2t(szAvatarHash); - tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s."), sztAvatarHash); + tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s.", sztAvatarHash); mir_free(sztAvatarHash); mir_free(szAvatarHash); } @@ -197,12 +197,12 @@ void CMsnProto::MSN_GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t } else { TCHAR *sztModuleName = mir_a2t(m_szModuleName); - tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s avatar."), sztModuleName); + tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s avatar.", sztModuleName); mir_free(sztModuleName); } if (ext == NULL) { - mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("*")); + mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"*"); bool found = false; _tfinddata_t c_file; @@ -210,7 +210,7 @@ void CMsnProto::MSN_GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t if (hFile > -1L) { do { if (_tcsrchr(c_file.name, '.')) { - mir_sntprintf(pszDest + tPathLen2, cbLen - tPathLen2, _T("\\%s"), c_file.name); + mir_sntprintf(pszDest + tPathLen2, cbLen - tPathLen2, L"\\%s", c_file.name); found = true; } } while (_tfindnext(hFile, &c_file) == 0); @@ -317,10 +317,10 @@ void CMsnProto::MSN_GetCustomSmileyFileName(MCONTACT hContact, TCHAR* pszDest, s InitCustomFolders(); TCHAR* path = (TCHAR*)alloca(cbLen * sizeof(TCHAR)); - if (hCustomSmileyFolder == NULL || FoldersGetCustomPathT(hCustomSmileyFolder, path, (int)cbLen, _T(""))) { - TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_userdata%")); + if (hCustomSmileyFolder == NULL || FoldersGetCustomPathT(hCustomSmileyFolder, path, (int)cbLen, L"")) { + TCHAR *tmpPath = Utils_ReplaceVarsT(L"%miranda_userdata%"); TCHAR *tszModuleName = mir_a2t(m_szModuleName); - tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%s\\CustomSmiley"), tmpPath, tszModuleName); + tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%s\\CustomSmiley", tmpPath, tszModuleName); mir_free(tszModuleName); mir_free(tmpPath); } @@ -337,12 +337,12 @@ void CMsnProto::MSN_GetCustomSmileyFileName(MCONTACT hContact, TCHAR* pszDest, s _ui64tot((UINT_PTR)hContact, dbv.ptszVal, 10); } - tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s"), dbv.ptszVal); + tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", dbv.ptszVal); db_free(&dbv); } else { TCHAR *tszModuleName = mir_a2t(m_szModuleName); - tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s"), tszModuleName); + tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", tszModuleName); mir_free(tszModuleName); } @@ -357,8 +357,8 @@ void CMsnProto::MSN_GetCustomSmileyFileName(MCONTACT hContact, TCHAR* pszDest, s CreateDirectoryTreeT(pszDest); TCHAR *sztSmileyName = mir_a2t(SmileyName); - mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s.%s"), sztSmileyName, - type == MSN_APPID_CUSTOMSMILEY ? _T("png") : _T("gif")); + mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s.%s", sztSmileyName, + type == MSN_APPID_CUSTOMSMILEY ? L"png" : L"gif"); mir_free(sztSmileyName); } @@ -623,21 +623,21 @@ void CMsnProto::MSN_SendStatusMessage(const char*) if (ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT)) { LISTENINGTOINFO lti = { 0 }; lti.cbSize = sizeof(lti); - if (msnCurrentMedia.ptszTitle != NULL) lti.ptszTitle = _T("{0}"); - if (msnCurrentMedia.ptszArtist != NULL) lti.ptszArtist = _T("{1}"); - if (msnCurrentMedia.ptszAlbum != NULL) lti.ptszAlbum = _T("{2}"); - if (msnCurrentMedia.ptszTrack != NULL) lti.ptszTrack = _T("{3}"); - if (msnCurrentMedia.ptszYear != NULL) lti.ptszYear = _T("{4}"); - if (msnCurrentMedia.ptszGenre != NULL) lti.ptszGenre = _T("{5}"); - if (msnCurrentMedia.ptszLength != NULL) lti.ptszLength = _T("{6}"); - if (msnCurrentMedia.ptszPlayer != NULL) lti.ptszPlayer = _T("{7}"); - if (msnCurrentMedia.ptszType != NULL) lti.ptszType = _T("{8}"); - - TCHAR *tmp = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)_T("%title% - %artist%"), (LPARAM)<i); + if (msnCurrentMedia.ptszTitle != NULL) lti.ptszTitle = L"{0}"; + if (msnCurrentMedia.ptszArtist != NULL) lti.ptszArtist = L"{1}"; + if (msnCurrentMedia.ptszAlbum != NULL) lti.ptszAlbum = L"{2}"; + if (msnCurrentMedia.ptszTrack != NULL) lti.ptszTrack = L"{3}"; + if (msnCurrentMedia.ptszYear != NULL) lti.ptszYear = L"{4}"; + if (msnCurrentMedia.ptszGenre != NULL) lti.ptszGenre = L"{5}"; + if (msnCurrentMedia.ptszLength != NULL) lti.ptszLength = L"{6}"; + if (msnCurrentMedia.ptszPlayer != NULL) lti.ptszPlayer = L"{7}"; + if (msnCurrentMedia.ptszType != NULL) lti.ptszType = L"{8}"; + + TCHAR *tmp = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%title% - %artist%", (LPARAM)<i); szFormatEnc = HtmlEncodeUTF8T(tmp); mir_free(tmp); } - else szFormatEnc = HtmlEncodeUTF8T(_T("{0} - {1}")); + else szFormatEnc = HtmlEncodeUTF8T(L"{0} - {1}"); char *szArtist = HtmlEncodeUTF8T(msnCurrentMedia.ptszArtist), *szAlbum = HtmlEncodeUTF8T(msnCurrentMedia.ptszAlbum), @@ -788,7 +788,7 @@ void CMsnProto::MSN_SetServerStatus(int newStatus) if (!getStringUtf("Place", &dbv)) szPlace = dbv.pszVal; else { - TCHAR buf[128] = _T("Miranda"); + TCHAR buf[128] = L"Miranda"; DWORD buflen = _countof(buf); GetComputerName(buf, &buflen); szPlace = mir_utf8encodeT(buf); @@ -996,14 +996,14 @@ void CMsnProto::InitPopups(void) ppc.colorBack = RGB(173, 206, 247); ppc.colorText = GetSysColor(COLOR_WINDOWTEXT); ppc.iSeconds = 3; - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Hotmail")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Hotmail")); mir_snprintf(name, "%s_%s", m_szModuleName, "Hotmail"); hPopupHotmail = Popup_RegisterClass(&ppc); ppc.colorBack = RGB(173, 206, 247); ppc.colorText = GetSysColor(COLOR_WINDOWTEXT); ppc.iSeconds = 3; - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Notify")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Notify")); mir_snprintf(name, "%s_%s", m_szModuleName, "Notify"); hPopupNotify = Popup_RegisterClass(&ppc); @@ -1012,7 +1012,7 @@ void CMsnProto::InitPopups(void) ppc.colorText = RGB(255, 245, 225); //Yellow ppc.iSeconds = 60; - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Error")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Error")); mir_snprintf(name, "%s_%s", m_szModuleName, "Error"); hPopupError = Popup_RegisterClass(&ppc); } @@ -1026,7 +1026,7 @@ void CALLBACK sttMainThreadCallback(void *param) if ((iserr && !pud->proto->MyOptions.ShowErrorsAsPopups) || !ServiceExists(MS_POPUP_ADDPOPUPCLASS)) { if (pud->flags & MSN_ALLOW_MSGBOX) { TCHAR szMsg[MAX_SECONDLINE + MAX_CONTACTNAME]; - mir_sntprintf(szMsg, _T("%s:\n%s"), pud->title, pud->text); + mir_sntprintf(szMsg, L"%s:\n%s", pud->title, pud->text); int ret = MessageBox(NULL, szMsg, TranslateT("MSN Protocol"), MB_YESNO | (iserr ? MB_ICONERROR : MB_ICONINFORMATION)); if (ret == IDYES) diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 4db3c921d2..d7258e5533 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -492,7 +492,7 @@ void __cdecl CMsnProto::MsnFileAckThread(void* arg) filetransfer* ft = (filetransfer*)arg; TCHAR filefull[MAX_PATH]; - mir_sntprintf(filefull, _T("%s\\%s"), ft->std.tszWorkingDir, ft->std.tszCurrentFile); + mir_sntprintf(filefull, L"%s\\%s", ft->std.tszWorkingDir, ft->std.tszCurrentFile); replaceStrT(ft->std.tszCurrentFile, filefull); ResetEvent(ft->hResumeEvt); diff --git a/protocols/MSN/src/msn_skypeab.cpp b/protocols/MSN/src/msn_skypeab.cpp index 716b408726..d2b1b52444 100644 --- a/protocols/MSN/src/msn_skypeab.cpp +++ b/protocols/MSN/src/msn_skypeab.cpp @@ -45,7 +45,7 @@ static TCHAR* get_json_str(JSONNode *item, const char *pszValue) { if (JSONNode *node = json_get(item, pszValue)) { TCHAR *ret = json_as_string(node); - if (!mir_tstrcmp(ret, _T("null"))) { + if (!mir_tstrcmp(ret, L"null")) { mir_free(ret); return NULL; } @@ -197,7 +197,7 @@ bool CMsnProto::MSN_SKYABGetProfile(const char *wlid) if (value = get_json_str(item, "gender")) setByte(hContact, "Gender", (BYTE)(_ttoi(value) == 1 ? 'M' : 'F')); if (value = get_json_str(item, "birthday")) { int d, m, y; - _stscanf(value, _T("%d-%d-%d"), &y, &m, &d); + _stscanf(value, L"%d-%d-%d", &y, &m, &d); setWord(hContact, "BirthYear", y); setByte(hContact, "BirthDay", d); setByte(hContact, "BirthMonth", m); diff --git a/protocols/MSN/src/msn_soapstore.cpp b/protocols/MSN/src/msn_soapstore.cpp index b8c52b9e73..09c8844223 100644 --- a/protocols/MSN/src/msn_soapstore.cpp +++ b/protocols/MSN/src/msn_soapstore.cpp @@ -282,7 +282,7 @@ bool CMsnProto::MSN_StoreGetProfile(bool allowRecurse) while (docstr) { const char *docname = ezxml_txt(ezxml_child(docstr, "DocumentStreamName")); if (!mir_strcmp(docname, "UserTileStatic")) { - getMyAvatarFile(ezxml_txt(ezxml_child(docstr, "PreAuthURL")), _T("miranda_avatar.tmp")); + getMyAvatarFile(ezxml_txt(ezxml_child(docstr, "PreAuthURL")), L"miranda_avatar.tmp"); break; } docstr = ezxml_next(docstr); diff --git a/protocols/MSN/src/msn_std.cpp b/protocols/MSN/src/msn_std.cpp index 4df80b1c65..1edd062c00 100644 --- a/protocols/MSN/src/msn_std.cpp +++ b/protocols/MSN/src/msn_std.cpp @@ -54,7 +54,7 @@ TCHAR* CMsnProto::GetContactNameT(MCONTACT hContact) return m_DisplayNameCache = str; } - return _T("Me"); + return L"Me"; } unsigned MSN_GenRandom(void) diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 502ed01b46..0a9e5b5b0b 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -139,7 +139,7 @@ INT_PTR CMsnProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) ft->std.hContact = pai->hContact; ft->p2p_object = mir_strdup(szContext); - MSN_GetAvatarFileName(pai->hContact, filename, _countof(filename), _T("unk")); + MSN_GetAvatarFileName(pai->hContact, filename, _countof(filename), L"unk"); ft->std.tszCurrentFile = mir_tstrdup(filename); p2p_invite(MSN_APPID_AVATAR, ft, NULL); @@ -340,10 +340,10 @@ INT_PTR CMsnProto::SetCurrentMedia(WPARAM, LPARAM lParam) msnCurrentMedia.cbSize = sizeof(msnCurrentMedia); // Marks that there is info set msnCurrentMedia.dwFlags = LTI_TCHAR; - overrideStr(msnCurrentMedia.ptszType, cm->ptszType, unicode, _T("Music")); + overrideStr(msnCurrentMedia.ptszType, cm->ptszType, unicode, L"Music"); overrideStr(msnCurrentMedia.ptszArtist, cm->ptszArtist, unicode); overrideStr(msnCurrentMedia.ptszAlbum, cm->ptszAlbum, unicode); - overrideStr(msnCurrentMedia.ptszTitle, cm->ptszTitle, unicode, _T("No Title")); + overrideStr(msnCurrentMedia.ptszTitle, cm->ptszTitle, unicode, L"No Title"); overrideStr(msnCurrentMedia.ptszTrack, cm->ptszTrack, unicode); overrideStr(msnCurrentMedia.ptszYear, cm->ptszYear, unicode); overrideStr(msnCurrentMedia.ptszGenre, cm->ptszGenre, unicode); @@ -357,11 +357,11 @@ INT_PTR CMsnProto::SetCurrentMedia(WPARAM, LPARAM lParam) else { TCHAR *text; if (ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT)) - text = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)_T("%title% - %artist%"), (LPARAM)&msnCurrentMedia); + text = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%title% - %artist%", (LPARAM)&msnCurrentMedia); else { text = (TCHAR *)mir_alloc(128 * sizeof(TCHAR)); - mir_sntprintf(text, 128, _T("%s - %s"), (msnCurrentMedia.ptszTitle ? msnCurrentMedia.ptszTitle : _T("")), - (msnCurrentMedia.ptszArtist ? msnCurrentMedia.ptszArtist : _T(""))); + mir_sntprintf(text, 128, L"%s - %s", (msnCurrentMedia.ptszTitle ? msnCurrentMedia.ptszTitle : L""), + (msnCurrentMedia.ptszArtist ? msnCurrentMedia.ptszArtist : L"")); } setTString("ListeningTo", text); mir_free(text); diff --git a/protocols/MinecraftDynmap/src/chat.cpp b/protocols/MinecraftDynmap/src/chat.cpp index 7cbbb474fb..4317adf91a 100644 --- a/protocols/MinecraftDynmap/src/chat.cpp +++ b/protocols/MinecraftDynmap/src/chat.cpp @@ -99,9 +99,9 @@ void MinecraftDynmapProto::AddChatContact(const char *name) gce.bIsMe = (m_nick == name); if (gce.bIsMe) - gce.ptszStatus = _T("Admin"); + gce.ptszStatus = L"Admin"; else - gce.ptszStatus = _T("Normal"); + gce.ptszStatus = L"Normal"; CallServiceSync(MS_GC_EVENT,0,reinterpret_cast<LPARAM>(&gce)); } @@ -140,10 +140,10 @@ INT_PTR MinecraftDynmapProto::OnJoinChat(WPARAM,LPARAM suppress) GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_ADDGROUP }; GCEVENT gce = { sizeof(gce), &gcd }; - gce.ptszStatus = _T("Admin"); + gce.ptszStatus = L"Admin"; CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce)); - gce.ptszStatus = _T("Normal"); + gce.ptszStatus = L"Normal"; CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce)); // Note: Initialization will finish up in SetChatStatus, called separately diff --git a/protocols/MinecraftDynmap/src/communication.cpp b/protocols/MinecraftDynmap/src/communication.cpp index 9b2b6bca91..4e24ddafa4 100644 --- a/protocols/MinecraftDynmap/src/communication.cpp +++ b/protocols/MinecraftDynmap/src/communication.cpp @@ -281,7 +281,7 @@ bool MinecraftDynmapProto::doEvents() // TODO: there are also "channel" and "account" elements if (!time_ || !playerName_ || !message_) { - debugLog(_T("Error: No player name, time or text for message")); + debugLog(L"Error: No player name, time or text for message"); continue; } @@ -289,7 +289,7 @@ bool MinecraftDynmapProto::doEvents() std::string name = playerName_.as_string(); std::string message = message_.as_string(); - debugLog(_T("Received message: [%d] %s -> %s"), timestamp, name.c_str(), message.c_str()); + debugLog(L"Received message: [%d] %s -> %s", timestamp, name.c_str(), message.c_str()); UpdateChat(name.c_str(), message.c_str(), timestamp); } } diff --git a/protocols/MinecraftDynmap/src/proto.cpp b/protocols/MinecraftDynmap/src/proto.cpp index 57952c1a2e..f2a15d6065 100644 --- a/protocols/MinecraftDynmap/src/proto.cpp +++ b/protocols/MinecraftDynmap/src/proto.cpp @@ -52,7 +52,7 @@ MinecraftDynmapProto::MinecraftDynmapProto(const char* proto_name, const TCHAR* if (m_hNetlibUser == NULL) { TCHAR error[200]; mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName); - MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR); + MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR); } // Client instantiation diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp index f82ff24fdc..6fe46e57b4 100644 --- a/protocols/Omegle/src/chat.cpp +++ b/protocols/Omegle/src/chat.cpp @@ -25,7 +25,7 @@ void OmegleProto::UpdateChat(const TCHAR *name, const TCHAR *message, bool addto { // replace % to %% to not interfere with chat color codes std::tstring smessage = message; - utils::text::treplace_all(&smessage, _T("%"), _T("%%")); + utils::text::treplace_all(&smessage, L"%", L"%%"); GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_MESSAGE }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -241,9 +241,9 @@ void OmegleProto::AddChatContact(const TCHAR *name) gce.bIsMe = mir_tstrcmp(name, this->facy.nick_); if (gce.bIsMe) - gce.ptszStatus = _T("Admin"); + gce.ptszStatus = L"Admin"; else - gce.ptszStatus = _T("Normal"); + gce.ptszStatus = L"Normal"; CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce)); } @@ -281,10 +281,10 @@ INT_PTR OmegleProto::OnJoinChat(WPARAM, LPARAM suppress) GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_ADDGROUP }; GCEVENT gce = { sizeof(gce), &gcd }; - gce.ptszStatus = _T("Admin"); + gce.ptszStatus = L"Admin"; CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce)); - gce.ptszStatus = _T("Normal"); + gce.ptszStatus = L"Normal"; CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce)); SetTopic(); diff --git a/protocols/Omegle/src/communication.cpp b/protocols/Omegle/src/communication.cpp index 2db3c5255b..db1391ba82 100644 --- a/protocols/Omegle/src/communication.cpp +++ b/protocols/Omegle/src/communication.cpp @@ -538,10 +538,10 @@ bool Omegle_client::events() for (size_t i = 0; i < size; i++) { likes += ptrT(json_as_string(json_at(items, i))); if (i < size - 1) - likes += _T(", "); + likes += L", "; } - parent->debugLog(_T("Got common likes: '%s'"), likes.c_str()); + parent->debugLog(L"Got common likes: '%s'", likes.c_str()); parent->SetTopic(likes.c_str()); } else if (name == "question") { @@ -556,7 +556,7 @@ bool Omegle_client::events() st.cbSize = sizeof(st); st.hIcon = IcoLib_GetIconByHandle(GetIconHandle("typing_on")); - ptrT who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_tstrdup(_T("Stranger"))); + ptrT who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_tstrdup(L"Stranger")); mir_sntprintf(st.tszText, TranslateT("%s is typing."), TranslateTS(who)); CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)parent->GetChatHandle(), (LPARAM)&st); @@ -569,7 +569,7 @@ bool Omegle_client::events() st.cbSize = sizeof(st); st.hIcon = IcoLib_GetIconByHandle(GetIconHandle("typing_off")); - ptrT who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_tstrdup(_T("Stranger"))); + ptrT who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_tstrdup(L"Stranger")); mir_sntprintf(st.tszText, TranslateT("%s stopped typing."), TranslateTS(who)); CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)parent->GetChatHandle(), (LPARAM)&st); diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index 3f464a4322..42d0249c1d 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -52,7 +52,7 @@ PROTO<OmegleProto>(proto_name, username) if (m_hNetlibUser == NULL) { TCHAR error[200]; mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName); - MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR); + MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR); } facy.set_handle(m_hNetlibUser); diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp index d4aee066df..46cf1bbf83 100644 --- a/protocols/Sametime/src/conference.cpp +++ b/protocols/Sametime/src/conference.cpp @@ -27,12 +27,12 @@ void mwServiceConf_on_invited(mwConference* conf, mwLoginInfo* inviter, const ch { GList *members, *mem; CSametimeProto* proto = getProtoFromMwConference(conf); - proto->debugLog(_T("mwServiceConf_on_invited() start")); + proto->debugLog(L"mwServiceConf_on_invited() start"); members = mem = mwConference_getMembers(conf); for (;mem;mem=mem->next) { if (proto->my_login_info && strcmp(proto->my_login_info->login_id, ((mwLoginInfo*)mem->data)->login_id) == 0) { - proto->debugLog(_T("mwServiceConf_on_invited() already present")); + proto->debugLog(L"mwServiceConf_on_invited() already present"); mwConference_reject(conf, 0, T2Utf(TranslateT("Invitation rejected - already present."))); return; } @@ -46,11 +46,11 @@ void mwServiceConf_on_invited(mwConference* conf, mwLoginInfo* inviter, const ch MultiByteToWideChar(CP_UTF8, 0, (const char*)invite, -1, ws_invite, 128); if (MessageBoxW(0, ws_invite, ws_username, MB_OKCANCEL) == IDOK) { - proto->debugLog(_T("mwServiceConf_on_invited() mwConference_accept")); + proto->debugLog(L"mwServiceConf_on_invited() mwConference_accept"); mwConference_accept(conf); } else { - proto->debugLog(_T("mwServiceConf_on_invited() mwConference_reject")); + proto->debugLog(L"mwServiceConf_on_invited() mwConference_reject"); char* temp = mir_utf8encodeT(TranslateT("Your invitation has been rejected.")); mwConference_reject(conf, 0, temp); mir_free(temp); @@ -59,7 +59,7 @@ void mwServiceConf_on_invited(mwConference* conf, mwLoginInfo* inviter, const ch void CSametimeProto::ClearInviteQueue() { - debugLog(_T("CSametimeProto::ClearInviteQueue() start")); + debugLog(L"CSametimeProto::ClearInviteQueue() start"); if (!my_conference) return; @@ -106,7 +106,7 @@ void CSametimeProto::ClearInviteQueue() void mwServiceConf_conf_opened(mwConference* conf, GList* members) { CSametimeProto* proto = getProtoFromMwConference(conf); - proto->debugLog(_T("mwServiceConf_conf_opened() start")); + proto->debugLog(L"mwServiceConf_conf_opened() start"); TCHAR* tszConfId = mir_utf8decodeT(mwConference_getName(conf)); TCHAR* tszConfTitle = mir_utf8decodeT(mwConference_getTitle(conf)); @@ -139,7 +139,7 @@ void mwServiceConf_conf_opened(mwConference* conf, GList* members) GList *user = members; for (;user; user=user->next) { - proto->debugLog(_T("mwServiceConf_conf_opened() add user")); + proto->debugLog(L"mwServiceConf_conf_opened() add user"); TCHAR* tszUserName = mir_utf8decodeT(((mwLoginInfo*)user->data)->user_name); TCHAR* tszUserId = mir_utf8decodeT(((mwLoginInfo*)user->data)->login_id); @@ -171,7 +171,7 @@ void mwServiceConf_conf_opened(mwConference* conf, GList* members) void mwServiceConf_conf_closed(mwConference* conf, guint32 reason) { CSametimeProto* proto = getProtoFromMwConference(conf); - proto->debugLog(_T("mwServiceConf_conf_closed() start")); + proto->debugLog(L"mwServiceConf_conf_closed() start"); TCHAR* tszConfId = mir_utf8decodeT(mwConference_getName(conf)); @@ -191,7 +191,7 @@ void mwServiceConf_conf_closed(mwConference* conf, guint32 reason) void mwServiceConf_on_peer_joined(mwConference* conf, mwLoginInfo *user) { CSametimeProto* proto = getProtoFromMwConference(conf); - proto->debugLog(_T("mwServiceConf_on_peer_joined() start")); + proto->debugLog(L"mwServiceConf_on_peer_joined() start"); MCONTACT hContact = proto->FindContactByUserId(user->user_id); if (!hContact) { @@ -221,7 +221,7 @@ void mwServiceConf_on_peer_joined(mwConference* conf, mwLoginInfo *user) gce.dwFlags = GCEF_ADDTOLOG; gce.ptszNick = tszUserName; gce.ptszUID = tszUserId; - gce.ptszStatus = _T("Normal"); + gce.ptszStatus = L"Normal"; gce.time = (DWORD)time(0); CallServiceSync(MS_GC_EVENT, 0, (LPARAM) &gce); @@ -235,7 +235,7 @@ void mwServiceConf_on_peer_joined(mwConference* conf, mwLoginInfo *user) void mwServiceConf_on_peer_parted(mwConference* conf, mwLoginInfo* user) { CSametimeProto* proto = getProtoFromMwConference(conf); - proto->debugLog(_T("mwServiceConf_on_peer_parted() start")); + proto->debugLog(L"mwServiceConf_on_peer_parted() start"); ptrT tszConfId(mir_utf8decodeT(mwConference_getName(conf))); ptrT tszUserName(mir_utf8decodeT(user->user_name)); @@ -250,7 +250,7 @@ void mwServiceConf_on_peer_parted(mwConference* conf, mwLoginInfo* user) gce.dwFlags = GCEF_ADDTOLOG; gce.ptszNick = tszUserName; gce.ptszUID = tszUserId; - gce.ptszStatus = _T("Normal"); + gce.ptszStatus = L"Normal"; gce.time = (DWORD)time(0); CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce); } @@ -259,7 +259,7 @@ void mwServiceConf_on_peer_parted(mwConference* conf, mwLoginInfo* user) void mwServiceConf_on_text(mwConference* conf, mwLoginInfo* user, const char* what) { CSametimeProto* proto = getProtoFromMwConference(conf); - proto->debugLog(_T("mwServiceConf_on_text() start")); + proto->debugLog(L"mwServiceConf_on_text() start"); TCHAR* tszConfId = mir_utf8decodeT(mwConference_getName(conf)); @@ -290,7 +290,7 @@ void mwServiceConf_on_text(mwConference* conf, mwLoginInfo* user, const char* wh void mwServiceConf_on_typing(mwConference* conf, mwLoginInfo* who, gboolean typing) { CSametimeProto* proto = getProtoFromMwConference(conf); - proto->debugLog(_T("mwServiceConf_on_typing() start")); + proto->debugLog(L"mwServiceConf_on_typing() start"); ///TODO unimplemented } @@ -312,7 +312,7 @@ mwConferenceHandler mwConference_handler = { void CSametimeProto::TerminateConference(char* name) { - debugLog(_T("CSametimeProto::TerminateConference() start")); + debugLog(L"CSametimeProto::TerminateConference() start"); GList *conferences, *conf; conferences = conf = mwServiceConference_getConferences(service_conference); @@ -346,17 +346,17 @@ int CSametimeProto::GcEventHook(WPARAM wParam, LPARAM lParam) { switch(gch->pDest->iType) { case GC_USER_MESSAGE: { - debugLog(_T("CSametimeProto::GcEventHook() GC_USER_MESSAGE")); + debugLog(L"CSametimeProto::GcEventHook() GC_USER_MESSAGE"); mwConference_sendText((mwConference*)conf->data, T2Utf(gch->ptszText)); } break; case GC_SESSION_TERMINATE: { if (my_conference == conf->data){ - debugLog(_T("CSametimeProto::GcEventHook() GC_SESSION_TERMINATE CloseMyConference")); + debugLog(L"CSametimeProto::GcEventHook() GC_SESSION_TERMINATE CloseMyConference"); CloseMyConference(this); } else { - debugLog(_T("CSametimeProto::GcEventHook() GC_SESSION_TERMINATE mwConference_destroy")); + debugLog(L"CSametimeProto::GcEventHook() GC_SESSION_TERMINATE mwConference_destroy"); mwConference_destroy((mwConference*)conf->data, 0, T2Utf(TranslateT("I'm outa here."))); } } @@ -378,7 +378,7 @@ int CSametimeProto::ChatDeleted(MCONTACT hContact) { if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 0) return 0; - debugLog(_T("CSametimeProto::ChatDeleted() hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::ChatDeleted() hContact=[%x]", hContact); DBVARIANT dbv; if (!db_get_s(hContact, m_szModuleName, "ChatRoomID", &dbv)) { TerminateConference(dbv.pszVal); @@ -392,7 +392,7 @@ int CSametimeProto::ChatDeleted(MCONTACT hContact) { INT_PTR CSametimeProto::onMenuLeaveChat(WPARAM wParam, LPARAM lParam) { MCONTACT hContact = (MCONTACT)wParam; - debugLog(_T("CSametimeProto::onMenuLeaveChat() hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::onMenuLeaveChat() hContact=[%x]", hContact); ChatDeleted(hContact); return 0; } @@ -401,7 +401,7 @@ INT_PTR CSametimeProto::onMenuLeaveChat(WPARAM wParam, LPARAM lParam) INT_PTR CSametimeProto::onMenuCreateChat(WPARAM wParam, LPARAM lParam) { MCONTACT hContact = (MCONTACT)wParam; - debugLog(_T("CSametimeProto::onMenuCreateChat() hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::onMenuCreateChat() hContact=[%x]", hContact); mwAwareIdBlock id_block; mwIdBlock idb; if (my_login_info && GetAwareIdFromContact(hContact, &id_block)) { @@ -416,12 +416,12 @@ INT_PTR CSametimeProto::onMenuCreateChat(WPARAM wParam, LPARAM lParam) invite_queue.push(idb.user); if (!my_conference) { - debugLog(_T("CSametimeProto::onMenuCreateChat() mwConference_open")); + debugLog(L"CSametimeProto::onMenuCreateChat() mwConference_open"); my_conference = mwConference_new(service_conference, T2Utf(title)); mwConference_open(my_conference); } else { - debugLog(_T("CSametimeProto::onMenuCreateChat() ClearInviteQueue")); + debugLog(L"CSametimeProto::onMenuCreateChat() ClearInviteQueue"); ClearInviteQueue(); } @@ -434,7 +434,7 @@ INT_PTR CSametimeProto::onMenuCreateChat(WPARAM wParam, LPARAM lParam) int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { MCONTACT hContact = (MCONTACT)wParam; - debugLog(_T("CSametimeProto::PrebuildContactMenu() hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::PrebuildContactMenu() hContact=[%x]", hContact); Menu_ShowItem(hLeaveChatMenuItem, db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 1); @@ -463,7 +463,7 @@ int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) void CSametimeProto::InitConference() { - debugLog(_T("CSametimeProto::InitConference()")); + debugLog(L"CSametimeProto::InitConference()"); my_login_info = mwSession_getLoginInfo(session); @@ -476,7 +476,7 @@ void CSametimeProto::InitConference() void CSametimeProto::DeinitConference() { GList *conferences, *conf; - debugLog(_T("CSametimeProto::DeinitConference()")); + debugLog(L"CSametimeProto::DeinitConference()"); if (service_conference){ conferences = conf = mwServiceConference_getConferences(service_conference); @@ -500,7 +500,7 @@ void CSametimeProto::DeinitConference() void CSametimeProto::InitConferenceMenu() { - debugLog(_T("CSametimeProto::InitConferenceMenu()")); + debugLog(L"CSametimeProto::InitConferenceMenu()"); CreateProtoService(MS_SAMETIME_MENULEAVECHAT, &CSametimeProto::onMenuLeaveChat); CreateProtoService(MS_SAMETIME_MENUCREATECHAT, &CSametimeProto::onMenuCreateChat); diff --git a/protocols/Sametime/src/files.cpp b/protocols/Sametime/src/files.cpp index 4782563a7e..bbc71b346b 100644 --- a/protocols/Sametime/src/files.cpp +++ b/protocols/Sametime/src/files.cpp @@ -13,11 +13,11 @@ CSametimeProto* getProtoFromMwFileTransfer(mwFileTransfer* ft) void mwFileTransfer_offered(mwFileTransfer* ft) { CSametimeProto* proto = getProtoFromMwFileTransfer(ft); - proto->debugLog(_T("mwFileTransfer_offered() start")); + proto->debugLog(L"mwFileTransfer_offered() start"); const mwIdBlock* idb = mwFileTransfer_getUser(ft); MCONTACT hContact = proto->FindContactByUserId(idb->user); - proto->debugLog(_T("Sametime mwFileTransfer_offered hContact=[%x]"), hContact); + proto->debugLog(L"Sametime mwFileTransfer_offered hContact=[%x]", hContact); if (!hContact) { mwSametimeList* user_list = mwSametimeList_new(); @@ -33,7 +33,7 @@ void mwFileTransfer_offered(mwFileTransfer* ft) TCHAR descriptionT[512]; if (message) { TCHAR* messageT = mir_utf8decodeT(message); - mir_sntprintf(descriptionT, _T("%s - %s"), filenameT, messageT); + mir_sntprintf(descriptionT, L"%s - %s", filenameT, messageT); mir_free(messageT); } else _tcsncpy_s(descriptionT, filenameT, _TRUNCATE); @@ -59,7 +59,7 @@ int SendFileChunk(CSametimeProto* proto, mwFileTransfer* ft, FileTransferClientD return 0; if (!ReadFile(ftcd->hFile, ftcd->buffer, FILE_BUFF_SIZE, &bytes_read, 0)) { - proto->debugLog(_T("Sametime closing file transfer (SendFileChunk)")); + proto->debugLog(L"Sametime closing file transfer (SendFileChunk)"); mwFileTransfer_close(ft, mwFileTransfer_SUCCESS); return 0; } @@ -79,7 +79,7 @@ void __cdecl SendThread(LPVOID param) { CSametimeProto* proto = getProtoFromMwFileTransfer(ft); FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft); - proto->debugLog(_T("SendThread() start")); + proto->debugLog(L"SendThread() start"); PROTOFILETRANSFERSTATUS pfts = {0}; @@ -114,7 +114,7 @@ void __cdecl SendThread(LPVOID param) { if (ftcd->buffer) delete[] ftcd->buffer; delete ftcd; - proto->debugLog(_T("SendThread() end")); + proto->debugLog(L"SendThread() end"); return; } @@ -124,7 +124,7 @@ void mwFileTransfer_opened(mwFileTransfer* ft) CSametimeProto* proto = getProtoFromMwFileTransfer(ft); FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft); - proto->debugLog(_T("Sametime mwFileTransfer_opened start")); + proto->debugLog(L"Sametime mwFileTransfer_opened start"); if (ftcd->sending) { // create a thread to send chunks - since it seems not all clients send acks for each of our chunks! @@ -139,7 +139,7 @@ void mwFileTransfer_closed(mwFileTransfer* ft, guint32 code) { CSametimeProto* proto = getProtoFromMwFileTransfer(ft); FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft); - proto->debugLog(_T("mwFileTransfer_closed() start")); + proto->debugLog(L"mwFileTransfer_closed() start"); if (ftcd) { if (ftcd->hFile != INVALID_HANDLE_VALUE) @@ -217,14 +217,14 @@ void mwFileTransfer_recv(mwFileTransfer* ft, struct mwOpaque* data) { CSametimeProto* proto = getProtoFromMwFileTransfer(ft); FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft); - proto->debugLog(_T("mwFileTransfer_recv() start")); + proto->debugLog(L"mwFileTransfer_recv() start"); DWORD bytes_written; if (!WriteFile(ftcd->hFile, data->data, data->len, &bytes_written, 0)) { - proto->debugLog(_T("mwFileTransfer_recv() !WriteFile")); + proto->debugLog(L"mwFileTransfer_recv() !WriteFile"); mwFileTransfer_cancel(ft); proto->ProtoBroadcastAck(ftcd->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ftcd->hFt, 0); - proto->debugLog(_T("mwFileTransfer_recv() ACKRESULT_FAILED")); + proto->debugLog(L"mwFileTransfer_recv() ACKRESULT_FAILED"); } else { mwFileTransfer_ack(ft); // acknowledge chunk @@ -248,11 +248,11 @@ void mwFileTransfer_recv(mwFileTransfer* ft, struct mwOpaque* data) pfts.currentFileTime = 0; //? proto->ProtoBroadcastAck(ftcd->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ftcd->hFt, (LPARAM)&pfts); - proto->debugLog(_T("mwFileTransfer_recv() ACKRESULT_DATA")); + proto->debugLog(L"mwFileTransfer_recv() ACKRESULT_DATA"); if (mwFileTransfer_isDone(ft)) { proto->ProtoBroadcastAck(ftcd->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ftcd->hFt, 0); - proto->debugLog(_T("mwFileTransfer_recv() ACKRESULT_SUCCESS")); + proto->debugLog(L"mwFileTransfer_recv() ACKRESULT_SUCCESS"); } } } @@ -265,7 +265,7 @@ void mwFileTransfer_handle_ack(mwFileTransfer* ft) // see SendThread above - not all clients send us acks CSametimeProto* proto = getProtoFromMwFileTransfer(ft); //FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft); - proto->debugLog(_T("mwFileTransfer_handle_ack()")); + proto->debugLog(L"mwFileTransfer_handle_ack()"); } /** optional. called from mwService_free */ @@ -284,7 +284,7 @@ mwFileTransferHandler mwFileTransfer_handler = { HANDLE CSametimeProto::SendFilesToUser(MCONTACT hContact, TCHAR** files, const TCHAR* ptszDesc) { - debugLog(_T("CSametimeProto::SendFilesToUser() start")); + debugLog(L"CSametimeProto::SendFilesToUser() start"); mwAwareIdBlock id_block; if (GetAwareIdFromContact(hContact, &id_block)) { @@ -359,7 +359,7 @@ HANDLE CSametimeProto::AcceptFileTransfer(MCONTACT hContact, HANDLE hFt, char* s mwFileTransfer* ft = (mwFileTransfer*)hFt; CSametimeProto* proto = getProtoFromMwFileTransfer(ft); - debugLog(_T("CSametimeProto::AcceptFileTransfer() start")); + debugLog(L"CSametimeProto::AcceptFileTransfer() start"); FileTransferClientData* ftcd = new FileTransferClientData; memset(ftcd, 0, sizeof(FileTransferClientData)); @@ -388,7 +388,7 @@ HANDLE CSametimeProto::AcceptFileTransfer(MCONTACT hContact, HANDLE hFt, char* s ftcd->hFile = CreateFileA(fp, GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_ALWAYS, 0, 0); if (ftcd->hFile == INVALID_HANDLE_VALUE) { - debugLog(_T("CSametimeProto::AcceptFileTransfer() INVALID_HANDLE_VALUE")); + debugLog(L"CSametimeProto::AcceptFileTransfer() INVALID_HANDLE_VALUE"); mwFileTransfer_close(ft, mwFileTransfer_ERROR); return 0; } @@ -405,7 +405,7 @@ void CSametimeProto::RejectFileTransfer(HANDLE hFt) { mwFileTransfer* ft = (mwFileTransfer*)hFt; CSametimeProto* proto = getProtoFromMwFileTransfer(ft); - debugLog(_T("CSametimeProto::RejectFileTransfer() start")); + debugLog(L"CSametimeProto::RejectFileTransfer() start"); mwFileTransfer_reject(ft); } @@ -414,7 +414,7 @@ void CSametimeProto::CancelFileTransfer(HANDLE hFt) { mwFileTransfer* ft = (mwFileTransfer*)hFt; CSametimeProto* proto = getProtoFromMwFileTransfer(ft); - debugLog(_T("CSametimeProto::CancelFileTransfer() start")); + debugLog(L"CSametimeProto::CancelFileTransfer() start"); FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft); @@ -429,13 +429,13 @@ void CSametimeProto::CancelFileTransfer(HANDLE hFt) void CSametimeProto::InitFiles() { - debugLog(_T("CSametimeProto::InitFiles()")); + debugLog(L"CSametimeProto::InitFiles()"); mwSession_addService(session, (mwService*)(service_files = mwServiceFileTransfer_new(session, &mwFileTransfer_handler))); } void CSametimeProto::DeinitFiles() { - debugLog(_T("CSametimeProto::DeinitFiles()")); + debugLog(L"CSametimeProto::DeinitFiles()"); mwSession_removeService(session, mwService_FILE_TRANSFER); mwService_free((mwService*)service_files); service_files = 0; diff --git a/protocols/Sametime/src/messaging.cpp b/protocols/Sametime/src/messaging.cpp index 0a7f8a24f2..2bde61b90e 100644 --- a/protocols/Sametime/src/messaging.cpp +++ b/protocols/Sametime/src/messaging.cpp @@ -12,13 +12,13 @@ CSametimeProto* getProtoFromMwConversation(mwConversation* conv) void mwIm_conversation_opened(mwConversation* conv) { CSametimeProto* proto = getProtoFromMwConversation(conv); - proto->debugLog(_T("mwIm_conversation_opened() start")); + proto->debugLog(L"mwIm_conversation_opened() start"); mwIdBlock* idb = mwConversation_getTarget(conv); MCONTACT hContact = proto->FindContactByUserId(idb->user); if (!hContact) { - proto->debugLog(_T("mwIm_conversation_opened() !hContact")); + proto->debugLog(L"mwIm_conversation_opened() !hContact"); mwSametimeList* user_list = mwSametimeList_new(); mwSametimeGroup* stgroup = mwSametimeGroup_new(user_list, mwSametimeGroup_NORMAL, Translate("None")); mwSametimeUser* stuser = mwSametimeUser_new(stgroup, mwSametimeUser_NORMAL, idb); @@ -45,7 +45,7 @@ void mwIm_conversation_opened(mwConversation* conv) void mwIm_conversation_closed(mwConversation* conv, guint32 err) { CSametimeProto* proto = getProtoFromMwConversation(conv); - proto->debugLog(_T("mwIm_conversation_closed() start err=[%d]"), err); + proto->debugLog(L"mwIm_conversation_closed() start err=[%d]", err); if (err & ERR_FAILURE && err != CONNECTION_RESET) { proto->showPopup(err); @@ -67,11 +67,11 @@ void mwIm_conversation_closed(mwConversation* conv, guint32 err) void mwIm_conversation_recv(mwConversation* conv, mwImSendType type, gconstpointer msg) { CSametimeProto* proto = getProtoFromMwConversation(conv); - proto->debugLog(_T("mwIm_conversation_recv() start")); + proto->debugLog(L"mwIm_conversation_recv() start"); mwIdBlock* idb = mwConversation_getTarget(conv); MCONTACT hContact = proto->FindContactByUserId(idb->user); - proto->debugLog(_T("mwIm_conversation_recv() type=[%d] hContact=[%x]"), type, hContact); + proto->debugLog(L"mwIm_conversation_recv() type=[%d] hContact=[%x]", type, hContact); if (type == mwImSend_TYPING) { CallService(MS_PROTO_CONTACTISTYPING, hContact, (GPOINTER_TO_UINT(msg) == 0 ? 0 : 2)); @@ -91,7 +91,7 @@ void mwIm_conversation_recv(mwConversation* conv, mwImSendType type, gconstpoint void mwIm_place_invite(struct mwConversation* conv, const char* message, const char* title, const char* name) { CSametimeProto* proto = getProtoFromMwConversation(conv); - proto->debugLog(_T("mwIm_place_invite() start")); + proto->debugLog(L"mwIm_place_invite() start"); ///TODO unimplemented @@ -114,7 +114,7 @@ mwImHandler mwIm_handler = { HANDLE CSametimeProto::SendMessageToUser(MCONTACT hContact, const char *szMsg) { - debugLog(_T("CSametimeProto::SendMessageToUser() hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::SendMessageToUser() hContact=[%x]", hContact); mwAwareIdBlock id_block; if (GetAwareIdFromContact(hContact, &id_block)) { @@ -125,13 +125,13 @@ HANDLE CSametimeProto::SendMessageToUser(MCONTACT hContact, const char *szMsg) mwConversation* conv = mwServiceIm_getConversation(service_im, &idb); if (conv) { if (!mwConversation_isOpen(conv)) { - debugLog(_T("CSametimeProto::SendMessageToUser() mwConversation_isOpen")); + debugLog(L"CSametimeProto::SendMessageToUser() mwConversation_isOpen"); mir_cslock lck(q_cs); contact_message_queue[hContact].push(szMsg); mwConversation_open(conv); } else { - debugLog(_T("CSametimeProto::SendMessageToUser() !mwConversation_isOpen")); + debugLog(L"CSametimeProto::SendMessageToUser() !mwConversation_isOpen"); mwConversation_send(conv, mwImSend_PLAIN, szMsg); } @@ -147,7 +147,7 @@ HANDLE CSametimeProto::SendMessageToUser(MCONTACT hContact, const char *szMsg) void CSametimeProto::SendTyping(MCONTACT hContact, bool typing) { - debugLog(_T("CSametimeProto::SendTyping() hContact=[%x] type=[%d]"), hContact, typing); + debugLog(L"CSametimeProto::SendTyping() hContact=[%x] type=[%d]", hContact, typing); mwAwareIdBlock id_block; if (GetAwareIdFromContact(hContact, &id_block)) { @@ -158,7 +158,7 @@ void CSametimeProto::SendTyping(MCONTACT hContact, bool typing) mwConversation* conv = mwServiceIm_getConversation(service_im, &idb); if (conv) { if (mwConversation_isOpen(conv)) { - debugLog(_T("CSametimeProto::SendTyping() send")); + debugLog(L"CSametimeProto::SendTyping() send"); mwConversation_send(conv, mwImSend_TYPING, (gconstpointer)GUINT_TO_POINTER(typing ? 1 : 0)); } } @@ -169,7 +169,7 @@ void CSametimeProto::SendTyping(MCONTACT hContact, bool typing) void CSametimeProto::CloseIm(MCONTACT hContact) { - debugLog(_T("CSametimeProto::CloseIm() hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::CloseIm() hContact=[%x]", hContact); mwAwareIdBlock id_block; if (GetAwareIdFromContact(hContact, &id_block)) { @@ -180,7 +180,7 @@ void CSametimeProto::CloseIm(MCONTACT hContact) mwConversation* conv = mwServiceIm_getConversation(service_im, &idb); if (conv) { if (mwConversation_isOpen(conv)) { - debugLog(_T("CSametimeProto::CloseIm() mwConversation_close")); + debugLog(L"CSametimeProto::CloseIm() mwConversation_close"); mwConversation_close(conv, 0); } } @@ -190,14 +190,14 @@ void CSametimeProto::CloseIm(MCONTACT hContact) void CSametimeProto::InitMessaging() { - debugLog(_T("CSametimeProto::InitMessaging()")); + debugLog(L"CSametimeProto::InitMessaging()"); mwSession_addService(session, (mwService*)(service_im = mwServiceIm_new(session, &mwIm_handler))); mwServiceIm_setClientType(service_im, mwImClient_PLAIN); } void CSametimeProto::DeinitMessaging() { - debugLog(_T("CSametimeProto::DeinitMessaging()")); + debugLog(L"CSametimeProto::DeinitMessaging()"); mwSession_removeService(session, mwService_IM); mwService_free((mwService*)service_im); service_im = 0; diff --git a/protocols/Sametime/src/options.cpp b/protocols/Sametime/src/options.cpp index 6d47ca05fd..9f31d92ba6 100644 --- a/protocols/Sametime/src/options.cpp +++ b/protocols/Sametime/src/options.cpp @@ -7,30 +7,30 @@ #define NUM_IDS 24 TCHAR* client_names[NUM_IDS] = { - _T("Official Binary Library"), - _T("Official Java Applet"), - _T("Official Binary Application"), - _T("Official Java Application"), - _T("Notes 6.5"), - _T("Notes 7.0"), - _T("Notes 8.0 Basic"), - _T("Notes 8.5.2"), - _T("Sametime Connect 8.0"), - _T("Sametime Connect 8.5.2"), - _T("ICT"), - _T("NotesBuddy"), - _T("NotesBuddy 4.15"), - _T("Sanity"), - _T("Perl"), - _T("PMR Alert"), - _T("Trillian (SourceForge)"), - _T("Trillian (IBM)"), - _T("Meanwhile Library"), - _T("Meanwhile (Python)"), - _T("Meanwhile (Gaim)"), - _T("Meanwhile (Adium)"), - _T("Meanwhile (Kopete)"), - _T("Custom") + L"Official Binary Library", + L"Official Java Applet", + L"Official Binary Application", + L"Official Java Application", + L"Notes 6.5", + L"Notes 7.0", + L"Notes 8.0 Basic", + L"Notes 8.5.2", + L"Sametime Connect 8.0", + L"Sametime Connect 8.5.2", + L"ICT", + L"NotesBuddy", + L"NotesBuddy 4.15", + L"Sanity", + L"Perl", + L"PMR Alert", + L"Trillian (SourceForge)", + L"Trillian (IBM)", + L"Meanwhile Library", + L"Meanwhile (Python)", + L"Meanwhile (Gaim)", + L"Meanwhile (Adium)", + L"Meanwhile (Kopete)", + L"Custom" }; int client_ids[NUM_IDS] = { 0x1000, @@ -66,11 +66,11 @@ int client_ids[NUM_IDS] = { #define NUM_CVS 5 TCHAR* CV_names[NUM_CVS] = { - _T("Sametime (Use old client version)"), - _T("Sametime (Miranda default)"), - _T("Sametime 8"), - _T("Sametime 8.5.1"), - _T("Sametime 8.5.2") + L"Sametime (Use old client version)", + L"Sametime (Miranda default)", + L"Sametime 8", + L"Sametime 8.5.1", + L"Sametime 8.5.2" }; int CV_major[NUM_CVS] = { MW_PROTOCOL_VERSION_MAJOR, @@ -238,7 +238,7 @@ static INT_PTR CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ofn.hwndOwner = hwndDlg; ofn.Flags = CC_FULLOPEN; ofn.nMaxFile = MAX_PATH; - ofn.lpstrFilter = _T("All\0*.*\0"); + ofn.lpstrFilter = L"All\0*.*\0"; ofn.nFilterIndex = 1; ofn.lpstrFileTitle = NULL; ofn.nMaxFileTitle = 0; @@ -410,9 +410,9 @@ void CSametimeProto::LoadOptions() if (options.err_method == ED_POP && !ServiceExists(MS_POPUP_SHOWMESSAGE)) options.err_method = ED_BAL; if (options.err_method == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) options.err_method = ED_MB; - debugLog(_T("LoadOptions() loaded: ServerName:len=[%d], id:len=[%d], pword:len=[%d]"), options.server_name == NULL ? -1 : mir_strlen(options.server_name), options.id == NULL ? -1 : mir_strlen(options.id), options.pword == NULL ? -1 : mir_strlen(options.pword)); - debugLog(_T("LoadOptions() loaded: port=[%d], encrypt_session=[%d], ClientID=[%d], ClientVersionMajor=[%d], ClientVersionMinor=[%d]"), options.port, options.encrypt_session, options.client_id, options.client_versionMajor, options.client_versionMinor); - debugLog(_T("LoadOptions() loaded: get_server_contacts=[%d], add_contacts=[%d], idle_as_away=[%d], err_method=[%d]"), options.get_server_contacts, options.add_contacts, options.idle_as_away, options.err_method); + debugLog(L"LoadOptions() loaded: ServerName:len=[%d], id:len=[%d], pword:len=[%d]", options.server_name == NULL ? -1 : mir_strlen(options.server_name), options.id == NULL ? -1 : mir_strlen(options.id), options.pword == NULL ? -1 : mir_strlen(options.pword)); + debugLog(L"LoadOptions() loaded: port=[%d], encrypt_session=[%d], ClientID=[%d], ClientVersionMajor=[%d], ClientVersionMinor=[%d]", options.port, options.encrypt_session, options.client_id, options.client_versionMajor, options.client_versionMinor); + debugLog(L"LoadOptions() loaded: get_server_contacts=[%d], add_contacts=[%d], idle_as_away=[%d], err_method=[%d]", options.get_server_contacts, options.add_contacts, options.idle_as_away, options.err_method); } diff --git a/protocols/Sametime/src/places.cpp b/protocols/Sametime/src/places.cpp index c7c0a19adf..9bffaa9ac3 100644 --- a/protocols/Sametime/src/places.cpp +++ b/protocols/Sametime/src/places.cpp @@ -54,13 +54,13 @@ mwPlaceHandler mwPlace_handler = { void CSametimeProto::InitPlaces(mwSession* session) { - debugLog(_T("CSametimeProto::InitPlaces()")); + debugLog(L"CSametimeProto::InitPlaces()"); mwSession_addService(session, (mwService*)(service_places = mwServicePlace_new(session, &mwPlace_handler))); } void CSametimeProto::DeinitPlaces(mwSession* session) { - debugLog(_T("CSametimeProto::DeinitPlaces()")); + debugLog(L"CSametimeProto::DeinitPlaces()"); mwSession_removeService(session, mwService_PLACE); mwService_free((mwService*)service_places); service_places = 0; diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp index 3f04f7ee22..6a9e9a3169 100644 --- a/protocols/Sametime/src/sametime.cpp +++ b/protocols/Sametime/src/sametime.cpp @@ -124,12 +124,12 @@ void __cdecl sttFakeAckInfoSuccessThread(void *param) { TFakeAckParams* tParam = (TFakeAckParams*)param; CSametimeProto* proto = tParam->proto; - proto->debugLog(_T("sttFakeAckInfoSuccessThread() start")); + proto->debugLog(L"sttFakeAckInfoSuccessThread() start"); Sleep(100); proto->ProtoBroadcastAck(tParam->hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0); - proto->debugLog(_T("sttFakeAckInfoSuccessThread() end")); + proto->debugLog(L"sttFakeAckInfoSuccessThread() end"); mir_free(tParam); } @@ -137,12 +137,12 @@ void __cdecl sttFakeAckMessageSuccessThread(void *param) { TFakeAckParams* tParam = (TFakeAckParams*)param; CSametimeProto* proto = tParam->proto; - proto->debugLog(_T("sttFakeAckMessageSuccessThread() start")); + proto->debugLog(L"sttFakeAckMessageSuccessThread() start"); Sleep(100); proto->ProtoBroadcastAck(tParam->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)tParam->lParam, 0); - proto->debugLog(_T("sttFakeAckMessageSuccessThread() end")); + proto->debugLog(L"sttFakeAckMessageSuccessThread() end"); mir_free(tParam); } @@ -150,12 +150,12 @@ void __cdecl sttFakeAckMessageFailedThread(void *param) { TFakeAckParams* tParam = (TFakeAckParams*)param; CSametimeProto* proto = tParam->proto; - proto->debugLog(_T("sttFakeAckMessageFailedThread() start")); + proto->debugLog(L"sttFakeAckMessageFailedThread() start"); Sleep(100); proto->ProtoBroadcastAck(tParam->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, tParam->lParam); ///TODO tParam->lParam: add error message - proto->debugLog(_T("sttFakeAckMessageFailedThread() end")); + proto->debugLog(L"sttFakeAckMessageFailedThread() end"); mir_free(tParam); } @@ -163,12 +163,12 @@ void __cdecl sttRecvAwayThread(void *param) { TFakeAckParams* tParam = (TFakeAckParams*)param; CSametimeProto* proto = tParam->proto; - proto->debugLog(_T("sttRecvAwayThread() start")); + proto->debugLog(L"sttRecvAwayThread() start"); Sleep(100); proto->UserRecvAwayMessage(tParam->hContact); - proto->debugLog(_T("sttRecvAwayThread() end")); + proto->debugLog(L"sttRecvAwayThread() end"); free(tParam); } @@ -223,7 +223,7 @@ int CSametimeProto::OnSametimeContactDeleted(WPARAM hContact, LPARAM) void CSametimeProto::SetAllOffline() { - debugLog(_T("SetAllOffline() start")); + debugLog(L"SetAllOffline() start"); for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) { if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0)) { @@ -241,7 +241,7 @@ void CSametimeProto::BroadcastNewStatus(int iNewStatus) if (m_iStatus == iNewStatus) return; - debugLog(_T("BroadcastNewStatus() m_iStatus=[%d], iNewStatus=[%d]"), m_iStatus, iNewStatus); + debugLog(L"BroadcastNewStatus() m_iStatus=[%d], iNewStatus=[%d]", m_iStatus, iNewStatus); previous_status = m_iStatus; m_iStatus = iNewStatus; diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp index aa7f4a7409..4278a309c8 100644 --- a/protocols/Sametime/src/sametime_proto.cpp +++ b/protocols/Sametime/src/sametime_proto.cpp @@ -24,7 +24,7 @@ CSametimeProto::CSametimeProto(const char* pszProtoName, const TCHAR* tszUserNam m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); RegisterGLibLogger(); - debugLog(_T("CSametimeProto::CSametimeProto() start m_szModuleName=[%s], m_tszUserName=[%s]"), _A2T(m_szModuleName), m_tszUserName); + debugLog(L"CSametimeProto::CSametimeProto() start m_szModuleName=[%s], m_tszUserName=[%s]", _A2T(m_szModuleName), m_tszUserName); SametimeInitIcons(); @@ -58,17 +58,17 @@ CSametimeProto::CSametimeProto(const char* pszProtoName, const TCHAR* tszUserNam LoadOptions(); - debugLog(_T("CSametimeProto::CSametimeProto() end")); + debugLog(L"CSametimeProto::CSametimeProto() end"); } CSametimeProto::~CSametimeProto() { - debugLog(_T("CSametimeProto::~CSametimeProto() start")); + debugLog(L"CSametimeProto::~CSametimeProto() start"); DeinitAwayMsg(); UnregisterPopups(); - debugLog(_T("CSametimeProto::~CSametimeProto() end")); + debugLog(L"CSametimeProto::~CSametimeProto() end"); UnRegisterGLibLogger(); Netlib_CloseHandle(m_hNetlibUser); @@ -79,13 +79,13 @@ CSametimeProto::~CSametimeProto() MCONTACT CSametimeProto::AddToList(int flags, PROTOSEARCHRESULT* psr) { MYPROTOSEARCHRESULT* sr = (MYPROTOSEARCHRESULT*)psr; - debugLog(_T("CSametimeProto::AddToList() flags=[%d]"), flags); + debugLog(L"CSametimeProto::AddToList() flags=[%d]", flags); return AddSearchedUser(sr, flags & PALF_TEMPORARY); } HANDLE CSametimeProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath) { - debugLog(_T("CSametimeProto::FileAllow() hContact=[%x], szPath=[%s]"), hContact, szPath); + debugLog(L"CSametimeProto::FileAllow() hContact=[%x], szPath=[%s]", hContact, szPath); char* szPathA = mir_t2a(szPath); HANDLE res = AcceptFileTransfer(hContact, hTransfer, szPathA); mir_free(szPathA); @@ -94,21 +94,21 @@ HANDLE CSametimeProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHA int CSametimeProto::FileCancel(MCONTACT hContact, HANDLE hTransfer) { - debugLog(_T("CSametimeProto::FileCancel() hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::FileCancel() hContact=[%x]", hContact); CancelFileTransfer(hTransfer); return 0; } int CSametimeProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason) { - debugLog(_T("CSametimeProto::FileDeny() hContact=[%x], szReason=[%s]"), hContact, szReason); + debugLog(L"CSametimeProto::FileDeny() hContact=[%x], szReason=[%s]", hContact, szReason); RejectFileTransfer(hTransfer); return 0; } int CSametimeProto::FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename) { - debugLog(_T("CSametimeProto::FileResume() action=[%d]"), &action); + debugLog(L"CSametimeProto::FileResume() action=[%d]", &action); return 0; } @@ -138,7 +138,7 @@ DWORD_PTR CSametimeProto::GetCaps(int type, MCONTACT hContact) int CSametimeProto::GetInfo(MCONTACT hContact, int infoType) { // GetInfo - retrieves a contact info - debugLog(_T("CSametimeProto::GetInfo() hContact=[%x], infoType=[%d]"), hContact, infoType); + debugLog(L"CSametimeProto::GetInfo() hContact=[%x], infoType=[%d]", hContact, infoType); if (getByte(hContact, "ChatRoom", 0)) return 1; @@ -159,7 +159,7 @@ int CSametimeProto::GetInfo(MCONTACT hContact, int infoType) HANDLE CSametimeProto::SearchBasic(const TCHAR* id) { - debugLog(_T("CSametimeProto::SearchBasic() id:len=[%d]"), id == NULL ? -1 : mir_tstrlen(id)); + debugLog(L"CSametimeProto::SearchBasic() id:len=[%d]", id == NULL ? -1 : mir_tstrlen(id)); return (HANDLE)SearchForUser(T2Utf(id), FALSE); ///TODO - add timeout (like at GGPROTO::searchthread) } @@ -168,7 +168,7 @@ HWND CSametimeProto::SearchAdvanced(HWND owner) { TCHAR buf[512]; if (GetDlgItemText(owner, IDC_EDIT1, buf, _countof(buf))) { - debugLog(_T("CSametimeProto::SearchAdvanced() buf:len=[%d]"), mir_tstrlen(buf)); + debugLog(L"CSametimeProto::SearchAdvanced() buf:len=[%d]", mir_tstrlen(buf)); return (HWND)SearchForUser(T2Utf(buf), TRUE); } return NULL; @@ -176,14 +176,14 @@ HWND CSametimeProto::SearchAdvanced(HWND owner) HWND CSametimeProto::CreateExtendedSearchUI(HWND owner) { - debugLog(_T("CSametimeProto::CreateExtendedSearchUI() start")); + debugLog(L"CSametimeProto::CreateExtendedSearchUI() start"); return CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_USERSEARCH), owner, SearchDialogFunc, (LPARAM)this); } int CSametimeProto::RecvFile(MCONTACT hContact, PROTORECVFILET* pre) { - debugLog(_T("CSametimeProto::RecvFile() hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::RecvFile() hContact=[%x]", hContact); db_unset(hContact, "CList", "Hidden"); db_unset(hContact, "CList", "NotOnList"); @@ -193,7 +193,7 @@ int CSametimeProto::RecvFile(MCONTACT hContact, PROTORECVFILET* pre) int CSametimeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) { - debugLog(_T("CSametimeProto::RecvMsg() hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::RecvMsg() hContact=[%x]", hContact); db_unset(hContact, "CList", "Hidden"); db_unset(hContact, "CList", "NotOnList"); @@ -203,7 +203,7 @@ int CSametimeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) HANDLE CSametimeProto::SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles) { - debugLog(_T("CSametimeProto::SendFile() hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::SendFile() hContact=[%x]", hContact); if (m_iStatus != ID_STATUS_OFFLINE) { if (hContact && ppszFiles && szDescription) { if (db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) { @@ -216,7 +216,7 @@ HANDLE CSametimeProto::SendFile(MCONTACT hContact, const TCHAR* szDescription, T int CSametimeProto::SendMsg(MCONTACT hContact, int, const char* msg) { - debugLog(_T("CSametimeProto::SendMsg() hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::SendMsg() hContact=[%x]", hContact); char *proto = GetContactProto(hContact); if (!proto || mir_strcmp(proto, m_szModuleName) != 0 || db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) { @@ -244,7 +244,7 @@ int CSametimeProto::SendMsg(MCONTACT hContact, int, const char* msg) int CSametimeProto::SetStatus(int iNewStatus) { - debugLog(_T("CSametimeProto::SetStatus() m_iStatus=[%d], m_iDesiredStatus=[%d], iNewStatus=[%d]"), m_iStatus, m_iDesiredStatus, iNewStatus); + debugLog(L"CSametimeProto::SetStatus() m_iStatus=[%d], m_iDesiredStatus=[%d], iNewStatus=[%d]", m_iStatus, m_iDesiredStatus, iNewStatus); m_iDesiredStatus = iNewStatus; if (iNewStatus != ID_STATUS_OFFLINE) { if (m_iStatus == ID_STATUS_OFFLINE) @@ -261,7 +261,7 @@ int CSametimeProto::SetStatus(int iNewStatus) HANDLE CSametimeProto::GetAwayMsg(MCONTACT hContact) { - debugLog(_T("CSametimeProto::GetInfo() hContact=[%x], m_iStatus=[%d]"), hContact, m_iStatus); + debugLog(L"CSametimeProto::GetInfo() hContact=[%x], m_iStatus=[%d]", hContact, m_iStatus); if (hContact && m_iStatus != ID_STATUS_OFFLINE) { TFakeAckParams* tfap; tfap = (TFakeAckParams*)malloc(sizeof(TFakeAckParams)); @@ -275,7 +275,7 @@ HANDLE CSametimeProto::GetAwayMsg(MCONTACT hContact) int CSametimeProto::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt) { - debugLog(_T("CSametimeProto::RecvAwayMsg() hContact=[%x], mode=[%d]"), hContact, mode); + debugLog(L"CSametimeProto::RecvAwayMsg() hContact=[%x], mode=[%d]", hContact, mode); ptrT pszMsg(mir_utf8decodeT(evt->szMessage)); ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)evt->lParam, pszMsg); @@ -284,14 +284,14 @@ int CSametimeProto::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt int CSametimeProto::SetAwayMsg(int iStatus, const TCHAR* msg) { - debugLog(_T("CSametimeProto::SetAwayMsg() iStatus=[%d], msg:len=[%d]"), iStatus, msg == NULL ? -1 : mir_tstrlen(msg)); + debugLog(L"CSametimeProto::SetAwayMsg() iStatus=[%d], msg:len=[%d]", iStatus, msg == NULL ? -1 : mir_tstrlen(msg)); SetSessionAwayMessage(iStatus, msg); return 0; } int CSametimeProto::UserIsTyping(MCONTACT hContact, int type) { - debugLog(_T("CSametimeProto::UserIsTyping() hContact=[%x], type=[%d]"), hContact, type); + debugLog(L"CSametimeProto::UserIsTyping() hContact=[%x], type=[%d]", hContact, type); SendTyping(hContact, type == PROTOTYPE_SELFTYPING_ON); return 0; } @@ -300,7 +300,7 @@ int CSametimeProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lPa { switch (iEventType) { case EV_PROTO_ONOPTIONS: - debugLog(_T("CSametimeProto::OnEvent() EV_PROTO_ONOPTIONS")); + debugLog(L"CSametimeProto::OnEvent() EV_PROTO_ONOPTIONS"); OptInit(wParam, lParam); break; } diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp index 1d54872cd9..496b1ea95e 100644 --- a/protocols/Sametime/src/sametime_session.cpp +++ b/protocols/Sametime/src/sametime_session.cpp @@ -17,13 +17,13 @@ struct { void __cdecl SessionClear(mwSession* session) { CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR"); - proto->debugLog(_T("SessionClear()")); + proto->debugLog(L"SessionClear()"); } int __cdecl SessionWrite(mwSession* session, const unsigned char* buf, gsize len) { CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR"); - proto->debugLog(_T("SessionWrite() server_connection=[%d], len=[%d]"), proto->server_connection, len); + proto->debugLog(L"SessionWrite() server_connection=[%d], len=[%d]", proto->server_connection, len); if (!proto->server_connection) return 1; if (Netlib_Send(proto->server_connection, (const char*)buf, len, 0) == SOCKET_ERROR) return 1; @@ -33,7 +33,7 @@ int __cdecl SessionWrite(mwSession* session, const unsigned char* buf, gsize len void __cdecl SessionClose(mwSession* session) { CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR"); - proto->debugLog(_T("SessionClose() server_connection=[%d]"), proto->server_connection); + proto->debugLog(L"SessionClose() server_connection=[%d]", proto->server_connection); Netlib_CloseHandle(proto->server_connection); proto->server_connection = 0; } @@ -52,7 +52,7 @@ void CSametimeProto::SessionStopping() void CSametimeProto::InitMeanwhileServices() { - debugLog(_T("InitMeanwhileServices() start")); + debugLog(L"InitMeanwhileServices() start"); if (options.encrypt_session) { mwSession_addCipher(session, mwCipher_new_RC2_128(session)); @@ -77,7 +77,7 @@ void CSametimeProto::InitMeanwhileServices() void CSametimeProto::DeinitMeanwhileServices() { - debugLog(_T("DeinitMeanwhileServices() start")); + debugLog(L"DeinitMeanwhileServices() start"); DeinitConference(); DeinitFiles(); DeinitMessaging(); @@ -89,7 +89,7 @@ void CSametimeProto::DeinitMeanwhileServices() void __cdecl SessionStateChange(mwSession* session, mwSessionState state, gpointer info) { CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR"); - proto->debugLog(_T("SessionStateChange() state=[%d]"), state); + proto->debugLog(L"SessionStateChange() state=[%d]", state); switch (state) { case mwSession_STARTING: @@ -136,7 +136,7 @@ void __cdecl SessionStateChange(mwSession* session, mwSessionState state, gpoint void __cdecl SessionAdmin(struct mwSession* session, const char* text) { CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR"); - proto->debugLog(_T("SessionAdmin()")); + proto->debugLog(L"SessionAdmin()"); TCHAR* tt = mir_utf8decodeT(text); MessageBox(0, tt, TranslateT("Sametime administrator message"), MB_OK); mir_free(tt); @@ -145,7 +145,7 @@ void __cdecl SessionAdmin(struct mwSession* session, const char* text) void __cdecl SessionAnnounce(struct mwSession* session, struct mwLoginInfo* from, gboolean may_reply, const char* text) { CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR"); - proto->debugLog(_T("SessionAnnounce()")); + proto->debugLog(L"SessionAnnounce()"); TCHAR* stzFrom; TCHAR* stzText; TCHAR stzFromBuff[256]; @@ -160,7 +160,7 @@ void __cdecl SessionAnnounce(struct mwSession* session, struct mwLoginInfo* from void __cdecl SessionSetPrivacyInfo(struct mwSession* session) { CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR"); - proto->debugLog(_T("SessionSetPrivacyInfo()")); + proto->debugLog(L"SessionSetPrivacyInfo()"); } void __cdecl SessionSetUserStatus(struct mwSession* session) @@ -171,7 +171,7 @@ void __cdecl SessionSetUserStatus(struct mwSession* session) struct mwUserStatus us; mwUserStatus_clone(&us, mwSession_getUserStatus(session)); - proto->debugLog(_T("SessionSetUserStatus() us.status=[%d]"), us.status); + proto->debugLog(L"SessionSetUserStatus() us.status=[%d]", us.status); switch (us.status) { case mwStatus_ACTIVE: @@ -224,7 +224,7 @@ void __cdecl SessionSetUserStatus(struct mwSession* session) if (proto->first_online) { proto->first_online = false; //proto->showPopup(TranslateT("Setting login status"), SAMETIME_POPUP_INFO); - proto->debugLog(_T("Setting login status")); + proto->debugLog(L"Setting login status"); proto->SetSessionStatus(proto->login_status); } else proto->BroadcastNewStatus(new_status); @@ -241,7 +241,7 @@ void CSametimeProto::UpdateSelfStatus() int CSametimeProto::SetSessionStatus(int status) { struct mwUserStatus us; - debugLog(_T("SetSessionStatus() start status=[%d]"), status); + debugLog(L"SetSessionStatus() start status=[%d]", status); if (idle_timerid) KillTimer(0, idle_timerid); @@ -271,7 +271,7 @@ int CSametimeProto::SetSessionStatus(int status) us.desc = AwayMessages.szOnline; us.status = mwStatus_ACTIVE; break; } - debugLog(_T("SetSessionStatus() mwSession_setUserStatus us.status=[%d], us.desc:len=[%d]"), us.status, us.desc == NULL ? -1 : mir_strlen(us.desc)); + debugLog(L"SetSessionStatus() mwSession_setUserStatus us.status=[%d], us.desc:len=[%d]", us.status, us.desc == NULL ? -1 : mir_strlen(us.desc)); mwSession_setUserStatus(session, &us); return 0; @@ -297,7 +297,7 @@ VOID CALLBACK IdleTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime int CSametimeProto::SetIdle(bool idle) { // set a timer, to wait for any autoaway module which might set our status - debugLog(_T("CSametimeProto::SetIdle() idle=[%d], idle_status=[%d], idle_timerid=[%d]"), idle, idle_status, idle_timerid); + debugLog(L"CSametimeProto::SetIdle() idle=[%d], idle_status=[%d], idle_timerid=[%d]", idle, idle_status, idle_timerid); if (idle && !idle_status) { idle_status = true; if (!idle_timerid) @@ -313,7 +313,7 @@ int CSametimeProto::SetIdle(bool idle) void CSametimeProto::SetSessionAwayMessage(int status, const TCHAR* msgT) { - debugLog(_T("SetSessionAwayMessage() status=[%d], msgT:len=[%d]"), status, msgT == NULL ? -1 : mir_tstrlen(msgT)); + debugLog(L"SetSessionAwayMessage() status=[%d], msgT:len=[%d]", status, msgT == NULL ? -1 : mir_tstrlen(msgT)); T2Utf msg(msgT); if (status == ID_STATUS_ONLINE) @@ -345,7 +345,7 @@ void __cdecl KeepAliveThread(LPVOID param) { CSametimeProto* proto = (CSametimeProto*)param; int i = 120; - proto->debugLog(_T("KeepAliveThread() start")); + proto->debugLog(L"KeepAliveThread() start"); while (1) { @@ -363,7 +363,7 @@ void __cdecl KeepAliveThread(LPVOID param) mir_cslock lck(proto->session_cs); if (Miranda_Terminated() || !proto->session) { - proto->debugLog(_T("KeepAliveThread() end")); + proto->debugLog(L"KeepAliveThread() end"); break; } } @@ -380,7 +380,7 @@ void __cdecl SessionThread(LPVOID param) { CSametimeProto* proto = (CSametimeProto*)param; HANDLE hNetlibUser = proto->m_hNetlibUser; - proto->debugLog(_T("SessionThread() start")); + proto->debugLog(L"SessionThread() start"); continue_connect = true; @@ -406,7 +406,7 @@ void __cdecl SessionThread(LPVOID param) proto->showPopup(TranslateT("No server connection!"), SAMETIME_POPUP_ERROR); } - proto->debugLog(_T("SessionThread() end, no server_connection, continue_connect=[%d]"), continue_connect); + proto->debugLog(L"SessionThread() end, no server_connection, continue_connect=[%d]", continue_connect); return; } @@ -436,7 +436,7 @@ void __cdecl SessionThread(LPVOID param) //while(session && server_connection && mwSession_getState(session) != mwSession_STOPPED) { while (proto->server_connection) {// && session) {// && !mwSession_isStopped(session)) { // break on error bytes = Netlib_Recv(proto->server_connection, (char *)recv_buffer, 1024 * 32, 0); - proto->debugLog(_T("SessionThread() Netlib_Recv'ed bytes=[%d]"), bytes); + proto->debugLog(L"SessionThread() Netlib_Recv'ed bytes=[%d]", bytes); if (bytes == 0) { break; @@ -462,7 +462,7 @@ void __cdecl SessionThread(LPVOID param) proto->SetAllOffline(); proto->first_online = true; - proto->debugLog(_T("SessionThread() end")); + proto->debugLog(L"SessionThread() end"); return; } @@ -488,11 +488,11 @@ WORD CSametimeProto::GetServerVersion() int CSametimeProto::LogIn(int ls, HANDLE hNetlibUser) { - debugLog(_T("LogIn() start")); + debugLog(L"LogIn() start"); mir_cslock lck(session_cs); if (session) { - debugLog(_T("LogIn() end, currently in session")); + debugLog(L"LogIn() end, currently in session"); return 0; } @@ -505,12 +505,12 @@ int CSametimeProto::LogIn(int ls, HANDLE hNetlibUser) int CSametimeProto::LogOut() { - debugLog(_T("LogOut() start")); + debugLog(L"LogOut() start"); continue_connect = false; mir_cslock lck(session_cs); if (session && server_connection && m_iStatus != ID_STATUS_OFFLINE && !mwSession_isStopped(session) && !mwSession_isStopping(session)) { - debugLog(_T("LogOut() mwSession_stop")); + debugLog(L"LogOut() mwSession_stop"); mwSession_stop(session, 0); } @@ -519,15 +519,15 @@ int CSametimeProto::LogOut() int CSametimeProto::OnLogInRedirect(char* newHost) { - debugLog(_T("OnLogInRedirect() mwSession_LOGIN_REDIR newHost=[%s]"), newHost ? _A2T(newHost) : "(null)"); + debugLog(L"OnLogInRedirect() mwSession_LOGIN_REDIR newHost=[%s]", newHost ? _A2T(newHost) : "(null)"); if (!newHost || !mir_strcmp(newHost, options.server_name) || db_get_b(0, m_szModuleName, "ForceLogin", 0) == 1) { - debugLog(_T("OnLogInRedirect() forceLogin")); + debugLog(L"OnLogInRedirect() forceLogin"); mwSession_forceLogin(session); return 0; } - debugLog(_T("OnLogInRedirect() redirect")); + debugLog(L"OnLogInRedirect() redirect"); mir_strcpy(options.server_name, newHost); LogOut(); Sleep(50); //wait for SessionThread end @@ -561,7 +561,7 @@ void SendAnnouncement(SendAnnouncementFunc_arg* arg) INT_PTR CSametimeProto::SessionAnnounce(WPARAM wParam, LPARAM lParam) { - debugLog(_T("CSametimeProto::SessionAnnounce() start")); + debugLog(L"CSametimeProto::SessionAnnounce() start"); SessionAnnounceDialogProc_arg* sadpArg = (SessionAnnounceDialogProc_arg*)mir_calloc(sizeof(SessionAnnounceDialogProc_arg)); sadpArg->proto = this; sadpArg->sendAnnouncementFunc = SendAnnouncement; @@ -571,7 +571,7 @@ INT_PTR CSametimeProto::SessionAnnounce(WPARAM wParam, LPARAM lParam) void CSametimeProto::InitSessionMenu() { - debugLog(_T("CSametimeProto::InitSessionMenu()")); + debugLog(L"CSametimeProto::InitSessionMenu()"); CreateProtoService(MS_SAMETIME_MENUANNOUNCESESSION, &CSametimeProto::SessionAnnounce); diff --git a/protocols/Sametime/src/session_announce_win.cpp b/protocols/Sametime/src/session_announce_win.cpp index fe30966af1..03081b51c5 100644 --- a/protocols/Sametime/src/session_announce_win.cpp +++ b/protocols/Sametime/src/session_announce_win.cpp @@ -14,7 +14,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); arg = (SessionAnnounceDialogProc_arg*)lParam; proto = arg->proto; - proto->debugLog(_T("SessionAnnounceDialogProc WM_INITDIALOG")); + proto->debugLog(L"SessionAnnounceDialogProc WM_INITDIALOG"); SendDlgItemMessage(hwndDlg, IDC_LST_ANTO, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES); { @@ -55,7 +55,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara case WM_CLOSE: proto = arg->proto; - proto->debugLog(_T("SessionAnnounceDialogProc WM_CLOSE")); + proto->debugLog(L"SessionAnnounceDialogProc WM_CLOSE"); mir_free(arg); DestroyWindow(hwndDlg); break; @@ -79,7 +79,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara return 0; case IDOK: - proto->debugLog(_T("SessionAnnounceDialogProc IDOK BN_CLICKED")); + proto->debugLog(L"SessionAnnounceDialogProc IDOK BN_CLICKED"); { // build SendAnnouncementFunc_arg SendAnnouncementFunc_arg* safArg = (SendAnnouncementFunc_arg*)mir_calloc(sizeof(SendAnnouncementFunc_arg)); diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp index ce68a3f3d7..3766dc73f7 100644 --- a/protocols/Sametime/src/userlist.cpp +++ b/protocols/Sametime/src/userlist.cpp @@ -54,7 +54,7 @@ void CSametimeProto::AddGroup(const char* name, bool expanded) MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary) { - debugLog(_T("CSametimeProto::AddContact() start")); + debugLog(L"CSametimeProto::AddContact() start"); const char* id = mwSametimeUser_getUser(user); const char* name = mwSametimeUser_getShortName(user); const char* nick = mwSametimeUser_getAlias(user); @@ -66,12 +66,12 @@ MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary) if (!hContact) { hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0); if (!hContact) { - debugLog(_T("AddContact(): Failed to create Sametime contact")); + debugLog(L"AddContact(): Failed to create Sametime contact"); return NULL; ///TODO error handling } if (Proto_AddToContact(hContact, m_szModuleName) != 0) { CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0); - debugLog(_T("AddContact(): Failed to register Sametime contact")); + debugLog(L"AddContact(): Failed to register Sametime contact"); return NULL; ///TODO error handling } new_contact = true; @@ -125,7 +125,7 @@ MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary) void CSametimeProto::ImportContactsFromList(mwSametimeList* user_list, bool temporary) { - debugLog(_T("CSametimeProto::ImportContactsFromList() start")); + debugLog(L"CSametimeProto::ImportContactsFromList() start"); // add contacts mwSametimeGroup* stgroup; mwSametimeUser* stuser; @@ -187,7 +187,7 @@ void CSametimeProto::ImportContactsFromList(mwSametimeList* user_list, bool temp void CSametimeProto::ExportContactsToList(mwSametimeList* user_list) { - debugLog(_T("CSametimeProto::ExportContactsToList() start")); + debugLog(L"CSametimeProto::ExportContactsToList() start"); mwSametimeGroup* stgroup = 0; char* group_name; char* group_alias; @@ -300,7 +300,7 @@ void CSametimeProto::ExportContactsToList(mwSametimeList* user_list) void CSametimeProto::ImportContactsFromFile(TCHAR* filename) { - debugLog(_T("CSametimeProto::ImportContactsFromFile() start")); + debugLog(L"CSametimeProto::ImportContactsFromFile() start"); std::ifstream in(filename); std::string text; std::string line; @@ -326,9 +326,9 @@ void CSametimeProto::ExportContactsToServer() mwPutBuffer* buff; mwOpaque* op; - debugLog(_T("CSametimeProto::ExportContactsToServer() start")); + debugLog(L"CSametimeProto::ExportContactsToServer() start"); if (MW_SERVICE_IS_DEAD(service_storage)) { - debugLog(_T("CSametimeProto::ExportContactsToServer() Failed")); + debugLog(L"CSametimeProto::ExportContactsToServer() Failed"); showPopup(TranslateT("Failed to upload contacts - storage service unavailable."), SAMETIME_POPUP_ERROR); return; } @@ -386,7 +386,7 @@ int CSametimeProto::ContactDeleted(MCONTACT hContact) if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0)) return 0; - debugLog(_T("CSametimeProto::ContactDeleted()")); + debugLog(L"CSametimeProto::ContactDeleted()"); if (GetAwareIdFromContact(hContact, &id_block)) { GList* gl = g_list_prepend(NULL, &id_block); @@ -580,7 +580,7 @@ mwAwareListHandler mwAwareList_handler = void CSametimeProto::UserListCreate() { - debugLog(_T("CSametimeProto::UserListCreate() start")); + debugLog(L"CSametimeProto::UserListCreate() start"); mwServiceAware_unsetAttribute(service_aware, mwAttribute_SPEAKERS); mwServiceAware_unsetAttribute(service_aware, mwAttribute_MICROPHONE); mwServiceAware_unsetAttribute(service_aware, mwAttribute_VIDEO_CAMERA); @@ -634,7 +634,7 @@ void CSametimeProto::UserListDestroy() void CSametimeProto::UserRecvAwayMessage(MCONTACT hContact) { - debugLog(_T("CSametimeProto::UserRecvAwayMessage() start hContact=[%x]"), hContact); + debugLog(L"CSametimeProto::UserRecvAwayMessage() start hContact=[%x]", hContact); DBVARIANT dbv; if (!db_get_s((MCONTACT)hContact, "CList", "StatusMsg", &dbv, DBVT_TCHAR)) { ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal); @@ -765,7 +765,7 @@ INT_PTR CALLBACK CALLBACK SearchDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam MCONTACT CSametimeProto::AddSearchedUser(MYPROTOSEARCHRESULT* mpsr, bool temporary) { MCONTACT hContact = 0; - debugLog(_T("CSametimeProto::AddSearchedUser() start")); + debugLog(L"CSametimeProto::AddSearchedUser() start"); mwSametimeList* user_list = mwSametimeList_new(); mwSametimeGroup* stgroup = 0; if (mpsr->group) { @@ -799,7 +799,7 @@ void mwServiceAware_clear_callback(mwServiceAware* srvc) void CSametimeProto::InitUserList() { - debugLog(_T("CSametimeProto::InitUserList()")); + debugLog(L"CSametimeProto::InitUserList()"); mwSession_addService(session, (mwService*)(service_storage = mwServiceStorage_new(session))); mwSession_addService(session, (mwService*)(service_resolve = mwServiceResolve_new(session))); @@ -813,7 +813,7 @@ void CSametimeProto::InitUserList() void CSametimeProto::DeinitUserList() { - debugLog(_T("CSametimeProto::DeinitUserList()")); + debugLog(L"CSametimeProto::DeinitUserList()"); mwSession_removeService(session, mwService_AWARE); mwService_free((mwService*)service_aware); diff --git a/protocols/Sametime/src/utils.cpp b/protocols/Sametime/src/utils.cpp index 346ccd5027..0a73ddce90 100644 --- a/protocols/Sametime/src/utils.cpp +++ b/protocols/Sametime/src/utils.cpp @@ -32,7 +32,7 @@ void CSametimeProto::RegisterPopups() TCHAR szDescr[256]; char szName[256]; - debugLog(_T("CSametimeProto::RegisterPopups()")); + debugLog(L"CSametimeProto::RegisterPopups()"); POPUPCLASS puc = { sizeof(puc) }; puc.PluginWindowProc = PopupWindowProc; @@ -41,7 +41,7 @@ void CSametimeProto::RegisterPopups() puc.pszName = szName; mir_snprintf(szName, "%s_%s", m_szModuleName, "Notify"); - mir_sntprintf(szDescr, _T("%s/%s"), m_tszUserName, TranslateT("Notification")); + mir_sntprintf(szDescr, L"%s/%s", m_tszUserName, TranslateT("Notification")); puc.hIcon = CopyIcon(LoadIconEx("notify", FALSE)); ReleaseIconEx("notify", FALSE); puc.iSeconds = 8; @@ -50,7 +50,7 @@ void CSametimeProto::RegisterPopups() hPopupNotify = Popup_RegisterClass(&puc); mir_snprintf(szName, "%s_%s", m_szModuleName, "Error"); - mir_sntprintf(szDescr, _T("%s/%s"), m_tszUserName, TranslateT("Error")); + mir_sntprintf(szDescr, L"%s/%s", m_tszUserName, TranslateT("Error")); puc.hIcon = CopyIcon(LoadIconEx("error", FALSE)); ReleaseIconEx("error", FALSE); puc.iSeconds = 10; @@ -62,7 +62,7 @@ void CSametimeProto::RegisterPopups() void CSametimeProto::UnregisterPopups() { - debugLog(_T("CSametimeProto::RegisterPopups()")); + debugLog(L"CSametimeProto::RegisterPopups()"); Popup_UnregisterClass(hPopupError); Popup_UnregisterClass(hPopupNotify); } @@ -163,12 +163,12 @@ void LogFromGLib(const gchar* log_domain, GLogLevelFlags log_level, const gchar* void CSametimeProto::RegisterGLibLogger() { - debugLog(_T("CSametimeProto::RegisterGLibLogger")); + debugLog(L"CSametimeProto::RegisterGLibLogger"); gLogHandler = g_log_set_handler(G_LOG_DOMAIN, G_LOG_LEVEL_MASK, LogFromGLib, this); } void CSametimeProto::UnRegisterGLibLogger() { - debugLog(_T("CSametimeProto::UnRegisterGLibLogger")); + debugLog(L"CSametimeProto::UnRegisterGLibLogger"); if (gLogHandler) g_log_remove_handler(G_LOG_DOMAIN, gLogHandler); } diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index 626773ab1d..26ef2bcb81 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -68,7 +68,7 @@ void CSkypeProto::OnReceiveAvatar(const NETLIBHTTPREQUEST *response, void *arg) setByte(hContact, "AvatarType", ai.format); GetAvatarFileName(hContact, ai.filename, _countof(ai.filename)); - FILE *out = _tfopen(ai.filename, _T("wb")); + FILE *out = _tfopen(ai.filename, L"wb"); if (out == NULL) { ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, &ai, 0); return; @@ -127,7 +127,7 @@ INT_PTR CSkypeProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam) void CSkypeProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen) { - int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%s"), VARST(_T("%miranda_avatarcache%")), m_tszUserName); + int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%s", VARST(L"%miranda_avatarcache%"), m_tszUserName); DWORD dwAttributes = GetFileAttributes(pszDest); if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) @@ -139,7 +139,7 @@ void CSkypeProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cb CMStringA username(Contacts[hContact]); username.Replace("live:", "__live_"); username.Replace("facebook:", "__facebook_"); - mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S%s"), username.c_str(), szFileType); + mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%S%s", username.c_str(), szFileType); } void CSkypeProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl) diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index e7a47cf2d6..8fa95966d9 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -309,7 +309,7 @@ void CSkypeProto::OnChatEvent(const JSONNode &node) ptrA xinitiator, xtarget, initiator; //content = <addmember><eventtime>1429186229164</eventtime><initiator>8:initiator</initiator><target>8:user</target></addmember> - HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, _T("addmember")); + HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"addmember"); if (xml == NULL) return; @@ -331,12 +331,12 @@ void CSkypeProto::OnChatEvent(const JSONNode &node) ptrA xinitiator, xtarget; //content = <addmember><eventtime>1429186229164</eventtime><initiator>8:initiator</initiator><target>8:user</target></addmember> - HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, _T("deletemember")); + HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"deletemember"); if (xml != NULL) { - HXML xmlNode = xmlGetChildByPath(xml, _T("initiator"), 0); + HXML xmlNode = xmlGetChildByPath(xml, L"initiator", 0); xinitiator = node != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL; - xmlNode = xmlGetChildByPath(xml, _T("target"), 0); + xmlNode = xmlGetChildByPath(xml, L"target", 0); xtarget = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL; xmlDestroyNode(xml); @@ -353,12 +353,12 @@ void CSkypeProto::OnChatEvent(const JSONNode &node) { //content=<topicupdate><eventtime>1429532702130</eventtime><initiator>8:user</initiator><value>test topic</value></topicupdate> ptrA xinitiator, value; - HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, _T("topicupdate")); + HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"topicupdate"); if (xml != NULL) { - HXML xmlNode = xmlGetChildByPath(xml, _T("initiator"), 0); + HXML xmlNode = xmlGetChildByPath(xml, L"initiator", 0); xinitiator = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL; - xmlNode = xmlGetChildByPath(xml, _T("value"), 0); + xmlNode = xmlGetChildByPath(xml, L"value", 0); value = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL; xmlDestroyNode(xml); @@ -372,16 +372,16 @@ void CSkypeProto::OnChatEvent(const JSONNode &node) { //content=<roleupdate><eventtime>1429551258363</eventtime><initiator>8:user</initiator><target><id>8:user1</id><role>admin</role></target></roleupdate> ptrA xinitiator, xId, xRole; - HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, _T("roleupdate")); + HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"roleupdate"); if (xml != NULL) { - HXML xmlNode = xmlGetChildByPath(xml, _T("initiator"), 0); + HXML xmlNode = xmlGetChildByPath(xml, L"initiator", 0); xinitiator = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL; - xmlNode = xmlGetChildByPath(xml, _T("target"), 0); + xmlNode = xmlGetChildByPath(xml, L"target", 0); if (xmlNode != NULL) { - HXML xmlId = xmlGetChildByPath(xmlNode, _T("id"), 0); - HXML xmlRole = xmlGetChildByPath(xmlNode, _T("role"), 0); + HXML xmlId = xmlGetChildByPath(xmlNode, L"id", 0); + HXML xmlRole = xmlGetChildByPath(xmlNode, L"role", 0); xId = xmlId != NULL ? mir_t2a(xmlGetText(xmlId)) : NULL; xRole = xmlRole != NULL ? mir_t2a(xmlGetText(xmlRole)) : NULL; } @@ -655,7 +655,7 @@ int CSkypeProto::OnGroupChatMenuHook(WPARAM, LPARAM lParam) CMString CSkypeProto::ChangeTopicForm() { - CMString caption(FORMAT, _T("[%s] %s"), _A2T(m_szModuleName), TranslateT("Enter new chatroom topic")); + CMString caption(FORMAT, L"[%s] %s", _A2T(m_szModuleName), TranslateT("Enter new chatroom topic")); ENTER_STRING pForm = { sizeof(pForm) }; pForm.type = ESF_MULTILINE; pForm.caption = caption; diff --git a/protocols/SkypeWeb/src/skype_db.h b/protocols/SkypeWeb/src/skype_db.h index ac2d0906fc..63a38ecadc 100644 --- a/protocols/SkypeWeb/src/skype_db.h +++ b/protocols/SkypeWeb/src/skype_db.h @@ -52,12 +52,12 @@ struct CSkypeOptions bAutoHistorySync(proto, "AutoSync", true), bMarkAllAsUnread(proto, "MarkMesUnread", true), - wstrPlace(proto, "Place", _T("")), + wstrPlace(proto, "Place", L""), bUseHostnameAsPlace(proto, "UseHostName", true), bUseBBCodes(proto, "UseBBCodes", true), - wstrCListGroup(proto, SKYPE_SETTINGS_GROUP, _T("Skype")) + wstrCListGroup(proto, SKYPE_SETTINGS_GROUP, L"Skype") { } diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp index 27a14309ee..f38ee7a8dd 100644 --- a/protocols/SkypeWeb/src/skype_events.cpp +++ b/protocols/SkypeWeb/src/skype_events.cpp @@ -57,19 +57,19 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) case SKYPE_DB_EVENT_TYPE_CALL_INFO: { - HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, _T("partlist")); + HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, L"partlist"); if (xml != NULL) { - ptrA type(mir_t2a(xmlGetAttrValue(xml, _T("type")))); + ptrA type(mir_t2a(xmlGetAttrValue(xml, L"type"))); bool bType = (!mir_strcmpi(type, "started")) ? 1 : 0; time_t callDuration = 0; for (int i = 0; i < xmlGetChildCount(xml); i++) { - HXML xmlPart = xmlGetNthChild(xml, _T("part"), i); + HXML xmlPart = xmlGetNthChild(xml, L"part", i); if (xmlPart != NULL) { - HXML xmlDuration = xmlGetChildByPath(xmlPart, _T("duration"), 0); + HXML xmlDuration = xmlGetChildByPath(xmlPart, L"duration", 0); if (xmlDuration != NULL) { @@ -106,16 +106,16 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) } case SKYPE_DB_EVENT_TYPE_FILETRANSFER_INFO: { - HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, _T("files")); + HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, L"files"); if (xml != NULL) { for (int i = 0; i < xmlGetChildCount(xml); i++) { LONGLONG fileSize = 0; - HXML xmlNode = xmlGetNthChild(xml, _T("file"), i); + HXML xmlNode = xmlGetNthChild(xml, L"file", i); if (xmlNode != NULL) { - fileSize = _ttol(xmlGetAttrValue(xmlNode, _T("size"))); + fileSize = _ttol(xmlGetAttrValue(xmlNode, L"size")); char *fileName = _T2A(xmlGetText(xmlNode)); if (fileName != NULL) { @@ -136,14 +136,14 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) case SKYPE_DB_EVENT_TYPE_MOJI: case SKYPE_DB_EVENT_TYPE_URIOBJ: { - HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, _T("URIObject")); + HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, L"URIObject"); if (xml != NULL) { //szText.Append(_T2A(xmlGetText(xml))); - HXML xmlA = xmlGetChildByPath(xml, _T("a"), 0); + HXML xmlA = xmlGetChildByPath(xml, L"a", 0); if (xmlA != NULL) { - szText += T2Utf(xmlGetAttrValue(xmlA, _T("href"))); + szText += T2Utf(xmlGetAttrValue(xmlA, L"href")); } xmlDestroyNode(xml); } diff --git a/protocols/SkypeWeb/src/skype_files.cpp b/protocols/SkypeWeb/src/skype_files.cpp index 66b107a81e..bc562a8746 100644 --- a/protocols/SkypeWeb/src/skype_files.cpp +++ b/protocols/SkypeWeb/src/skype_files.cpp @@ -38,7 +38,7 @@ void CSkypeProto::OnASMObjectCreated(const NETLIBHTTPREQUEST *response, void *ar JSONNode node = JSONNode::parse((char*)response->pData); std::string strObjectId = node["id"].as_string(); fup->uid = mir_strdup(strObjectId.c_str()); - FILE *pFile = _tfopen(fup->tszFileName, _T("rb")); + FILE *pFile = _tfopen(fup->tszFileName, L"rb"); if (pFile == NULL) return; fseek(pFile, 0, SEEK_END); diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp index 594d83409b..7909698b37 100644 --- a/protocols/SkypeWeb/src/skype_login.cpp +++ b/protocols/SkypeWeb/src/skype_login.cpp @@ -77,25 +77,25 @@ void CSkypeProto::OnLoginOAuth(const NETLIBHTTPREQUEST *response) { case 40002: { - ShowNotification(_T("Skype"), TranslateT("Authentication failed. Invalid username."), NULL, 1); + ShowNotification(L"Skype", TranslateT("Authentication failed. Invalid username."), NULL, 1); error = LOGINERR_BADUSERID; break; } case 40120: { - ShowNotification(_T("Skype"), TranslateT("Authentication failed. Bad username or password."), NULL, 1); + ShowNotification(L"Skype", TranslateT("Authentication failed. Bad username or password."), NULL, 1); error = LOGINERR_WRONGPASSWORD; break; } case 40121: { - ShowNotification(_T("Skype"), TranslateT("Too many failed authentication attempts with given username or IP."), NULL, 1); + ShowNotification(L"Skype", TranslateT("Too many failed authentication attempts with given username or IP."), NULL, 1); error = LOGIN_ERROR_TOOMANY_REQUESTS; break; } default: { - ShowNotification(_T("Skype"), status["text"] ? status["text"].as_mstring() : TranslateT("Authentication failed. Unknown error."), NULL, 1); + ShowNotification(L"Skype", status["text"] ? status["text"].as_mstring() : TranslateT("Authentication failed. Unknown error."), NULL, 1); error = LOGIN_ERROR_UNKNOWN; } } diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 898bc1f11a..cc9ac8e2ca 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -275,7 +275,7 @@ void CSkypeProto::MarkMessagesRead(MCONTACT hContact, MEVENT hDbEvent) void CSkypeProto::ProcessContactRecv(MCONTACT hContact, time_t timestamp, const char *szContent, const char *szMessageId) { - HXML xmlNode = xmlParseString(mir_utf8decodeT(szContent), 0, _T("contacts")); + HXML xmlNode = xmlParseString(mir_utf8decodeT(szContent), 0, L"contacts"); if (xmlNode) { int nCount = 0; @@ -287,7 +287,7 @@ void CSkypeProto::ProcessContactRecv(MCONTACT hContact, time_t timestamp, const nCount = 0; for (int i = 0; i < xmlGetChildCount(xmlNode); i++) { - HXML xmlContact = xmlGetNthChild(xmlNode, _T("c"), i); + HXML xmlContact = xmlGetNthChild(xmlNode, L"c", i); if (xmlContact != NULL) { const TCHAR *tszContactId = xmlGetAttrValue(xmlContact, L"s"); diff --git a/protocols/SkypeWeb/src/skype_mslogin.cpp b/protocols/SkypeWeb/src/skype_mslogin.cpp index 9301632c70..3992ab48b7 100644 --- a/protocols/SkypeWeb/src/skype_mslogin.cpp +++ b/protocols/SkypeWeb/src/skype_mslogin.cpp @@ -176,7 +176,7 @@ void CSkypeProto::OnMSLoginEnd(const NETLIBHTTPREQUEST *response) CMString CSkypeProto::RunConfirmationCode() { - CMString caption(FORMAT, _T("[%s] %s"), _A2T(m_szModuleName), TranslateT("Enter confirmation code")); + CMString caption(FORMAT, L"[%s] %s", _A2T(m_szModuleName), TranslateT("Enter confirmation code")); ENTER_STRING pForm = { sizeof(pForm) }; pForm.type = ESF_PASSWORD; pForm.caption = caption; diff --git a/protocols/SkypeWeb/src/skype_popups.cpp b/protocols/SkypeWeb/src/skype_popups.cpp index 0ca5aab40b..49a7b40d60 100644 --- a/protocols/SkypeWeb/src/skype_popups.cpp +++ b/protocols/SkypeWeb/src/skype_popups.cpp @@ -7,7 +7,7 @@ void CSkypeProto::InitPopups() POPUPCLASS ppc = { sizeof(ppc) }; ppc.flags = PCF_TCHAR; - mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Notifications")); + mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Notifications")); mir_snprintf(name, "%s_%s", m_szModuleName, "Notification"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -17,7 +17,7 @@ void CSkypeProto::InitPopups() ppc.iSeconds = 5; m_PopupClasses.insert(Popup_RegisterClass(&ppc)); - mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Errors")); + mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Errors")); mir_snprintf(name, "%s_%s", m_szModuleName, "Error"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -27,7 +27,7 @@ void CSkypeProto::InitPopups() ppc.iSeconds = -1; m_PopupClasses.insert(Popup_RegisterClass(&ppc)); - mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Calls")); + mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Calls")); mir_snprintf(name, "%s_%s", m_szModuleName, "Call"); ppc.ptszDescription = desc; ppc.pszName = name; diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp index a7f5d33608..fff14b059f 100644 --- a/protocols/SkypeWeb/src/skype_profile.cpp +++ b/protocols/SkypeWeb/src/skype_profile.cpp @@ -22,225 +22,225 @@ std::map<std::tstring, std::tstring> CSkypeProto::languages; void CSkypeProto::InitLanguages() { std::map<std::tstring, std::tstring> result; - result[_T("ab")] = _T("Abkhazian"); - result[_T("aa")] = _T("Afar"); - result[_T("af")] = _T("Afrikaans"); - result[_T("ak")] = _T("Akan"); - result[_T("sq")] = _T("Albanian"); - result[_T("am")] = _T("Amharic"); - result[_T("ar")] = _T("Arabic"); - result[_T("an")] = _T("Aragonese"); - result[_T("hy")] = _T("Armenian"); - result[_T("as")] = _T("Assamese"); - result[_T("av")] = _T("Avaric"); - result[_T("ae")] = _T("Avestan"); - result[_T("ay")] = _T("Aymara"); - result[_T("az")] = _T("Azerbaijani"); - result[_T("bm")] = _T("Bambara"); - result[_T("ba")] = _T("Bashkir"); - result[_T("eu")] = _T("Basque"); - result[_T("be")] = _T("Belarusian"); - result[_T("bn")] = _T("Bengali"); - result[_T("bh")] = _T("Bihari languages"); - result[_T("bi")] = _T("Bislama"); - result[_T("nb")] = _T("Bokmal, Norwegian"); - result[_T("bs")] = _T("Bosnian"); - result[_T("br")] = _T("Breton"); - result[_T("bg")] = _T("Bulgarian"); - result[_T("my")] = _T("Burmese"); - result[_T("es")] = _T("Castilian"); - result[_T("ca")] = _T("Catalan"); - result[_T("km")] = _T("Central Khmer"); - result[_T("ch")] = _T("Chamorro"); - result[_T("ce")] = _T("Chechen"); - result[_T("ny")] = _T("Chewa"); - result[_T("ny")] = _T("Chichewa"); - result[_T("zh")] = _T("Chinese"); - result[_T("za")] = _T("Chuang"); - result[_T("cu")] = _T("Church Slavic"); - result[_T("cu")] = _T("Church Slavonic"); - result[_T("cv")] = _T("Chuvash"); - result[_T("kw")] = _T("Cornish"); - result[_T("co")] = _T("Corsican"); - result[_T("cr")] = _T("Cree"); - result[_T("hr")] = _T("Croatian"); - result[_T("cs")] = _T("Czech"); - result[_T("da")] = _T("Danish"); - result[_T("dv")] = _T("Dhivehi"); - result[_T("dv")] = _T("Divehi"); - result[_T("nl")] = _T("Dutch"); - result[_T("dz")] = _T("Dzongkha"); - result[_T("en")] = _T("English"); - result[_T("eo")] = _T("Esperanto"); - result[_T("et")] = _T("Estonian"); - result[_T("ee")] = _T("Ewe"); - result[_T("fo")] = _T("Faroese"); - result[_T("fj")] = _T("Fijian"); - result[_T("fi")] = _T("Finnish"); - result[_T("nl")] = _T("Flemish"); - result[_T("fr")] = _T("French"); - result[_T("ff")] = _T("Fulah"); - result[_T("gd")] = _T("Gaelic"); - result[_T("gl")] = _T("Galician"); - result[_T("lg")] = _T("Ganda"); - result[_T("ka")] = _T("Georgian"); - result[_T("de")] = _T("German"); - result[_T("ki")] = _T("Gikuyu"); - result[_T("el")] = _T("Greek, Modern (1453-)"); - result[_T("kl")] = _T("Greenlandic"); - result[_T("gn")] = _T("Guarani"); - result[_T("gu")] = _T("Gujarati"); - result[_T("ht")] = _T("Haitian"); - result[_T("ht")] = _T("Haitian Creole"); - result[_T("ha")] = _T("Hausa"); - result[_T("he")] = _T("Hebrew"); - result[_T("hz")] = _T("Herero"); - result[_T("hi")] = _T("Hindi"); - result[_T("ho")] = _T("Hiri Motu"); - result[_T("hu")] = _T("Hungarian"); - result[_T("is")] = _T("Icelandic"); - result[_T("io")] = _T("Ido"); - result[_T("ig")] = _T("Igbo"); - result[_T("id")] = _T("Indonesian"); - result[_T("ia")] = _T("Interlingua (International Auxiliary Language Association)"); - result[_T("ie")] = _T("Interlingue"); - result[_T("iu")] = _T("Inuktitut"); - result[_T("ik")] = _T("Inupiaq"); - result[_T("ga")] = _T("Irish"); - result[_T("it")] = _T("Italian"); - result[_T("ja")] = _T("Japanese"); - result[_T("jv")] = _T("Javanese"); - result[_T("kl")] = _T("Kalaallisut"); - result[_T("kn")] = _T("Kannada"); - result[_T("kr")] = _T("Kanuri"); - result[_T("ks")] = _T("Kashmiri"); - result[_T("kk")] = _T("Kazakh"); - result[_T("ki")] = _T("Kikuyu"); - result[_T("rw")] = _T("Kinyarwanda"); - result[_T("ky")] = _T("Kirghiz"); - result[_T("kv")] = _T("Komi"); - result[_T("kg")] = _T("Kongo"); - result[_T("ko")] = _T("Korean"); - result[_T("kj")] = _T("Kuanyama"); - result[_T("ku")] = _T("Kurdish"); - result[_T("kj")] = _T("Kwanyama"); - result[_T("ky")] = _T("Kyrgyz"); - result[_T("lo")] = _T("Lao"); - result[_T("la")] = _T("Latin"); - result[_T("lv")] = _T("Latvian"); - result[_T("lb")] = _T("Letzeburgesch"); - result[_T("li")] = _T("Limburgan"); - result[_T("li")] = _T("Limburger"); - result[_T("li")] = _T("Limburgish"); - result[_T("ln")] = _T("Lingala"); - result[_T("lt")] = _T("Lithuanian"); - result[_T("lu")] = _T("Luba-Katanga"); - result[_T("lb")] = _T("Luxembourgish"); - result[_T("mk")] = _T("Macedonian"); - result[_T("mg")] = _T("Malagasy"); - result[_T("ms")] = _T("Malay"); - result[_T("ml")] = _T("Malayalam"); - result[_T("dv")] = _T("Maldivian"); - result[_T("mt")] = _T("Maltese"); - result[_T("gv")] = _T("Manx"); - result[_T("mi")] = _T("Maori"); - result[_T("mr")] = _T("Marathi"); - result[_T("mh")] = _T("Marshallese"); - result[_T("ro")] = _T("Moldavian"); - result[_T("ro")] = _T("Moldovan"); - result[_T("mn")] = _T("Mongolian"); - result[_T("na")] = _T("Nauru"); - result[_T("nv")] = _T("Navaho"); - result[_T("nv")] = _T("Navajo"); - result[_T("nd")] = _T("Ndebele, North"); - result[_T("nr")] = _T("Ndebele, South"); - result[_T("ng")] = _T("Ndonga"); - result[_T("ne")] = _T("Nepali"); - result[_T("nd")] = _T("North Ndebele"); - result[_T("se")] = _T("Northern Sami"); - result[_T("no")] = _T("Norwegian"); - result[_T("nb")] = _T("Norwegian Bokmal"); - result[_T("nn")] = _T("Norwegian Nynorsk"); - result[_T("ii")] = _T("Nuosu"); - result[_T("ny")] = _T("Nyanja"); - result[_T("nn")] = _T("Nynorsk, Norwegian"); - result[_T("ie")] = _T("Occidental"); - result[_T("oc")] = _T("Occitan (post 1500)"); - result[_T("oj")] = _T("Ojibwa"); - result[_T("cu")] = _T("Old Bulgarian"); - result[_T("cu")] = _T("Old Church Slavonic"); - result[_T("cu")] = _T("Old Slavonic"); - result[_T("or")] = _T("Oriya"); - result[_T("om")] = _T("Oromo"); - result[_T("os")] = _T("Ossetian"); - result[_T("os")] = _T("Ossetic"); - result[_T("pi")] = _T("Pali"); - result[_T("pa")] = _T("Panjabi"); - result[_T("ps")] = _T("Pashto"); - result[_T("fa")] = _T("Persian"); - result[_T("pl")] = _T("Polish"); - result[_T("pt")] = _T("Portuguese"); - result[_T("pa")] = _T("Punjabi"); - result[_T("ps")] = _T("Pushto"); - result[_T("qu")] = _T("Quechua"); - result[_T("ro")] = _T("Romanian"); - result[_T("rm")] = _T("Romansh"); - result[_T("rn")] = _T("Rundi"); - result[_T("ru")] = _T("Russian"); - result[_T("sm")] = _T("Samoan"); - result[_T("sg")] = _T("Sango"); - result[_T("sa")] = _T("Sanskrit"); - result[_T("sc")] = _T("Sardinian"); - result[_T("gd")] = _T("Scottish Gaelic"); - result[_T("sr")] = _T("Serbian"); - result[_T("sn")] = _T("Shona"); - result[_T("ii")] = _T("Sichuan Yi"); - result[_T("sd")] = _T("Sindhi"); - result[_T("si")] = _T("Sinhala"); - result[_T("si")] = _T("Sinhalese"); - result[_T("sk")] = _T("Slovak"); - result[_T("sl")] = _T("Slovenian"); - result[_T("so")] = _T("Somali"); - result[_T("st")] = _T("Sotho, Southern"); - result[_T("nr")] = _T("South Ndebele"); - result[_T("es")] = _T("Spanish"); - result[_T("su")] = _T("Sundanese"); - result[_T("sw")] = _T("Swahili"); - result[_T("ss")] = _T("Swati"); - result[_T("sv")] = _T("Swedish"); - result[_T("tl")] = _T("Tagalog"); - result[_T("ty")] = _T("Tahitian"); - result[_T("tg")] = _T("Tajik"); - result[_T("ta")] = _T("Tamil"); - result[_T("tt")] = _T("Tatar"); - result[_T("te")] = _T("Telugu"); - result[_T("th")] = _T("Thai"); - result[_T("bo")] = _T("Tibetan"); - result[_T("ti")] = _T("Tigrinya"); - result[_T("to")] = _T("Tonga (Tonga Islands)"); - result[_T("ts")] = _T("Tsonga"); - result[_T("tn")] = _T("Tswana"); - result[_T("tr")] = _T("Turkish"); - result[_T("tk")] = _T("Turkmen"); - result[_T("tw")] = _T("Twi"); - result[_T("ug")] = _T("Uighur"); - result[_T("uk")] = _T("Ukrainian"); - result[_T("ur")] = _T("Urdu"); - result[_T("ug")] = _T("Uyghur"); - result[_T("uz")] = _T("Uzbek"); - result[_T("ca")] = _T("Valencian"); - result[_T("ve")] = _T("Venda"); - result[_T("vi")] = _T("Vietnamese"); - result[_T("vo")] = _T("Volapuk"); - result[_T("wa")] = _T("Walloon"); - result[_T("cy")] = _T("Welsh"); - result[_T("fy")] = _T("Western Frisian"); - result[_T("wo")] = _T("Wolof"); - result[_T("xh")] = _T("Xhosa"); - result[_T("yi")] = _T("Yiddish"); - result[_T("yo")] = _T("Yoruba"); - result[_T("za")] = _T("Zhuang"); - result[_T("zu")] = _T("Zulu"); + result[L"ab"] = L"Abkhazian"; + result[L"aa"] = L"Afar"; + result[L"af"] = L"Afrikaans"; + result[L"ak"] = L"Akan"; + result[L"sq"] = L"Albanian"; + result[L"am"] = L"Amharic"; + result[L"ar"] = L"Arabic"; + result[L"an"] = L"Aragonese"; + result[L"hy"] = L"Armenian"; + result[L"as"] = L"Assamese"; + result[L"av"] = L"Avaric"; + result[L"ae"] = L"Avestan"; + result[L"ay"] = L"Aymara"; + result[L"az"] = L"Azerbaijani"; + result[L"bm"] = L"Bambara"; + result[L"ba"] = L"Bashkir"; + result[L"eu"] = L"Basque"; + result[L"be"] = L"Belarusian"; + result[L"bn"] = L"Bengali"; + result[L"bh"] = L"Bihari languages"; + result[L"bi"] = L"Bislama"; + result[L"nb"] = L"Bokmal, Norwegian"; + result[L"bs"] = L"Bosnian"; + result[L"br"] = L"Breton"; + result[L"bg"] = L"Bulgarian"; + result[L"my"] = L"Burmese"; + result[L"es"] = L"Castilian"; + result[L"ca"] = L"Catalan"; + result[L"km"] = L"Central Khmer"; + result[L"ch"] = L"Chamorro"; + result[L"ce"] = L"Chechen"; + result[L"ny"] = L"Chewa"; + result[L"ny"] = L"Chichewa"; + result[L"zh"] = L"Chinese"; + result[L"za"] = L"Chuang"; + result[L"cu"] = L"Church Slavic"; + result[L"cu"] = L"Church Slavonic"; + result[L"cv"] = L"Chuvash"; + result[L"kw"] = L"Cornish"; + result[L"co"] = L"Corsican"; + result[L"cr"] = L"Cree"; + result[L"hr"] = L"Croatian"; + result[L"cs"] = L"Czech"; + result[L"da"] = L"Danish"; + result[L"dv"] = L"Dhivehi"; + result[L"dv"] = L"Divehi"; + result[L"nl"] = L"Dutch"; + result[L"dz"] = L"Dzongkha"; + result[L"en"] = L"English"; + result[L"eo"] = L"Esperanto"; + result[L"et"] = L"Estonian"; + result[L"ee"] = L"Ewe"; + result[L"fo"] = L"Faroese"; + result[L"fj"] = L"Fijian"; + result[L"fi"] = L"Finnish"; + result[L"nl"] = L"Flemish"; + result[L"fr"] = L"French"; + result[L"ff"] = L"Fulah"; + result[L"gd"] = L"Gaelic"; + result[L"gl"] = L"Galician"; + result[L"lg"] = L"Ganda"; + result[L"ka"] = L"Georgian"; + result[L"de"] = L"German"; + result[L"ki"] = L"Gikuyu"; + result[L"el"] = L"Greek, Modern (1453-)"; + result[L"kl"] = L"Greenlandic"; + result[L"gn"] = L"Guarani"; + result[L"gu"] = L"Gujarati"; + result[L"ht"] = L"Haitian"; + result[L"ht"] = L"Haitian Creole"; + result[L"ha"] = L"Hausa"; + result[L"he"] = L"Hebrew"; + result[L"hz"] = L"Herero"; + result[L"hi"] = L"Hindi"; + result[L"ho"] = L"Hiri Motu"; + result[L"hu"] = L"Hungarian"; + result[L"is"] = L"Icelandic"; + result[L"io"] = L"Ido"; + result[L"ig"] = L"Igbo"; + result[L"id"] = L"Indonesian"; + result[L"ia"] = L"Interlingua (International Auxiliary Language Association)"; + result[L"ie"] = L"Interlingue"; + result[L"iu"] = L"Inuktitut"; + result[L"ik"] = L"Inupiaq"; + result[L"ga"] = L"Irish"; + result[L"it"] = L"Italian"; + result[L"ja"] = L"Japanese"; + result[L"jv"] = L"Javanese"; + result[L"kl"] = L"Kalaallisut"; + result[L"kn"] = L"Kannada"; + result[L"kr"] = L"Kanuri"; + result[L"ks"] = L"Kashmiri"; + result[L"kk"] = L"Kazakh"; + result[L"ki"] = L"Kikuyu"; + result[L"rw"] = L"Kinyarwanda"; + result[L"ky"] = L"Kirghiz"; + result[L"kv"] = L"Komi"; + result[L"kg"] = L"Kongo"; + result[L"ko"] = L"Korean"; + result[L"kj"] = L"Kuanyama"; + result[L"ku"] = L"Kurdish"; + result[L"kj"] = L"Kwanyama"; + result[L"ky"] = L"Kyrgyz"; + result[L"lo"] = L"Lao"; + result[L"la"] = L"Latin"; + result[L"lv"] = L"Latvian"; + result[L"lb"] = L"Letzeburgesch"; + result[L"li"] = L"Limburgan"; + result[L"li"] = L"Limburger"; + result[L"li"] = L"Limburgish"; + result[L"ln"] = L"Lingala"; + result[L"lt"] = L"Lithuanian"; + result[L"lu"] = L"Luba-Katanga"; + result[L"lb"] = L"Luxembourgish"; + result[L"mk"] = L"Macedonian"; + result[L"mg"] = L"Malagasy"; + result[L"ms"] = L"Malay"; + result[L"ml"] = L"Malayalam"; + result[L"dv"] = L"Maldivian"; + result[L"mt"] = L"Maltese"; + result[L"gv"] = L"Manx"; + result[L"mi"] = L"Maori"; + result[L"mr"] = L"Marathi"; + result[L"mh"] = L"Marshallese"; + result[L"ro"] = L"Moldavian"; + result[L"ro"] = L"Moldovan"; + result[L"mn"] = L"Mongolian"; + result[L"na"] = L"Nauru"; + result[L"nv"] = L"Navaho"; + result[L"nv"] = L"Navajo"; + result[L"nd"] = L"Ndebele, North"; + result[L"nr"] = L"Ndebele, South"; + result[L"ng"] = L"Ndonga"; + result[L"ne"] = L"Nepali"; + result[L"nd"] = L"North Ndebele"; + result[L"se"] = L"Northern Sami"; + result[L"no"] = L"Norwegian"; + result[L"nb"] = L"Norwegian Bokmal"; + result[L"nn"] = L"Norwegian Nynorsk"; + result[L"ii"] = L"Nuosu"; + result[L"ny"] = L"Nyanja"; + result[L"nn"] = L"Nynorsk, Norwegian"; + result[L"ie"] = L"Occidental"; + result[L"oc"] = L"Occitan (post 1500)"; + result[L"oj"] = L"Ojibwa"; + result[L"cu"] = L"Old Bulgarian"; + result[L"cu"] = L"Old Church Slavonic"; + result[L"cu"] = L"Old Slavonic"; + result[L"or"] = L"Oriya"; + result[L"om"] = L"Oromo"; + result[L"os"] = L"Ossetian"; + result[L"os"] = L"Ossetic"; + result[L"pi"] = L"Pali"; + result[L"pa"] = L"Panjabi"; + result[L"ps"] = L"Pashto"; + result[L"fa"] = L"Persian"; + result[L"pl"] = L"Polish"; + result[L"pt"] = L"Portuguese"; + result[L"pa"] = L"Punjabi"; + result[L"ps"] = L"Pushto"; + result[L"qu"] = L"Quechua"; + result[L"ro"] = L"Romanian"; + result[L"rm"] = L"Romansh"; + result[L"rn"] = L"Rundi"; + result[L"ru"] = L"Russian"; + result[L"sm"] = L"Samoan"; + result[L"sg"] = L"Sango"; + result[L"sa"] = L"Sanskrit"; + result[L"sc"] = L"Sardinian"; + result[L"gd"] = L"Scottish Gaelic"; + result[L"sr"] = L"Serbian"; + result[L"sn"] = L"Shona"; + result[L"ii"] = L"Sichuan Yi"; + result[L"sd"] = L"Sindhi"; + result[L"si"] = L"Sinhala"; + result[L"si"] = L"Sinhalese"; + result[L"sk"] = L"Slovak"; + result[L"sl"] = L"Slovenian"; + result[L"so"] = L"Somali"; + result[L"st"] = L"Sotho, Southern"; + result[L"nr"] = L"South Ndebele"; + result[L"es"] = L"Spanish"; + result[L"su"] = L"Sundanese"; + result[L"sw"] = L"Swahili"; + result[L"ss"] = L"Swati"; + result[L"sv"] = L"Swedish"; + result[L"tl"] = L"Tagalog"; + result[L"ty"] = L"Tahitian"; + result[L"tg"] = L"Tajik"; + result[L"ta"] = L"Tamil"; + result[L"tt"] = L"Tatar"; + result[L"te"] = L"Telugu"; + result[L"th"] = L"Thai"; + result[L"bo"] = L"Tibetan"; + result[L"ti"] = L"Tigrinya"; + result[L"to"] = L"Tonga (Tonga Islands)"; + result[L"ts"] = L"Tsonga"; + result[L"tn"] = L"Tswana"; + result[L"tr"] = L"Turkish"; + result[L"tk"] = L"Turkmen"; + result[L"tw"] = L"Twi"; + result[L"ug"] = L"Uighur"; + result[L"uk"] = L"Ukrainian"; + result[L"ur"] = L"Urdu"; + result[L"ug"] = L"Uyghur"; + result[L"uz"] = L"Uzbek"; + result[L"ca"] = L"Valencian"; + result[L"ve"] = L"Venda"; + result[L"vi"] = L"Vietnamese"; + result[L"vo"] = L"Volapuk"; + result[L"wa"] = L"Walloon"; + result[L"cy"] = L"Welsh"; + result[L"fy"] = L"Western Frisian"; + result[L"wo"] = L"Wolof"; + result[L"xh"] = L"Xhosa"; + result[L"yi"] = L"Yiddish"; + result[L"yo"] = L"Yoruba"; + result[L"za"] = L"Zhuang"; + result[L"zu"] = L"Zulu"; } void CSkypeProto::UpdateProfileFirstName(const JSONNode &root, MCONTACT hContact) @@ -268,7 +268,7 @@ void CSkypeProto::UpdateProfileDisplayName(const JSONNode &root, MCONTACT hConta if (firstname) { CMString nick(firstname); if (lastname) - nick.AppendFormat(_T(" %s"), lastname); + nick.AppendFormat(L" %s", lastname); setTString(hContact, "Nick", nick); } else if (lastname) @@ -299,7 +299,7 @@ void CSkypeProto::UpdateProfileBirthday(const JSONNode &root, MCONTACT hContact) if (!birthday.IsEmpty() && birthday != "null") { int d, m, y; - _stscanf(birthday.GetBuffer(), _T("%d-%d-%d"), &y, &m, &d); + _stscanf(birthday.GetBuffer(), L"%d-%d-%d", &y, &m, &d); setWord(hContact, "BirthYear", y); setByte(hContact, "BirthDay", d); setByte(hContact, "BirthMonth", m); diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 0059de176b..a4ff764aef 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -42,7 +42,7 @@ CSkypeProto::CSkypeProto(const char* protoName, const TCHAR* userName) : CreateProtoService("/IncomingCallCLE", &CSkypeProto::OnIncomingCallCLE); CreateProtoService("/IncomingCallPP", &CSkypeProto::OnIncomingCallPP); - m_tszAvatarFolder = std::tstring(VARST(_T("%miranda_avatarcache%"))) + _T("\\") + m_tszUserName; + m_tszAvatarFolder = std::tstring(VARST(L"%miranda_avatarcache%")) + L"\\" + m_tszUserName; DWORD dwAttributes = GetFileAttributes(m_tszAvatarFolder.c_str()); if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) CreateDirectoryTreeT(m_tszAvatarFolder.c_str()); diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index fa3abdeb3b..58d0ad84e4 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -507,11 +507,11 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam) *(szSecondParam++) = 0; // no command or message command - if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, _T("chat")))) + if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, L"chat"))) { if (szSecondParam) { - TCHAR *szChatId = _tcsstr(szSecondParam, _T("id=")); + TCHAR *szChatId = _tcsstr(szSecondParam, L"id="); if (szChatId) { szChatId += 5; @@ -523,14 +523,14 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam) CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, NULL); return 0; } - else if (!mir_tstrcmpi(szCommand, _T("call"))) + else if (!mir_tstrcmpi(szCommand, L"call")) { MCONTACT hContact = AddContact(_T2A(szJid), true); NotifyEventHooks(g_hCallEvent, (WPARAM)hContact, (LPARAM)0); return 0; } - else if (!mir_tstrcmpi(szCommand, _T("userinfo"))){ return 0; } - else if (!mir_tstrcmpi(szCommand, _T("add"))) + else if (!mir_tstrcmpi(szCommand, L"userinfo")){ return 0; } + else if (!mir_tstrcmpi(szCommand, L"add")) { MCONTACT hContact = FindContact(_T2A(szJid)); if (hContact == NULL) @@ -550,13 +550,13 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam) } return 0; } - if (!mir_tstrcmpi(szCommand, _T("sendfile"))) + if (!mir_tstrcmpi(szCommand, L"sendfile")) { MCONTACT hContact = AddContact(_T2A(szJid), true); CallService(MS_FILE_SENDFILE, hContact, NULL); return 1; } - if (!mir_tstrcmpi(szCommand, _T("voicemail"))) + if (!mir_tstrcmpi(szCommand, L"voicemail")) { return 1; } diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp index 77382eb5c4..ad2348463d 100644 --- a/protocols/Steam/src/steam_avatars.cpp +++ b/protocols/Steam/src/steam_avatars.cpp @@ -3,7 +3,7 @@ TCHAR* CSteamProto::GetAvatarFilePath(MCONTACT hContact) { TCHAR path[MAX_PATH]; - mir_sntprintf(path, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName); + mir_sntprintf(path, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName); DWORD dwAttributes = GetFileAttributes(path); if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) @@ -11,7 +11,7 @@ TCHAR* CSteamProto::GetAvatarFilePath(MCONTACT hContact) ptrA steamId(getStringA(hContact, "SteamID")); if (steamId != NULL) - mir_sntprintf(path, MAX_PATH, _T("%s\\%s.jpg"), path, _A2T(steamId)); + mir_sntprintf(path, MAX_PATH, L"%s\\%s.jpg", path, _A2T(steamId)); else return NULL; diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 9d3c9a88f8..de1253ad2e 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -186,23 +186,23 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNode *data) // nothing special, either standard client or in different status (only online, I want to play, I want to trade statuses support this flags) WORD status = getWord(hContact, "Status", ID_STATUS_OFFLINE); if (status == ID_STATUS_ONLINE || status == ID_STATUS_OUTTOLUNCH || status == ID_STATUS_FREECHAT) - setTString(hContact, "MirVer", _T("Steam")); + setTString(hContact, "MirVer", L"Steam"); } else if (stateflags & 2) { // game - setTString(hContact, "MirVer", _T("Steam (in game)")); + setTString(hContact, "MirVer", L"Steam (in game)"); } else if (stateflags & 256) { // on website - setTString(hContact, "MirVer", _T("Steam (website)")); + setTString(hContact, "MirVer", L"Steam (website)"); } else if (stateflags & 512) { // on mobile - setTString(hContact, "MirVer", _T("Steam (mobile)")); + setTString(hContact, "MirVer", L"Steam (mobile)"); } else if (stateflags & 1024) { // big picture mode - setTString(hContact, "MirVer", _T("Steam (Big Picture)")); + setTString(hContact, "MirVer", L"Steam (Big Picture)"); } else { // none/unknown (e.g. when contact is offline) @@ -268,7 +268,7 @@ void CSteamProto::ContactIsRemoved(MCONTACT hContact) TCHAR message[MAX_PATH]; mir_sntprintf(message, MAX_PATH, TranslateT("%s has been removed from your contact list"), nick); - ShowNotification(_T("Steam"), message); + ShowNotification(L"Steam", message); } } @@ -286,7 +286,7 @@ void CSteamProto::ContactIsFriend(MCONTACT hContact) TCHAR message[MAX_PATH]; mir_sntprintf(message, MAX_PATH, TranslateT("%s is back in your contact list"), nick); - ShowNotification(_T("Steam"), message); + ShowNotification(L"Steam", message); } } @@ -602,7 +602,7 @@ void CSteamProto::OnGotAvatar(const HttpResponse *response, void *arg) return; } - FILE *fp = _tfopen(ai.filename, _T("wb")); + FILE *fp = _tfopen(ai.filename, L"wb"); if (fp) { fwrite(response->pData, sizeof(char), response->dataLength, fp); diff --git a/protocols/Steam/src/steam_login.cpp b/protocols/Steam/src/steam_login.cpp index 979fc03c7e..fd8d7399f7 100644 --- a/protocols/Steam/src/steam_login.cpp +++ b/protocols/Steam/src/steam_login.cpp @@ -31,7 +31,7 @@ bool CSteamProto::Relogin() JSONNode *node = json_get(root, "error"); ptrT error(json_as_string(node)); - if (!mir_tstrcmpi(error, _T("OK"))) + if (!mir_tstrcmpi(error, L"OK")) { node = json_get(root, "umqid"); setString("UMQID", ptrA(mir_u2a(ptrT(json_as_string(node))))); @@ -151,7 +151,7 @@ void CSteamProto::OnAuthorizationError(const JSONNode &node) ptrT messageT(mir_utf8decodeT(message.c_str())); debugLogA("CSteamProto::OnAuthorizationError: %s", message.c_str()); - if (!mir_tstrcmpi(messageT, _T("Incorrect login."))) + if (!mir_tstrcmpi(messageT, L"Incorrect login.")) { // We can't continue with incorrect login/password DeleteAuthSettings(); @@ -325,7 +325,7 @@ void CSteamProto::HandleTokenExpired() // Try to relogin automatically (but only once) if (isLoginAgain) { // Notify error to user - ShowNotification(_T("Steam"), TranslateT("Cannot obtain connection token.")); + ShowNotification(L"Steam", TranslateT("Cannot obtain connection token.")); // Just go offline; it also resets the isLoginAgain to false SetStatus(ID_STATUS_OFFLINE); @@ -358,7 +358,7 @@ void CSteamProto::OnLoggedOn(const HttpResponse *response) } // Probably timeout or no connection, we can do nothing here - ShowNotification(_T("Steam"), TranslateT("Unknown login error.")); + ShowNotification(L"Steam", TranslateT("Unknown login error.")); SetStatus(ID_STATUS_OFFLINE); return; @@ -368,7 +368,7 @@ void CSteamProto::OnLoggedOn(const HttpResponse *response) JSONNode *node = json_get(root, "error"); ptrT error(json_as_string(node)); - if (mir_tstrcmpi(error, _T("OK"))) + if (mir_tstrcmpi(error, L"OK")) { // Probably expired TokenSecret HandleTokenExpired(); diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp index 56cb5f2f62..bfcde18b1d 100644 --- a/protocols/Steam/src/steam_messages.cpp +++ b/protocols/Steam/src/steam_messages.cpp @@ -58,7 +58,7 @@ void CSteamProto::OnMessageSent(const HttpResponse *response, void *arg) } } - if (mir_tstrcmpi(error, _T("OK")) != 0) + if (mir_tstrcmpi(error, L"OK") != 0) { ptrA errorA(mir_t2a(error)); debugLogA("CSteamProto::OnMessageSent: failed to send message for %s (%s)", steamId, errorA); diff --git a/protocols/Steam/src/steam_options.cpp b/protocols/Steam/src/steam_options.cpp index 666e206978..66bc247ea8 100644 --- a/protocols/Steam/src/steam_options.cpp +++ b/protocols/Steam/src/steam_options.cpp @@ -7,9 +7,9 @@ CSteamOptionsMain::CSteamOptionsMain(CSteamProto *proto, int idDialog, HWND hwnd { SetParent(hwndParent); - CreateLink(m_username, "Username", _T("")); - CreateLink(m_password, "Password", _T("")); - CreateLink(m_group, "DefaultGroup", _T("Steam")); + CreateLink(m_username, "Username", L""); + CreateLink(m_password, "Password", L""); + CreateLink(m_group, "DefaultGroup", L"Steam"); CreateLink(m_biggerAvatars, "UseBigAvatars", DBVT_BYTE, FALSE); CreateLink(m_showChatEvents, "ShowChatEvents", DBVT_BYTE, TRUE); } @@ -62,7 +62,7 @@ void CSteamOptionsBlockList::OnInitDialog() m_list.SetExtendedListViewStyle(LVS_EX_SUBITEMIMAGES | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP); m_list.AddColumn(0, TranslateT("Name"), 220); - m_list.AddColumn(1, _T(""), 32 - GetSystemMetrics(SM_CXVSCROLL)); + m_list.AddColumn(1, L"", 32 - GetSystemMetrics(SM_CXVSCROLL)); } void CSteamOptionsBlockList::OnBlock(CCtrlButton*) diff --git a/protocols/Steam/src/steam_polling.cpp b/protocols/Steam/src/steam_polling.cpp index 6b53d31763..9958bd334c 100644 --- a/protocols/Steam/src/steam_polling.cpp +++ b/protocols/Steam/src/steam_polling.cpp @@ -21,8 +21,8 @@ void CSteamProto::ParsePollData(JSONNode *data) node = json_get(item, "type"); ptrT type(json_as_string(node)); - if (!lstrcmpi(type, _T("saytext")) || !lstrcmpi(type, _T("emote")) || - !lstrcmpi(type, _T("my_saytext")) || !lstrcmpi(type, _T("my_emote"))) + if (!lstrcmpi(type, L"saytext") || !lstrcmpi(type, L"emote") || + !lstrcmpi(type, L"my_saytext") || !lstrcmpi(type, L"my_emote")) { MCONTACT hContact = FindContact(steamId); if (!hContact) @@ -35,7 +35,7 @@ void CSteamProto::ParsePollData(JSONNode *data) PROTORECVEVENT recv = { 0 }; recv.timestamp = timestamp; recv.szMessage = szMessage; - if (_tcsstr(type, _T("my_")) == NULL) + if (_tcsstr(type, L"my_") == NULL) { ProtoChainRecvMsg(hContact, &recv); } @@ -45,7 +45,7 @@ void CSteamProto::ParsePollData(JSONNode *data) Proto_RecvMessage(hContact, &recv); } } - else if (!lstrcmpi(type, _T("typing"))) + else if (!lstrcmpi(type, L"typing")) { MCONTACT hContact = FindContact(steamId); if (hContact) @@ -53,7 +53,7 @@ void CSteamProto::ParsePollData(JSONNode *data) CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)STEAM_TYPING_TIME); } } - else if (!lstrcmpi(type, _T("personastate"))) + else if (!lstrcmpi(type, L"personastate")) { node = json_get(item, "persona_state"); int status = node ? SteamToMirandaStatus(json_as_int(node)) : -1; @@ -68,7 +68,7 @@ void CSteamProto::ParsePollData(JSONNode *data) if (status != m_iStatus) { - debugLog(_T("CSteamProto::ParsePollData: Change own status to %i"), status); + debugLog(L"CSteamProto::ParsePollData: Change own status to %i", status); int oldStatus = m_iStatus; m_iStatus = m_iDesiredStatus = status; ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); @@ -90,7 +90,7 @@ void CSteamProto::ParsePollData(JSONNode *data) // todo: find difference between state changing and info changing steamIds.append(steamId).append(","); } - else if (!lstrcmpi(type, _T("personarelationship"))) + else if (!lstrcmpi(type, L"personarelationship")) { node = json_get(item, "persona_state"); int state = json_as_int(node); @@ -146,7 +146,7 @@ void CSteamProto::ParsePollData(JSONNode *data) default: continue; } } - else if (!lstrcmpi(type, _T("leftconversation"))) + else if (!lstrcmpi(type, L"leftconversation")) { if (!getBool("ShowChatEvents", true)) continue; @@ -185,7 +185,7 @@ void CSteamProto::ParsePollData(JSONNode *data) void CSteamProto::PollingThread(void*) { - debugLog(_T("CSteamProto::PollingThread: entering")); + debugLog(L"CSteamProto::PollingThread: entering"); ptrA token(getStringA("TokenSecret")); ptrA umqId(getStringA("UMQID")); @@ -219,7 +219,7 @@ void CSteamProto::PollingThread(void*) if (node) { ptrT error(json_as_string(node)); - if (!lstrcmpi(error, _T("OK"))) + if (!lstrcmpi(error, L"OK")) { // Remember last message timestamp node = json_get(root, "utc_timestamp"); @@ -244,14 +244,14 @@ void CSteamProto::PollingThread(void*) // m_pollingConnection = response->nlc; } - else if (!lstrcmpi(error, _T("Timeout"))) + else if (!lstrcmpi(error, L"Timeout")) { // Do nothing as this is not necessarily an error } - else if (!lstrcmpi(error, _T("Not Logged On"))) // 'else' below will handle this error, we don't need this particular check right now + else if (!lstrcmpi(error, L"Not Logged On")) // 'else' below will handle this error, we don't need this particular check right now { // need to relogin - debugLog(_T("CSteamProto::PollingThread: Not Logged On")); + debugLog(L"CSteamProto::PollingThread: Not Logged On"); // try to reconnect only when we're actually online (during normal logout we will still got this error anyway, but in that case our status is already offline) if (IsOnline() && Relogin()) @@ -269,7 +269,7 @@ void CSteamProto::PollingThread(void*) else { // something wrong - debugLog(_T("CSteamProto::PollingThread: %s (%d)"), error, response->resultCode); + debugLog(L"CSteamProto::PollingThread: %s (%d)", error, response->resultCode); // token has expired if (response->resultCode == HTTP_CODE_UNAUTHORIZED) @@ -279,7 +279,7 @@ void CSteamProto::PollingThread(void*) node = json_get(root, "sectimeout"); int timeout = json_as_int(node); if (timeout < STEAM_API_TIMEOUT) - debugLog(_T("CSteamProto::PollingThread: Timeout is too low (%d)"), timeout); + debugLog(L"CSteamProto::PollingThread: Timeout is too low (%d)", timeout); // let it jump out of further processing errors = errorsLimit; @@ -295,10 +295,10 @@ void CSteamProto::PollingThread(void*) if (IsOnline()) { - debugLog(_T("CSteamProto::PollingThread: unexpected termination; switching protocol to offline")); + debugLog(L"CSteamProto::PollingThread: unexpected termination; switching protocol to offline"); SetStatus(ID_STATUS_OFFLINE); } m_hPollingThread = NULL; - debugLog(_T("CSteamProto::PollingThread: leaving")); + debugLog(L"CSteamProto::PollingThread: leaving"); } \ No newline at end of file diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index e0ec091bee..a6aacedd65 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -18,7 +18,7 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) GetModuleFileName(g_hInstance, filePath, MAX_PATH); wchar_t sectionName[100]; - mir_sntprintf(sectionName, _T("%s/%s"), LPGENT("Protocols"), LPGENT(MODULE)); + mir_sntprintf(sectionName, L"%s/%s", LPGENT("Protocols"), LPGENT(MODULE)); char settingName[100]; mir_snprintf(settingName, "%s_%s", MODULE, "main"); @@ -245,7 +245,7 @@ HANDLE CSteamProto::SearchByName(const TCHAR* nick, const TCHAR* firstName, cons // Combine all fields to single text TCHAR keywordsT[200]; - mir_sntprintf(keywordsT, _T("%s %s %s"), nick, firstName, lastName); + mir_sntprintf(keywordsT, L"%s %s %s", nick, firstName, lastName); ptrA token(getStringA("TokenSecret")); ptrA keywords(mir_utf8encodeW(keywordsT)); @@ -296,7 +296,7 @@ int CSteamProto::SetStatus(int new_status) if (new_status == m_iDesiredStatus) return 0; - debugLog(_T("CSteamProto::SetStatus: changing status from %i to %i"), m_iStatus, new_status); + debugLog(L"CSteamProto::SetStatus: changing status from %i to %i", m_iStatus, new_status); int old_status = m_iStatus; m_iDesiredStatus = new_status; @@ -375,7 +375,7 @@ void __cdecl CSteamProto::GetAwayMsgThread(void *arg) ptrT xStatusMsg(getTStringA(hContact, "XStatusMsg")); if (xStatusName) - message.AppendFormat(_T("%s: %s"), xStatusName, xStatusMsg); + message.AppendFormat(L"%s: %s", xStatusName, xStatusMsg); else message.Append(xStatusMsg); } diff --git a/protocols/Tlen/src/tlen_advsearch.cpp b/protocols/Tlen/src/tlen_advsearch.cpp index ad3bcc323e..b140736096 100644 --- a/protocols/Tlen/src/tlen_advsearch.cpp +++ b/protocols/Tlen/src/tlen_advsearch.cpp @@ -28,7 +28,7 @@ static void InitComboBox(HWND hwndCombo, TLEN_FIELD_MAP *fieldMap) { int i, n; - n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)_T("")); + n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)L""); SendMessage(hwndCombo, CB_SETITEMDATA, n, 0); SendMessage(hwndCombo, CB_SETCURSEL, n, 0); for (i=0;;i++) { diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index 15c352612f..19466f5c10 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -37,9 +37,9 @@ void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, TCHAR* pts if (_taccess(ptszDest, 0)) { int ret = CreateDirectoryTreeT(ptszDest); if (ret == 0) - proto->debugLog(_T("getAvatarFilename(): Created new directory for avatar cache: %s."), ptszDest); + proto->debugLog(L"getAvatarFilename(): Created new directory for avatar cache: %s.", ptszDest); else { - proto->debugLog(_T("getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s"), ptszDest, errno, strerror(errno)); + proto->debugLog(L"getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s", ptszDest, errno, strerror(errno)); TCHAR buffer[512]; mir_sntprintf(buffer, TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, _tcserror(errno), ptszDest); PUShowMessageT(buffer, SM_WARNING); diff --git a/protocols/Tlen/src/tlen_opt.cpp b/protocols/Tlen/src/tlen_opt.cpp index fe413beb9b..e3058a8526 100644 --- a/protocols/Tlen/src/tlen_opt.cpp +++ b/protocols/Tlen/src/tlen_opt.cpp @@ -416,7 +416,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SetDlgItemText(hwndDlg, IDC_EDIT_LOGIN_SERVER, dbv.ptszVal); db_free(&dbv); } - else SetDlgItemText(hwndDlg, IDC_EDIT_LOGIN_SERVER, _T("tlen.pl")); + else SetDlgItemText(hwndDlg, IDC_EDIT_LOGIN_SERVER, L"tlen.pl"); EnableWindow(GetDlgItem(hwndDlg, IDC_HOST), TRUE); EnableWindow(GetDlgItem(hwndDlg, IDC_HOSTPORT), TRUE); @@ -425,7 +425,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SetDlgItemText(hwndDlg, IDC_HOST, dbv.ptszVal); db_free(&dbv); } - else SetDlgItemText(hwndDlg, IDC_HOST, _T("s1.tlen.pl")); + else SetDlgItemText(hwndDlg, IDC_HOST, L"s1.tlen.pl"); SetDlgItemInt(hwndDlg, IDC_HOSTPORT, db_get_w(NULL, proto->m_szModuleName, "ManualPort", TLEN_DEFAULT_PORT), FALSE); @@ -458,8 +458,8 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, EnableWindow(GetDlgItem(hwndDlg, IDC_FILE_PROXY_PASSWORD), bChecked); SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Forwarding")); - SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)_T("SOCKS4")); - SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)_T("SOCKS5")); + SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)L"SOCKS4"); + SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)L"SOCKS5"); SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_SETCURSEL, db_get_w(NULL, proto->m_szModuleName, "FileProxyType", 0), 0); if (!db_get_ts(NULL, proto->m_szModuleName, "FileProxyHost", &dbv)) { SetDlgItemText(hwndDlg, IDC_FILE_PROXY_HOST, dbv.ptszVal); @@ -660,7 +660,7 @@ static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, MailPopupPreview((DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORBKG,CPM_GETCOLOUR,0,0), (DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORTXT,CPM_GETCOLOUR,0,0), title, - _T("From: test@test.test\nSubject: test"), + L"From: test@test.test\nSubject: test", delay); } diff --git a/protocols/Tlen/src/tlen_picture.cpp b/protocols/Tlen/src/tlen_picture.cpp index 765792a643..a4d77111ca 100644 --- a/protocols/Tlen/src/tlen_picture.cpp +++ b/protocols/Tlen/src/tlen_picture.cpp @@ -263,7 +263,7 @@ BOOL SendPicture(TlenProtocol *proto, MCONTACT hContact) { ofn.Flags = OFN_FILEMUSTEXIST; if (GetOpenFileName(&ofn)) { long size; - FILE* fp = _tfopen(tszFileName, _T("rb")); + FILE* fp = _tfopen(tszFileName, L"rb"); if (fp) { fseek(fp, 0, SEEK_END); size = ftell(fp); diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp index fbe38e7a51..04ca98b5aa 100644 --- a/protocols/Tlen/src/tlen_userinfo.cpp +++ b/protocols/Tlen/src/tlen_userinfo.cpp @@ -32,46 +32,46 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "tlen_avatar.h" TLEN_FIELD_MAP tlenFieldGender[] = { - { 1, _T("Male") }, - { 2, _T("Female") }, + { 1, L"Male" }, + { 2, L"Female" }, { 0, NULL } }; TLEN_FIELD_MAP tlenFieldLookfor[] = { - { 1, _T("Somebody to talk") }, - { 2, _T("Friendship") }, - { 3, _T("Flirt/romance") }, - { 4, _T("Love") }, - { 5, _T("Nothing") }, + { 1, L"Somebody to talk" }, + { 2, L"Friendship" }, + { 3, L"Flirt/romance" }, + { 4, L"Love" }, + { 5, L"Nothing" }, { 0, NULL } }; TLEN_FIELD_MAP tlenFieldStatus[] = { - { 1, _T("All") }, - { 2, _T("Available") }, - { 3, _T("Free for chat") }, + { 1, L"All" }, + { 2, L"Available" }, + { 3, L"Free for chat" }, { 0, NULL } }; TLEN_FIELD_MAP tlenFieldOccupation[] = { - { 1, _T("Student") }, - { 2, _T("College student") }, - { 3, _T("Farmer") }, - { 4, _T("Manager") }, - { 5, _T("Specialist") }, - { 6, _T("Clerk") }, - { 7, _T("Unemployed") }, - { 8, _T("Pensioner") }, - { 9, _T("Housekeeper") }, - { 10, _T("Teacher") }, - { 11, _T("Doctor") }, - { 12, _T("Other") }, + { 1, L"Student" }, + { 2, L"College student" }, + { 3, L"Farmer" }, + { 4, L"Manager" }, + { 5, L"Specialist" }, + { 6, L"Clerk" }, + { 7, L"Unemployed" }, + { 8, L"Pensioner" }, + { 9, L"Housekeeper" }, + { 10, L"Teacher" }, + { 11, L"Doctor" }, + { 12, L"Other" }, { 0, NULL } }; TLEN_FIELD_MAP tlenFieldPlan[] = { - { 1, _T("I'd like to go downtown") }, - { 2, _T("I'd like to go to the cinema") }, - { 3, _T("I'd like to take a walk") }, - { 4, _T("I'd like to go to the disco") }, - { 5, _T("I'd like to go on a blind date") }, - { 6, _T("Waiting for suggestion") }, + { 1, L"I'd like to go downtown" }, + { 2, L"I'd like to go to the cinema" }, + { 3, L"I'd like to take a walk" }, + { 4, L"I'd like to go to the disco" }, + { 5, L"I'd like to go on a blind date" }, + { 6, L"Waiting for suggestion" }, { 0, NULL } }; @@ -81,7 +81,7 @@ static void InitComboBox(HWND hwndCombo, TLEN_FIELD_MAP *fieldMap) { int i, n; - n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)_T("")); + n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)L""); SendMessage(hwndCombo, CB_SETITEMDATA, n, 0); SendMessage(hwndCombo, CB_SETCURSEL, n, 0); for (i=0;;i++) { @@ -180,38 +180,38 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara int i; TLEN_LIST_ITEM *item; - SetDlgItemText(hwndDlg, IDC_INFO_JID, _T("")); - SetDlgItemText(hwndDlg, IDC_SUBSCRIPTION, _T("")); + SetDlgItemText(hwndDlg, IDC_INFO_JID, L""); + SetDlgItemText(hwndDlg, IDC_SUBSCRIPTION, L""); SetFocus(GetDlgItem(hwndDlg, IDC_STATIC)); if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "FirstName", &dbv)) { SetDlgItemText(hwndDlg, IDC_FIRSTNAME, dbv.ptszVal); db_free(&dbv); - } else SetDlgItemText(hwndDlg, IDC_FIRSTNAME, _T("")); + } else SetDlgItemText(hwndDlg, IDC_FIRSTNAME, L""); if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "LastName", &dbv)) { SetDlgItemText(hwndDlg, IDC_LASTNAME, dbv.ptszVal); db_free(&dbv); - } else SetDlgItemText(hwndDlg, IDC_LASTNAME, _T("")); + } else SetDlgItemText(hwndDlg, IDC_LASTNAME, L""); if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "Nick", &dbv)) { SetDlgItemText(hwndDlg, IDC_NICKNAME, dbv.ptszVal); db_free(&dbv); - } else SetDlgItemText(hwndDlg, IDC_NICKNAME, _T("")); + } else SetDlgItemText(hwndDlg, IDC_NICKNAME, L""); if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "e-mail", &dbv)) { SetDlgItemText(hwndDlg, IDC_EMAIL, dbv.ptszVal); db_free(&dbv); - } else SetDlgItemText(hwndDlg, IDC_EMAIL, _T("")); + } else SetDlgItemText(hwndDlg, IDC_EMAIL, L""); if (!db_get(data->hContact, data->proto->m_szModuleName, "Age", &dbv)) { SetDlgItemInt(hwndDlg, IDC_AGE, dbv.wVal, FALSE); db_free(&dbv); - } else SetDlgItemText(hwndDlg, IDC_AGE, _T("")); + } else SetDlgItemText(hwndDlg, IDC_AGE, L""); if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "City", &dbv)) { SetDlgItemText(hwndDlg, IDC_CITY, dbv.ptszVal); db_free(&dbv); - } else SetDlgItemText(hwndDlg, IDC_CITY, _T("")); + } else SetDlgItemText(hwndDlg, IDC_CITY, L""); if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "School", &dbv)) { SetDlgItemText(hwndDlg, IDC_SCHOOL, dbv.ptszVal); db_free(&dbv); - } else SetDlgItemText(hwndDlg, IDC_SCHOOL, _T("")); + } else SetDlgItemText(hwndDlg, IDC_SCHOOL, L""); switch (db_get_b(data->hContact, data->proto->m_szModuleName, "Gender", '?')) { case 'M': SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_SETCURSEL, 1, 0); @@ -223,7 +223,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara break; default: SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_SETCURSEL, 0, 0); - SetDlgItemText(hwndDlg, IDC_GENDER_TEXT, _T("")); + SetDlgItemText(hwndDlg, IDC_GENDER_TEXT, L""); break; } i = db_get_w(data->hContact, data->proto->m_szModuleName, "Occupation", 0); @@ -231,7 +231,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SetDlgItemText(hwndDlg, IDC_OCCUPATION_TEXT, TranslateTS(tlenFieldOccupation[i-1].name)); SendDlgItemMessage(hwndDlg, IDC_OCCUPATION, CB_SETCURSEL, i, 0); } else { - SetDlgItemText(hwndDlg, IDC_OCCUPATION_TEXT, _T("")); + SetDlgItemText(hwndDlg, IDC_OCCUPATION_TEXT, L""); SendDlgItemMessage(hwndDlg, IDC_OCCUPATION, CB_SETCURSEL, 0, 0); } i = db_get_w(data->hContact, data->proto->m_szModuleName, "LookingFor", 0); @@ -239,7 +239,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SetDlgItemText(hwndDlg, IDC_LOOKFOR_TEXT, TranslateTS(tlenFieldLookfor[i-1].name)); SendDlgItemMessage(hwndDlg, IDC_LOOKFOR, CB_SETCURSEL, i, 0); } else { - SetDlgItemText(hwndDlg, IDC_LOOKFOR_TEXT, _T("")); + SetDlgItemText(hwndDlg, IDC_LOOKFOR_TEXT, L""); SendDlgItemMessage(hwndDlg, IDC_LOOKFOR, CB_SETCURSEL, 0, 0); } i = db_get_w(data->hContact, data->proto->m_szModuleName, "VoiceChat", 0); diff --git a/protocols/Tlen/src/tlen_voice.cpp b/protocols/Tlen/src/tlen_voice.cpp index 5548662415..0002d8c9c4 100644 --- a/protocols/Tlen/src/tlen_voice.cpp +++ b/protocols/Tlen/src/tlen_voice.cpp @@ -722,7 +722,7 @@ static HBITMAP TlenVoiceMakeBitmap(int w, int h, int bpp, void *ptr) bmih.bmiHeader.biYPelsPerMeter = 0; bmih.bmiHeader.biClrUsed = 0; bmih.bmiHeader.biClrImportant = 0; - HDC hdc = CreateDC(_T("DISPLAY"), NULL, NULL, NULL); + HDC hdc = CreateDC(L"DISPLAY", NULL, NULL, NULL); HBITMAP hbm = CreateDIBitmap(hdc, (PBITMAPINFOHEADER)&bmih, CBM_INIT, ptr, &bmih, DIB_RGB_COLORS); ReleaseDC(NULL, hdc); return hbm; @@ -779,10 +779,10 @@ static INT_PTR CALLBACK TlenVoiceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)proto); proto->voiceDlgHWND = hwndDlg; TranslateDialogDefault(hwndDlg); - SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)_T("8000 Hz / 13.8 kbps")); - SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)_T("11025 Hz / 19.1 kbps")); - SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)_T("22050 Hz / 36.8 kbps")); - SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)_T("44100 Hz / 72 kbps")); + SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)L"8000 Hz / 13.8 kbps"); + SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)L"11025 Hz / 19.1 kbps"); + SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)L"22050 Hz / 36.8 kbps"); + SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)L"44100 Hz / 72 kbps"); SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_SETCURSEL, 1, 0); SendDlgItemMessage(hwndDlg, IDC_MICROPHONE, BUTTONSETASFLATBTN, TRUE, 0); SendDlgItemMessage(hwndDlg, IDC_SPEAKER, BUTTONSETASFLATBTN, TRUE, 0); diff --git a/protocols/Tox/src/tox.cpp b/protocols/Tox/src/tox.cpp index 5e45668519..cd67b0f8f0 100644 --- a/protocols/Tox/src/tox.cpp +++ b/protocols/Tox/src/tox.cpp @@ -36,7 +36,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load(void) { - g_hToxLibrary = LoadLibrary(_T("libtox.dll")); + g_hToxLibrary = LoadLibrary(L"libtox.dll"); if (g_hToxLibrary == NULL) return 0; diff --git a/protocols/Tox/src/tox_accounts.cpp b/protocols/Tox/src/tox_accounts.cpp index 109a4532f6..f4a2ad222d 100644 --- a/protocols/Tox/src/tox_accounts.cpp +++ b/protocols/Tox/src/tox_accounts.cpp @@ -46,7 +46,7 @@ int CToxProto::OnAccountRenamed(WPARAM, LPARAM) ptrT newPath(GetToxProfilePath()); TCHAR oldPath[MAX_PATH]; - mir_sntprintf(oldPath, MAX_PATH, _T("%s\\%s.tox"), VARST(_T("%miranda_userdata%")), accountName); + mir_sntprintf(oldPath, MAX_PATH, L"%s\\%s.tox", VARST(L"%miranda_userdata%"), accountName); _trename(oldPath, newPath); mir_free(accountName); accountName = mir_tstrdup(m_tszUserName); diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp index b7282e781f..b62328ae11 100644 --- a/protocols/Tox/src/tox_avatars.cpp +++ b/protocols/Tox/src/tox_avatars.cpp @@ -3,7 +3,7 @@ TCHAR* CToxProto::GetAvatarFilePath(MCONTACT hContact) { TCHAR *path = (TCHAR*)mir_calloc(MAX_PATH * sizeof(TCHAR) + 1); - mir_sntprintf(path, MAX_PATH, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName); + mir_sntprintf(path, MAX_PATH, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName); DWORD dwAttributes = GetFileAttributes(path); if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) @@ -12,12 +12,12 @@ TCHAR* CToxProto::GetAvatarFilePath(MCONTACT hContact) ptrT address(getTStringA(hContact, TOX_SETTINGS_ID)); if (address == NULL) { mir_free(path); - return mir_tstrdup(_T("")); + return mir_tstrdup(L""); } if (hContact && mir_tstrlen(address) > TOX_PUBLIC_KEY_SIZE * 2) address[TOX_PUBLIC_KEY_SIZE * 2] = 0; - mir_sntprintf(path, MAX_PATH, _T("%s\\%s.png"), path, address); + mir_sntprintf(path, MAX_PATH, L"%s\\%s.png", path, address); return path; } @@ -231,7 +231,7 @@ void CToxProto::OnGotFriendAvatarInfo(AvatarTransferParam *transfer) } TCHAR path[MAX_PATH]; - mir_sntprintf(path, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName); + mir_sntprintf(path, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName); OnFileAllow(transfer->pfts.hContact, transfer, path); } diff --git a/protocols/Tox/src/tox_chatrooms.cpp b/protocols/Tox/src/tox_chatrooms.cpp index aba34e46b6..59580431a3 100644 --- a/protocols/Tox/src/tox_chatrooms.cpp +++ b/protocols/Tox/src/tox_chatrooms.cpp @@ -29,7 +29,7 @@ MCONTACT CToxProto::AddChatRoom(int groupNumber) setWord(hContact, TOX_SETTINGS_CHAT_ID, groupNumber); TCHAR title[MAX_PATH]; - mir_sntprintf(title, _T("%s #%d"), TranslateT("Group chat"), groupNumber); + mir_sntprintf(title, L"%s #%d", TranslateT("Group chat"), groupNumber); setTString(hContact, "Nick", title); DBVARIANT dbv; diff --git a/protocols/Tox/src/tox_network.cpp b/protocols/Tox/src/tox_network.cpp index 47b08a2396..f4e6d887f5 100644 --- a/protocols/Tox/src/tox_network.cpp +++ b/protocols/Tox/src/tox_network.cpp @@ -169,7 +169,7 @@ void CToxProto::UpdateNodes() CloseHandle(hProfile); } - FILE *hFile = _tfopen(path, _T("w")); + FILE *hFile = _tfopen(path, L"w"); if (!hFile) { debugLogA(__FUNCTION__": failed to open tox.json"); diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 887ebe88ab..527144081b 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -9,10 +9,10 @@ CToxOptionsMain::CToxOptionsMain(CToxProto *proto, int idDialog) m_enableUdp(this, IDC_ENABLE_UDP), m_enableIPv6(this, IDC_ENABLE_IPV6) { - CreateLink(m_toxAddress, TOX_SETTINGS_ID, _T("")); - CreateLink(m_nickname, "Nick", _T("")); - CreateLink(m_password, "Password", _T("")); - CreateLink(m_group, TOX_SETTINGS_GROUP, _T("Tox")); + CreateLink(m_toxAddress, TOX_SETTINGS_ID, L""); + CreateLink(m_nickname, "Nick", L""); + CreateLink(m_password, "Password", L""); + CreateLink(m_group, TOX_SETTINGS_GROUP, L"Tox"); CreateLink(m_enableUdp, "EnableUDP", DBVT_BYTE, TRUE); CreateLink(m_enableIPv6, "EnableIPv6", DBVT_BYTE, FALSE); @@ -105,7 +105,7 @@ void CToxOptionsMain::ProfileCreate_OnClick(CCtrlButton*) void CToxOptionsMain::ProfileImport_OnClick(CCtrlButton*) { TCHAR filter[MAX_PATH]; - mir_sntprintf(filter, _T("%s(*.tox)%c*.tox%c%s(*.*)%c*.*%c%c"), + mir_sntprintf(filter, L"%s(*.tox)%c*.tox%c%s(*.*)%c*.*%c%c", TranslateT("Tox profile"), 0, 0, TranslateT("All files"), 0, 0, 0); TCHAR profilePath[MAX_PATH] = { 0 }; @@ -118,7 +118,7 @@ void CToxOptionsMain::ProfileImport_OnClick(CCtrlButton*) ofn.lpstrTitle = TranslateT("Select Tox profile"); ofn.nMaxFile = MAX_PATH; ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_EXPLORER; - ofn.lpstrInitialDir = _T("%APPDATA%\\Tox"); + ofn.lpstrInitialDir = L"%APPDATA%\\Tox"; if (!GetOpenFileName(&ofn)) return; @@ -163,11 +163,11 @@ void CToxOptionsMain::ProfileImport_OnClick(CCtrlButton*) void CToxOptionsMain::ProfileExport_OnClick(CCtrlButton*) { TCHAR filter[MAX_PATH]; - mir_sntprintf(filter, _T("%s(*.tox)%c*.tox%c%c"), + mir_sntprintf(filter, L"%s(*.tox)%c*.tox%c%c", TranslateT("Tox profile"), 0, 0, 0); TCHAR profilePath[MAX_PATH]; - mir_tstrncpy(profilePath, _T("tox_save.tox"), _countof(profilePath)); + mir_tstrncpy(profilePath, L"tox_save.tox", _countof(profilePath)); OPENFILENAME ofn = { sizeof(ofn) }; ofn.hwndOwner = m_hwnd; @@ -177,7 +177,7 @@ void CToxOptionsMain::ProfileExport_OnClick(CCtrlButton*) ofn.lpstrTitle = TranslateT("Save Tox profile"); ofn.nMaxFile = MAX_PATH; ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_EXPLORER; - ofn.lpstrInitialDir = _T("%HOMEPATH%"); + ofn.lpstrInitialDir = L"%HOMEPATH%"; if (!GetSaveFileName(&ofn)) return; @@ -392,8 +392,8 @@ void CToxNodeEditor::OnOk(CCtrlBase*) m_list->SetItem(m_iItem, 0, ipv4); m_list->SetItem(m_iItem, 2, port); m_list->SetItem(m_iItem, 3, pubKey); - m_list->SetItem(m_iItem, 4, _T(""), 0); - m_list->SetItem(m_iItem, 5, _T(""), 1); + m_list->SetItem(m_iItem, 4, L"", 0); + m_list->SetItem(m_iItem, 5, L"", 1); SendMessage(GetParent(GetParent(m_list->GetHwnd())), PSM_CHANGED, 0, 0); @@ -447,12 +447,12 @@ void CToxOptionsNodeList::OnInitDialog() icon = Skin_LoadIcon(SKINICON_OTHER_DELETE); ImageList_AddIcon(hImageList, icon); IcoLib_ReleaseIcon(icon); - m_nodes.AddColumn(0, _T("IPv4"), 100); - m_nodes.AddColumn(1, _T("IPv6"), 100); + m_nodes.AddColumn(0, L"IPv4", 100); + m_nodes.AddColumn(1, L"IPv6", 100); m_nodes.AddColumn(2, TranslateT("Port"), 50); m_nodes.AddColumn(3, TranslateT("Public key"), 130); - m_nodes.AddColumn(4, _T(""), 32 - GetSystemMetrics(SM_CXVSCROLL)); - m_nodes.AddColumn(5, _T(""), 32 - GetSystemMetrics(SM_CXVSCROLL)); + m_nodes.AddColumn(4, L"", 32 - GetSystemMetrics(SM_CXVSCROLL)); + m_nodes.AddColumn(5, L"", 32 - GetSystemMetrics(SM_CXVSCROLL)); m_nodes.EnableGroupView(TRUE); m_nodes.AddGroup(0, TranslateT("Common nodes")); @@ -567,7 +567,7 @@ void CToxOptionsNodeList::ReloadNodeList() iItem = m_nodes.AddItem(ipv4, -1, NULL, 0); ptrT ipv6(mir_utf8decodeT(node.at("ipv6").as_string().c_str())); - if (mir_tstrcmp(ipv6, _T("-"))) + if (mir_tstrcmp(ipv6, L"-")) m_nodes.SetItem(iItem, 1, ipv6); ptrT port(mir_utf8decodeT(node.at("port").as_string().c_str())); @@ -606,8 +606,8 @@ void CToxOptionsNodeList::ReloadNodeList() value = db_get_tsa(NULL, module, setting); m_nodes.SetItem(iItem, 3, value); - m_nodes.SetItem(iItem, 4, _T(""), 0); - m_nodes.SetItem(iItem, 5, _T(""), 1); + m_nodes.SetItem(iItem, 4, L"", 0); + m_nodes.SetItem(iItem, 5, L"", 1); } } diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp index 28cef7b286..8c4c49d442 100644 --- a/protocols/Tox/src/tox_profile.cpp +++ b/protocols/Tox/src/tox_profile.cpp @@ -11,8 +11,8 @@ TCHAR* CToxProto::GetToxProfilePath(const TCHAR *accountName) { TCHAR *profilePath = (TCHAR*)mir_calloc(MAX_PATH * sizeof(TCHAR) + 1); TCHAR profileRootPath[MAX_PATH]; - FoldersGetCustomPathT(hProfileFolderPath, profileRootPath, _countof(profileRootPath), VARST(_T("%miranda_userdata%"))); - mir_sntprintf(profilePath, MAX_PATH, _T("%s\\%s.tox"), profileRootPath, accountName); + FoldersGetCustomPathT(hProfileFolderPath, profileRootPath, _countof(profileRootPath), VARST(L"%miranda_userdata%")); + mir_sntprintf(profilePath, MAX_PATH, L"%s\\%s.tox", profileRootPath, accountName); return profilePath; } @@ -26,7 +26,7 @@ bool CToxProto::LoadToxProfile(Tox_Options *options) if (!IsFileExists(profilePath)) return false; - FILE *profile = _tfopen(profilePath, _T("rb")); + FILE *profile = _tfopen(profilePath, L"rb"); if (profile == NULL) { ShowNotification(TranslateT("Unable to open Tox profile"), MB_ICONERROR); @@ -122,7 +122,7 @@ void CToxProto::SaveToxProfile(CToxThread *toxThread) } ptrT profilePath(GetToxProfilePath()); - FILE *profile = _tfopen(profilePath, _T("wb")); + FILE *profile = _tfopen(profilePath, L"wb"); if (profile == NULL) { debugLogA(__FUNCTION__": failed to open tox profile"); diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp index 5c9ca9b56d..e2b3286d22 100644 --- a/protocols/Tox/src/tox_transfer.cpp +++ b/protocols/Tox/src/tox_transfer.cpp @@ -20,7 +20,7 @@ void CToxProto::OnFriendFile(Tox*, uint32_t friendNumber, uint32_t fileNumber, u ptrT address(proto->getTStringA(hContact, TOX_SETTINGS_ID)); TCHAR avatarName[MAX_PATH]; - mir_sntprintf(avatarName, MAX_PATH, _T("%s.png"), address); + mir_sntprintf(avatarName, MAX_PATH, L"%s.png", address); AvatarTransferParam *transfer = new AvatarTransferParam(friendNumber, fileNumber, avatarName, fileSize); transfer->pfts.flags |= PFTS_RECEIVING; @@ -56,7 +56,7 @@ void CToxProto::OnFriendFile(Tox*, uint32_t friendNumber, uint32_t fileNumber, u pre.dwFlags = PRFF_TCHAR; pre.fileCount = 1; pre.timestamp = time(NULL); - pre.descr.t = _T(""); + pre.descr.t = L""; pre.files.t = &name; pre.lParam = (LPARAM)transfer; ProtoChainRecvFile(hContact, &pre); @@ -78,7 +78,7 @@ HANDLE CToxProto::OnFileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR * // stupid fix TCHAR fullPath[MAX_PATH]; - mir_sntprintf(fullPath, _T("%s\\%s"), transfer->pfts.tszWorkingDir, transfer->pfts.tszCurrentFile); + mir_sntprintf(fullPath, L"%s\\%s", transfer->pfts.tszWorkingDir, transfer->pfts.tszCurrentFile); transfer->ChangeName(fullPath); if (!ProtoBroadcastAck(hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, (HANDLE)transfer, (LPARAM)&transfer->pfts)) @@ -111,7 +111,7 @@ int CToxProto::OnFileResume(HANDLE hTransfer, int *action, const TCHAR **szFilen ToxHexAddress pubKey = GetContactPublicKey(transfer->friendNumber); - TCHAR *mode = *action == FILERESUME_OVERWRITE ? _T("wb") : _T("ab"); + TCHAR *mode = *action == FILERESUME_OVERWRITE ? L"wb" : L"ab"; if (!transfer->OpenFile(mode)) { debugLogA(__FUNCTION__": failed to open file (%d) from %s(%d)", transfer->fileNumber, (const char*)pubKey, transfer->friendNumber); @@ -206,7 +206,7 @@ HANDLE CToxProto::OnSendFile(MCONTACT hContact, const TCHAR*, TCHAR **ppszFiles) if (friendNumber == UINT32_MAX) return NULL; - FILE *hFile = _tfopen(ppszFiles[0], _T("rb")); + FILE *hFile = _tfopen(ppszFiles[0], L"rb"); if (hFile == NULL) { debugLogA(__FUNCTION__": cannot open file %s", ppszFiles[0]); diff --git a/protocols/Twitter/src/StringUtil.cpp b/protocols/Twitter/src/StringUtil.cpp index 0ac892cd1f..d9b7123216 100644 --- a/protocols/Twitter/src/StringUtil.cpp +++ b/protocols/Twitter/src/StringUtil.cpp @@ -71,7 +71,7 @@ tstring GetWord(const tstring& str, unsigned index, bool getRest) } else ++end; } - return _T(""); + return L""; } // takes a pointer to a string, and does an inplace replace of all the characters "from" found diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp index 9c5cb08cab..13d438c185 100644 --- a/protocols/Twitter/src/chat.cpp +++ b/protocols/Twitter/src/chat.cpp @@ -64,7 +64,7 @@ int TwitterProto::OnChatOutgoing(WPARAM, LPARAM lParam) switch (hook->pDest->iType) { case GC_USER_MESSAGE: - debugLog(_T("**Chat - Outgoing message: %s"), hook->ptszText); + debugLog(L"**Chat - Outgoing message: %s", hook->ptszText); { T2Utf text(hook->ptszText); @@ -95,7 +95,7 @@ void TwitterProto::AddChatContact(const char *name, const char *nick) gce.time = DWORD(time(0)); gce.ptszNick = mir_a2t(nick ? nick : name); gce.ptszUID = mir_a2t(name); - gce.ptszStatus = _T("Normal"); + gce.ptszStatus = L"Normal"; CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce)); mir_free(const_cast<TCHAR*>(gce.ptszNick)); @@ -130,7 +130,7 @@ INT_PTR TwitterProto::OnJoinChat(WPARAM, LPARAM suppress) // ***** Create a group GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_ADDGROUP }; GCEVENT gce = { sizeof(gce), &gcd }; - gce.ptszStatus = _T("Normal"); + gce.ptszStatus = L"Normal"; CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce)); // ***** Hook events diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index 642ccd08c3..87c5e25aaa 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -169,7 +169,7 @@ bool TwitterProto::NegotiateConnection() wchar_t buf[1024] = {}; mir_snwprintf(buf, _countof(buf), AuthorizeUrl.c_str(), oauthToken.c_str()); - debugLogW(_T("**NegotiateConnection - Launching %s"), buf); + debugLogW(L"**NegotiateConnection - Launching %s", buf); ShellExecute(NULL, L"open", buf, NULL, NULL, SW_SHOWNORMAL); ShowPinDialog(); diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 3c1d34920b..ffa2245609 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -60,7 +60,7 @@ TwitterProto::TwitterProto(const char *proto_name, const TCHAR *username) : ConsumerKey = OAUTH_CONSUMER_KEY; ConsumerSecret = OAUTH_CONSUMER_SECRET; - AuthorizeUrl = _T("https://api.twitter.com/oauth/authorize?oauth_token=%s"); + AuthorizeUrl = L"https://api.twitter.com/oauth/authorize?oauth_token=%s"; } TwitterProto::~TwitterProto() @@ -319,7 +319,7 @@ int TwitterProto::OnModulesLoaded(WPARAM, LPARAM) if (m_hNetlibUser == NULL) { TCHAR error[200]; mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName); - MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR); + MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR); } // Create avatar network connection (TODO: probably remove this) @@ -332,7 +332,7 @@ int TwitterProto::OnModulesLoaded(WPARAM, LPARAM) if (hAvatarNetlib_ == NULL) { TCHAR error[200]; mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), TranslateT("Twitter (avatars)")); - MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR); + MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR); } twit_.set_handle(this, m_hNetlibUser); @@ -455,7 +455,7 @@ void TwitterProto::UpdateSettings() std::tstring TwitterProto::GetAvatarFolder() { TCHAR path[MAX_PATH]; - mir_sntprintf(path, _T("%s\\%s"), VARST(_T("%miranda_avatarcache%")), m_tszUserName); + mir_sntprintf(path, L"%s\\%s", VARST(L"%miranda_avatarcache%"), m_tszUserName); return path; } diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index c042e43aa9..f82017d613 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -23,8 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "twitter.h" static const TCHAR *sites[] = { - _T("https://api.twitter.com/"), - _T("https://identi.ca/api/") + L"https://api.twitter.com/", + L"https://identi.ca/api/" }; INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -109,11 +109,11 @@ INT_PTR CALLBACK tweet_proc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara proto = reinterpret_cast<TwitterProto*>(lParam); SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); SendDlgItemMessage(hwndDlg, IDC_TWEETMSG, EM_LIMITTEXT, 140, 0); - SetDlgItemText(hwndDlg, IDC_CHARACTERS, _T("140")); + SetDlgItemText(hwndDlg, IDC_CHARACTERS, L"140"); // Set window title TCHAR title[512]; - mir_sntprintf(title, _T("Send Tweet for %s"), proto->m_tszUserName); + mir_sntprintf(title, L"Send Tweet for %s", proto->m_tszUserName); SetWindowText(hwndDlg, title); return true; @@ -299,17 +299,17 @@ namespace popup_options TCHAR *text; } const quotes[] = { { - _T("Dorothy Parker"), _T("If, with the literate, I am\n") - _T("Impelled to try an epigram,\n") - _T("I never seek to take the credit;\n") - _T("We all assume that Oscar said it.") }, - { _T("Steve Ballmer"), _T("I have never, honestly, thrown a chair in my life.") }, - { _T("James Joyce"), _T("I think I would know Nora's fart anywhere. I think ") - _T("I could pick hers out in a roomful of farting women.") }, - { _T("Brooke Shields"), _T("Smoking kills. If you're killed, you've lost a very ") - _T("important part of your life.") }, - { _T("Yogi Berra"), _T("Always go to other peoples' funerals, otherwise ") - _T("they won't go to yours.") }, + L"Dorothy Parker", L"If, with the literate, I am\n" + L"Impelled to try an epigram,\n" + L"I never seek to take the credit;\n" + L"We all assume that Oscar said it." }, + { L"Steve Ballmer", L"I have never, honestly, thrown a chair in my life." }, + { L"James Joyce", L"I think I would know Nora's fart anywhere. I think " + L"I could pick hers out in a roomful of farting women." }, + { L"Brooke Shields", L"Smoking kills. If you're killed, you've lost a very " + L"important part of your life." }, + { L"Yogi Berra", L"Always go to other peoples' funerals, otherwise " + L"they won't go to yours." }, }; static void preview(HWND hwndDlg) diff --git a/protocols/Twitter/src/utility.cpp b/protocols/Twitter/src/utility.cpp index 6c7724739a..e8056e02a8 100644 --- a/protocols/Twitter/src/utility.cpp +++ b/protocols/Twitter/src/utility.cpp @@ -149,7 +149,7 @@ bool save_url(HANDLE hNetlib, const std::string &url, const std::tstring &filena CreateDirectoryTreeT(dir.c_str()); // Write to file - FILE *f = _tfopen(filename.c_str(), _T("wb")); + FILE *f = _tfopen(filename.c_str(), L"wb"); fwrite(resp->pData, 1, resp->dataLength, f); fclose(f); } diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index be8e69cb1f..0e835a8e35 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -594,46 +594,46 @@ void CVkProto::SetMirVer(MCONTACT hContact, int platform) switch (platform) { case VK_APP_ID: - MirVer = _T("Miranda NG VKontakte"); + MirVer = L"Miranda NG VKontakte"; break; case 2386311: - MirVer = _T("QIP 2012 VKontakte"); + MirVer = L"QIP 2012 VKontakte"; break; case 1: - MirVer = _T("VKontakte (Mobile)"); + MirVer = L"VKontakte (Mobile)"; break; case 3087106: // iPhone case 3140623: case 2: - MirVer = _T("VKontakte (iPhone)"); + MirVer = L"VKontakte (iPhone)"; break; case 3682744: // iPad case 3: - MirVer = _T("VKontakte (iPad)"); + MirVer = L"VKontakte (iPad)"; break; case 2685278: // Android - Kate - MirVer = _T("Kate Mobile (Android)"); + MirVer = L"Kate Mobile (Android)"; break; case 2890984: // Android case 2274003: case 4: - MirVer = _T("VKontakte (Android)"); + MirVer = L"VKontakte (Android)"; break; case 3059453: // Windows Phone case 2424737: case 3502561: case 5: - MirVer = _T("VKontakte (WPhone)"); + MirVer = L"VKontakte (WPhone)"; break; case 3584591: // Windows 8.x case 6: - MirVer = _T("VKontakte (Windows)"); + MirVer = L"VKontakte (Windows)"; break; case 7: - MirVer = _T("VKontakte (Website)"); + MirVer = L"VKontakte (Website)"; break; default: - MirVer = _T("VKontakte (Other)"); + MirVer = L"VKontakte (Other)"; bSetFlag = OldMirVer.IsEmpty(); } @@ -679,7 +679,7 @@ void CVkProto::SetSrmmReadStatus(MCONTACT hContact) TCHAR ttime[64]; _locale_t locale = _create_locale(LC_ALL, ""); - _tcsftime_l(ttime, _countof(ttime), _T("%X - %x"), localtime(&time), locale); + _tcsftime_l(ttime, _countof(ttime), L"%X - %x", localtime(&time), locale); _free_locale(locale); StatusTextData st = { 0 }; @@ -834,36 +834,36 @@ CMString CVkProto::SpanVKNotificationType(CMString& tszType, VKObjType& vkFeedba { CVKNotification vkNotification[] = { // type, parent, feedback, string for translate - { _T("group"), vkInvite, vkNull, TranslateT("has invited you to a group") }, - { _T("page"), vkInvite, vkNull, TranslateT("has invited you to subscribe to a page") }, - { _T("event"), vkInvite, vkNull, TranslateT("invites you to event") }, - - { _T("follow"), vkNull, vkUsers, _T("") }, - { _T("friend_accepted"), vkNull, vkUsers, _T("") }, - { _T("mention"), vkNull, vkPost, _T("") }, - { _T("wall"), vkNull, vkPost, _T("") }, - { _T("wall_publish"), vkNull, vkPost, _T("") }, - - { _T("comment_post"), vkPost, vkComment, TranslateT("commented on your post") }, - { _T("comment_photo"), vkPhoto, vkComment, TranslateT("commented on your photo") }, - { _T("comment_video"), vkVideo, vkComment, TranslateT("commented on your video") }, - { _T("reply_comment"), vkComment, vkComment, TranslateT("replied to your comment") }, - { _T("reply_comment_photo"), vkComment, vkComment, TranslateT("replied to your comment to photo") }, - { _T("reply_comment_video"), vkComment, vkComment, TranslateT("replied to your comment to video") }, - { _T("reply_topic"), vkTopic, vkComment, TranslateT("replied to your topic") }, - { _T("like_post"), vkPost, vkUsers, TranslateT("liked your post") }, - { _T("like_comment"), vkComment, vkUsers, TranslateT("liked your comment") }, - { _T("like_photo"), vkPhoto, vkUsers, TranslateT("liked your photo") }, - { _T("like_video"), vkVideo, vkUsers, TranslateT("liked your video") }, - { _T("like_comment_photo"), vkComment, vkUsers, TranslateT("liked your comment to photo") }, - { _T("like_comment_video"), vkComment, vkUsers, TranslateT("liked your comment to video" ) }, - { _T("like_comment_topic"), vkComment, vkUsers, TranslateT("liked your comment to topic") }, - { _T("copy_post"), vkPost, vkCopy, TranslateT("shared your post") }, - { _T("copy_photo"), vkPhoto, vkCopy, TranslateT("shared your photo") }, - { _T("copy_video"), vkVideo, vkCopy, TranslateT("shared your video") }, - { _T("mention_comments"), vkPost, vkComment, _T("mentioned you in comment") }, - { _T("mention_comment_photo"), vkPhoto, vkComment, _T("mentioned you in comment to photo") }, - { _T("mention_comment_video"), vkVideo, vkComment, _T("mentioned you in comment to video") } + { L"group", vkInvite, vkNull, TranslateT("has invited you to a group") }, + { L"page", vkInvite, vkNull, TranslateT("has invited you to subscribe to a page") }, + { L"event", vkInvite, vkNull, TranslateT("invites you to event") }, + + { L"follow", vkNull, vkUsers, L"" }, + { L"friend_accepted", vkNull, vkUsers, L"" }, + { L"mention", vkNull, vkPost, L"" }, + { L"wall", vkNull, vkPost, L"" }, + { L"wall_publish", vkNull, vkPost, L"" }, + + { L"comment_post", vkPost, vkComment, TranslateT("commented on your post") }, + { L"comment_photo", vkPhoto, vkComment, TranslateT("commented on your photo") }, + { L"comment_video", vkVideo, vkComment, TranslateT("commented on your video") }, + { L"reply_comment", vkComment, vkComment, TranslateT("replied to your comment") }, + { L"reply_comment_photo", vkComment, vkComment, TranslateT("replied to your comment to photo") }, + { L"reply_comment_video", vkComment, vkComment, TranslateT("replied to your comment to video") }, + { L"reply_topic", vkTopic, vkComment, TranslateT("replied to your topic") }, + { L"like_post", vkPost, vkUsers, TranslateT("liked your post") }, + { L"like_comment", vkComment, vkUsers, TranslateT("liked your comment") }, + { L"like_photo", vkPhoto, vkUsers, TranslateT("liked your photo") }, + { L"like_video", vkVideo, vkUsers, TranslateT("liked your video") }, + { L"like_comment_photo", vkComment, vkUsers, TranslateT("liked your comment to photo") }, + { L"like_comment_video", vkComment, vkUsers, TranslateT("liked your comment to video" ) }, + { L"like_comment_topic", vkComment, vkUsers, TranslateT("liked your comment to topic") }, + { L"copy_post", vkPost, vkCopy, TranslateT("shared your post") }, + { L"copy_photo", vkPhoto, vkCopy, TranslateT("shared your photo") }, + { L"copy_video", vkVideo, vkCopy, TranslateT("shared your video") }, + { L"mention_comments", vkPost, vkComment, L"mentioned you in comment" }, + { L"mention_comment_photo", vkPhoto, vkComment, L"mentioned you in comment to photo" }, + { L"mention_comment_video", vkVideo, vkComment, L"mentioned you in comment to video" } }; CMString tszRes; @@ -896,7 +896,7 @@ CMString CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC) switch (m_vkOptions.iIMGBBCSupport) { case imgNo: - tszPreviewLink = _T(""); + tszPreviewLink = L""; break; case imgFullSize: tszPreviewLink = tszLink; @@ -910,12 +910,12 @@ CMString CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC) int iWidth = jnPhoto["width"].as_int(); int iHeight = jnPhoto["height"].as_int(); - tszRes.AppendFormat(_T("%s (%dx%d)"), SetBBCString(TranslateT("Photo"), iBBC, vkbbcUrl, tszLink), iWidth, iHeight); + tszRes.AppendFormat(L"%s (%dx%d)", SetBBCString(TranslateT("Photo"), iBBC, vkbbcUrl, tszLink), iWidth, iHeight); if (m_vkOptions.iIMGBBCSupport && iBBC != bbcNo) - tszRes.AppendFormat(_T("\n\t%s"), SetBBCString(!tszPreviewLink.IsEmpty() ? tszPreviewLink : (!tszLink.IsEmpty() ? tszLink : _T("")), bbcBasic, vkbbcImg)); + tszRes.AppendFormat(L"\n\t%s", SetBBCString(!tszPreviewLink.IsEmpty() ? tszPreviewLink : (!tszLink.IsEmpty() ? tszLink : L""), bbcBasic, vkbbcImg)); CMString tszText(jnPhoto["text"].as_mstring()); if (!tszText.IsEmpty()) - tszRes += _T("\n") + tszText; + tszRes += L"\n" + tszText; return tszRes; } @@ -923,33 +923,33 @@ CMString CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC) CMString CVkProto::SetBBCString(LPCTSTR ptszString, BBCSupport iBBC, VKBBCType bbcType, LPCTSTR tszAddString) { CVKBBCItem bbcItem[] = { - { vkbbcB, bbcNo, _T("%s") }, - { vkbbcB, bbcBasic, _T("[b]%s[/b]") }, - { vkbbcB, bbcAdvanced, _T("[b]%s[/b]") }, - { vkbbcI, bbcNo, _T("%s") }, - { vkbbcI, bbcBasic, _T("[i]%s[/i]") }, - { vkbbcI, bbcAdvanced, _T("[i]%s[/i]") }, - { vkbbcS, bbcNo, _T("%s") }, - { vkbbcS, bbcBasic, _T("[s]%s[/s]") }, - { vkbbcS, bbcAdvanced, _T("[s]%s[/s]") }, - { vkbbcU, bbcNo, _T("%s") }, - { vkbbcU, bbcBasic, _T("[u]%s[/u]") }, - { vkbbcU, bbcAdvanced, _T("[u]%s[/u]") }, - { vkbbcCode, bbcNo, _T("%s") }, - { vkbbcCode, bbcBasic, _T("%s") }, - { vkbbcCode, bbcAdvanced, _T("[code]%s[/code]") }, - { vkbbcImg, bbcNo, _T("%s") }, - { vkbbcImg, bbcBasic, _T("[img]%s[/img]") }, - { vkbbcImg, bbcAdvanced, _T("[img]%s[/img]") }, - { vkbbcUrl, bbcNo, _T("%s (%s)") }, - { vkbbcUrl, bbcBasic, _T("[i]%s[/i] (%s)") }, - { vkbbcUrl, bbcAdvanced, _T("[url=%s]%s[/url]") }, - { vkbbcSize, bbcNo, _T("%s") }, - { vkbbcSize, bbcBasic, _T("%s") }, - { vkbbcSize, bbcAdvanced, _T("[size=%s]%s[/size]") }, - { vkbbcColor, bbcNo, _T("%s") }, - { vkbbcColor, bbcBasic, _T("%s") }, - { vkbbcColor, bbcAdvanced, _T("[color=%s]%s[/color]") }, + { vkbbcB, bbcNo, L"%s" }, + { vkbbcB, bbcBasic, L"[b]%s[/b]" }, + { vkbbcB, bbcAdvanced, L"[b]%s[/b]" }, + { vkbbcI, bbcNo, L"%s" }, + { vkbbcI, bbcBasic, L"[i]%s[/i]" }, + { vkbbcI, bbcAdvanced, L"[i]%s[/i]" }, + { vkbbcS, bbcNo, L"%s" }, + { vkbbcS, bbcBasic, L"[s]%s[/s]" }, + { vkbbcS, bbcAdvanced, L"[s]%s[/s]" }, + { vkbbcU, bbcNo, L"%s" }, + { vkbbcU, bbcBasic, L"[u]%s[/u]" }, + { vkbbcU, bbcAdvanced, L"[u]%s[/u]" }, + { vkbbcCode, bbcNo, L"%s" }, + { vkbbcCode, bbcBasic, L"%s" }, + { vkbbcCode, bbcAdvanced, L"[code]%s[/code]" }, + { vkbbcImg, bbcNo, L"%s" }, + { vkbbcImg, bbcBasic, L"[img]%s[/img]" }, + { vkbbcImg, bbcAdvanced, L"[img]%s[/img]" }, + { vkbbcUrl, bbcNo, L"%s (%s)" }, + { vkbbcUrl, bbcBasic, L"[i]%s[/i] (%s)" }, + { vkbbcUrl, bbcAdvanced, L"[url=%s]%s[/url]" }, + { vkbbcSize, bbcNo, L"%s" }, + { vkbbcSize, bbcBasic, L"%s" }, + { vkbbcSize, bbcAdvanced, L"[size=%s]%s[/size]" }, + { vkbbcColor, bbcNo, L"%s" }, + { vkbbcColor, bbcBasic, L"%s" }, + { vkbbcColor, bbcAdvanced, L"[color=%s]%s[/color]" }, }; if (IsEmpty(ptszString)) @@ -967,9 +967,9 @@ CMString CVkProto::SetBBCString(LPCTSTR ptszString, BBCSupport iBBC, VKBBCType b return CMString(ptszString); if (bbcType == vkbbcUrl && iBBC != bbcAdvanced) - res.AppendFormat(ptszFormat, ptszString, tszAddString ? tszAddString : _T("")); + res.AppendFormat(ptszFormat, ptszString, tszAddString ? tszAddString : L""); else if (iBBC == bbcAdvanced && bbcType >= vkbbcUrl) - res.AppendFormat(ptszFormat, tszAddString ? tszAddString : _T(""), ptszString); + res.AppendFormat(ptszFormat, tszAddString ? tszAddString : L"", ptszString); else res.AppendFormat(ptszFormat, ptszString); @@ -978,12 +978,12 @@ CMString CVkProto::SetBBCString(LPCTSTR ptszString, BBCSupport iBBC, VKBBCType b CMString& CVkProto::ClearFormatNick(CMString& tszText) { - int iNameEnd = tszText.Find(_T("],")), iNameBeg = tszText.Find(_T("|")); + int iNameEnd = tszText.Find(L"],"), iNameBeg = tszText.Find(L"|"); if (iNameEnd != -1 && iNameBeg != -1 && iNameBeg < iNameEnd) { CMString tszName = tszText.Mid(iNameBeg + 1, iNameEnd - iNameBeg - 1); CMString tszBody = tszText.Mid(iNameEnd + 2); if (!tszName.IsEmpty() && !tszBody.IsEmpty()) - tszText = tszName + _T(",") + tszBody; + tszText = tszName + L"," + tszBody; } return tszText; @@ -1008,14 +1008,14 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport res.AppendChar('\t'); CMString tszType(jnAttach["type"].as_mstring()); - if (tszType == _T("photo")) { + if (tszType == L"photo") { const JSONNode &jnPhoto = jnAttach["photo"]; if (!jnPhoto) continue; res += GetVkPhotoItem(jnPhoto, iBBC); } - else if (tszType ==_T("audio")) { + else if (tszType ==L"audio") { const JSONNode &jnAudio = jnAttach["audio"]; if (!jnAudio) continue; @@ -1023,17 +1023,17 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszArtist(jnAudio["artist"].as_mstring()); CMString tszTitle(jnAudio["title"].as_mstring()); CMString tszUrl(jnAudio["url"].as_mstring()); - CMString tszAudio(FORMAT, _T("%s - %s"), tszArtist, tszTitle); + CMString tszAudio(FORMAT, L"%s - %s", tszArtist, tszTitle); - int iParamPos = tszUrl.Find(_T("?")); + int iParamPos = tszUrl.Find(L"?"); if (m_vkOptions.bShortenLinksForAudio && iParamPos != -1) tszUrl = tszUrl.Left(iParamPos); - res.AppendFormat(_T("%s: %s"), + res.AppendFormat(L"%s: %s", SetBBCString(TranslateT("Audio"), iBBC, vkbbcB), SetBBCString(tszAudio, iBBC, vkbbcUrl, tszUrl)); } - else if (tszType ==_T("video")) { + else if (tszType ==L"video") { const JSONNode &jnVideo = jnAttach["video"]; if (!jnVideo) continue; @@ -1041,23 +1041,23 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszTitle(jnVideo["title"].as_mstring()); int vid = jnVideo["id"].as_int(); int ownerID = jnVideo["owner_id"].as_int(); - CMString tszUrl(FORMAT, _T("https://vk.com/video%d_%d"), ownerID, vid); - res.AppendFormat(_T("%s: %s"), + CMString tszUrl(FORMAT, L"https://vk.com/video%d_%d", ownerID, vid); + res.AppendFormat(L"%s: %s", SetBBCString(TranslateT("Video"), iBBC, vkbbcB), SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl)); } - else if (tszType == _T("doc")) { + else if (tszType == L"doc") { const JSONNode &jnDoc = jnAttach["doc"]; if (!jnDoc) continue; CMString tszTitle(jnDoc["title"].as_mstring()); CMString tszUrl(jnDoc["url"].as_mstring()); - res.AppendFormat(_T("%s: %s"), + res.AppendFormat(L"%s: %s", SetBBCString(TranslateT("Document"), iBBC, vkbbcB), SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl)); } - else if (tszType == _T("wall")) { + else if (tszType == L"wall") { const JSONNode &jnWall = jnAttach["wall"]; if (!jnWall) continue; @@ -1065,10 +1065,10 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszText(jnWall["text"].as_mstring()); int id = jnWall["id"].as_int(); int fromID = jnWall["from_id"].as_int(); - CMString tszUrl(FORMAT, _T("https://vk.com/wall%d_%d"), fromID, id); - res.AppendFormat(_T("%s: %s"), + CMString tszUrl(FORMAT, L"https://vk.com/wall%d_%d", fromID, id); + res.AppendFormat(L"%s: %s", SetBBCString(TranslateT("Wall post"), iBBC, vkbbcUrl, tszUrl), - tszText.IsEmpty() ? _T(" ") : tszText); + tszText.IsEmpty() ? L" " : tszText); const JSONNode &jnCopyHystory = jnWall["copy_history"]; for (auto aCHit = jnCopyHystory.begin(); aCHit != jnCopyHystory.end(); ++aCHit) { @@ -1077,18 +1077,18 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszCHText(jnCopyHystoryItem["text"].as_mstring()); int iCHid = jnCopyHystoryItem["id"].as_int(); int iCHfromID = jnCopyHystoryItem["from_id"].as_int(); - CMString tszCHUrl(FORMAT, _T("https://vk.com/wall%d_%d"), iCHfromID, iCHid); - tszCHText.Replace(_T("\n"), _T("\n\t\t")); - res.AppendFormat(_T("\n\t\t%s: %s"), + CMString tszCHUrl(FORMAT, L"https://vk.com/wall%d_%d", iCHfromID, iCHid); + tszCHText.Replace(L"\n", L"\n\t\t"); + res.AppendFormat(L"\n\t\t%s: %s", SetBBCString(TranslateT("Wall post"), iBBC, vkbbcUrl, tszCHUrl), - tszCHText.IsEmpty() ? _T(" ") : tszCHText); + tszCHText.IsEmpty() ? L" " : tszCHText); const JSONNode &jnSubAttachments = jnCopyHystoryItem["attachments"]; if (jnSubAttachments) { debugLogA("CVkProto::GetAttachmentDescr SubAttachments"); CMString tszAttachmentDescr = GetAttachmentDescr(jnSubAttachments, iBBC); - tszAttachmentDescr.Replace(_T("\n"), _T("\n\t\t")); - res += _T("\n\t\t") + tszAttachmentDescr; + tszAttachmentDescr.Replace(L"\n", L"\n\t\t"); + res += L"\n\t\t" + tszAttachmentDescr; } } @@ -1096,11 +1096,11 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport if (jnSubAttachments) { debugLogA("CVkProto::GetAttachmentDescr SubAttachments"); CMString tszAttachmentDescr = GetAttachmentDescr(jnSubAttachments, iBBC); - tszAttachmentDescr.Replace(_T("\n"), _T("\n\t")); - res += _T("\n\t") + tszAttachmentDescr; + tszAttachmentDescr.Replace(L"\n", L"\n\t"); + res += L"\n\t" + tszAttachmentDescr; } } - else if (tszType == _T("sticker")) { + else if (tszType == L"sticker") { const JSONNode &jnSticker = jnAttach["sticker"]; if (!jnSticker) continue; @@ -1108,7 +1108,7 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport if (m_vkOptions.bStikersAsSmyles) { int id = jnSticker["id"].as_int(); - res.AppendFormat(_T("[sticker:%d]"), id); + res.AppendFormat(L"[sticker:%d]", id); } else { CMString tszLink; @@ -1119,13 +1119,13 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport break; } } - res.AppendFormat(_T("%s"), tszLink); + res.AppendFormat(L"%s", tszLink); if (m_vkOptions.iIMGBBCSupport && iBBC != bbcNo) res += SetBBCString(tszLink, iBBC, vkbbcImg); } } - else if (tszType == _T("link")) { + else if (tszType == L"link") { const JSONNode &jnLink = jnAttach["link"]; if (!jnLink) continue; @@ -1135,20 +1135,20 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszCaption(jnLink["caption"].as_mstring()); CMString tszDescription(jnLink["description"].as_mstring()); - res.AppendFormat(_T("%s: %s"), + res.AppendFormat(L"%s: %s", SetBBCString(TranslateT("Link"), iBBC, vkbbcB), SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl)); if (!tszCaption.IsEmpty()) - res.AppendFormat(_T("\n\t%s"), SetBBCString(tszCaption, iBBC, vkbbcI)); + res.AppendFormat(L"\n\t%s", SetBBCString(tszCaption, iBBC, vkbbcI)); if (jnLink["photo"]) - res.AppendFormat(_T("\n\t%s"), GetVkPhotoItem(jnLink["photo"], iBBC)); + res.AppendFormat(L"\n\t%s", GetVkPhotoItem(jnLink["photo"], iBBC)); if (!tszDescription.IsEmpty()) - res.AppendFormat(_T("\n\t%s"), tszDescription); + res.AppendFormat(L"\n\t%s", tszDescription); } - else if (tszType == _T("market")) { + else if (tszType == L"market") { const JSONNode &jnMarket = jnAttach["market"]; int id = jnMarket["id"].as_int(); @@ -1156,30 +1156,30 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszTitle(jnMarket["title"].as_mstring()); CMString tszDescription(jnMarket["description"].as_mstring()); CMString tszPhoto(jnMarket["thumb_photo"].as_mstring()); - CMString tszUrl(FORMAT, _T("https://vk.com/%s%d?w=product%d_%d"), - ownerID > 0 ? _T("id") : _T("club"), + CMString tszUrl(FORMAT, L"https://vk.com/%s%d?w=product%d_%d", + ownerID > 0 ? L"id" : L"club", ownerID > 0 ? ownerID : (-1)*ownerID, ownerID, id); - res.AppendFormat(_T("%s: %s"), + res.AppendFormat(L"%s: %s", SetBBCString(TranslateT("Product"), iBBC, vkbbcB), SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl)); if (!tszPhoto.IsEmpty()) - res.AppendFormat(_T("\n\t%s: %s"), + res.AppendFormat(L"\n\t%s: %s", SetBBCString(TranslateT("Photo"), iBBC, vkbbcB), SetBBCString(tszPhoto, iBBC, vkbbcImg)); if (jnMarket["price"] && jnMarket["price"]["text"]) - res.AppendFormat(_T("\n\t%s: %s"), + res.AppendFormat(L"\n\t%s: %s", SetBBCString(TranslateT("Price"), iBBC, vkbbcB), jnMarket["price"]["text"].as_mstring()); if (!tszDescription.IsEmpty()) - res.AppendFormat(_T("\n\t%s"), tszDescription); + res.AppendFormat(L"\n\t%s", tszDescription); } - else if (tszType == _T("gift")) { + else if (tszType == L"gift") { const JSONNode &jnGift = jnAttach["gift"]; if (!jnGift) continue; @@ -1197,7 +1197,7 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport res += SetBBCString(TranslateT("Gift"), iBBC, vkbbcUrl, tszLink); if (m_vkOptions.iIMGBBCSupport && iBBC != bbcNo) - res.AppendFormat(_T("\n\t%s"), SetBBCString(tszLink, iBBC, vkbbcImg)); + res.AppendFormat(L"\n\t%s", SetBBCString(tszLink, iBBC, vkbbcImg)); } else res.AppendFormat(TranslateT("Unsupported or unknown attachment type: %s"), SetBBCString(tszType, iBBC, vkbbcB)); @@ -1223,8 +1223,8 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn const JSONNode &jnUser = (*it); int iUserId = jnUser["id"].as_int(); - CMString tszNick(FORMAT, _T("%s %s"), jnUser["first_name"].as_mstring(), jnUser["last_name"].as_mstring()); - CMString tszLink(FORMAT, _T("https://vk.com/id%d"), iUserId); + CMString tszNick(FORMAT, L"%s %s", jnUser["first_name"].as_mstring(), jnUser["last_name"].as_mstring()); + CMString tszLink(FORMAT, L"https://vk.com/id%d", iUserId); CVkUserInfo *vkUser = new CVkUserInfo(jnUser["id"].as_int(), false, tszNick, tszLink, FindUser(iUserId)); vkUsers.insert(vkUser); @@ -1248,13 +1248,13 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn tszNick = ptrT(db_get_tsa(hContact, m_szModuleName, "Nick")); else tszNick = TranslateT("(Unknown contact)"); - tszUrl.AppendFormat(_T("https://vk.com/id%d"), uid); + tszUrl.AppendFormat(L"https://vk.com/id%d", uid); } time_t datetime = (time_t)jnMsg["date"].as_int(); TCHAR ttime[64]; _locale_t locale = _create_locale(LC_ALL, ""); - _tcsftime_l(ttime, _countof(ttime), _T("%x %X"), localtime(&datetime), locale); + _tcsftime_l(ttime, _countof(ttime), L"%x %X", localtime(&datetime), locale); _free_locale(locale); CMString tszBody(jnMsg["body"].as_mstring()); @@ -1263,7 +1263,7 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn if (jnFwdMessages) { CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, iBBC == bbcNo ? iBBC : m_vkOptions.BBCForAttachments()); if (!tszBody.IsEmpty()) - tszFwdMessages = _T("\n") + tszFwdMessages; + tszFwdMessages = L"\n" + tszFwdMessages; tszBody += tszFwdMessages; } @@ -1271,13 +1271,13 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn if (jnAttachments) { CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, iBBC == bbcNo ? iBBC : m_vkOptions.BBCForAttachments()); if (!tszBody.IsEmpty()) - tszAttachmentDescr = _T("\n") + tszAttachmentDescr; + tszAttachmentDescr = L"\n" + tszAttachmentDescr; tszBody += tszAttachmentDescr; } - tszBody.Replace(_T("\n"), _T("\n\t")); + tszBody.Replace(L"\n", L"\n\t"); TCHAR tcSplit = m_vkOptions.bSplitFormatFwdMsg ? '\n' : ' '; - CMString tszMes(FORMAT, _T("%s %s%c%s %s:\n\n%s\n"), + CMString tszMes(FORMAT, L"%s %s%c%s %s:\n\n%s\n", SetBBCString(TranslateT("Message from"), iBBC, vkbbcB), SetBBCString(tszNick, iBBC, vkbbcUrl, tszUrl), tcSplit, @@ -1313,17 +1313,17 @@ void CVkProto::SetInvisible(MCONTACT hContact) CMString CVkProto::RemoveBBC(CMString& tszSrc) { static const TCHAR *tszSimpleBBCodes[][2] = { - { _T("[b]"), _T("[/b]") }, - { _T("[u]"), _T("[/u]") }, - { _T("[i]"), _T("[/i]") }, - { _T("[s]"), _T("[/s]") }, + { L"[b]", L"[/b]" }, + { L"[u]", L"[/u]" }, + { L"[i]", L"[/i]" }, + { L"[s]", L"[/s]" }, }; static const TCHAR *tszParamBBCodes[][2] = { - { _T("[url="), _T("[/url]") }, - { _T("[img="), _T("[/img]") }, - { _T("[size="), _T("[/size]") }, - { _T("[color="), _T("[/color]") }, + { L"[url=", L"[/url]" }, + { L"[img=", L"[/img]" }, + { L"[size=", L"[/size]" }, + { L"[color=", L"[/color]" }, }; CMString tszRes(tszSrc); @@ -1371,7 +1371,7 @@ CMString CVkProto::RemoveBBC(CMString& tszSrc) if ((posOpen = tszLow.Find(tszOpenTag, posOpen)) < 0) break; - if ((posOpen2 = tszLow.Find(_T("]"), posOpen + lenOpen)) < 0) + if ((posOpen2 = tszLow.Find(L"]", posOpen + lenOpen)) < 0) break; if ((posClose = tszLow.Find(tszCloseTag, posOpen2 + 1)) < 0) @@ -1393,12 +1393,12 @@ CMString CVkProto::RemoveBBC(CMString& tszSrc) void CVkProto::ShowCaptchaInBrowser(HBITMAP hBitmap) { TCHAR tszTempDir[MAX_PATH]; - if (!GetEnvironmentVariable(_T("TEMP"), tszTempDir, MAX_PATH)) + if (!GetEnvironmentVariable(L"TEMP", tszTempDir, MAX_PATH)) return; - CMString tszHTMLPath(FORMAT, _T("%s\\miranda_captcha.html"), tszTempDir); + CMString tszHTMLPath(FORMAT, L"%s\\miranda_captcha.html", tszTempDir); - FILE *pFile = _tfopen(tszHTMLPath, _T("w")); + FILE *pFile = _tfopen(tszHTMLPath, L"w"); if (pFile == NULL) return; @@ -1417,6 +1417,6 @@ void CVkProto::ShowCaptchaInBrowser(HBITMAP hBitmap) fwrite(szHTML, 1, szHTML.GetLength(), pFile); fclose(pFile); - tszHTMLPath = _T("file://") + tszHTMLPath; + tszHTMLPath = L"file://" + tszHTMLPath; Utils_OpenUrlT(tszHTMLPath); } \ No newline at end of file diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp index be383afcc9..38cb5d7057 100644 --- a/protocols/VKontakte/src/vk_avatars.cpp +++ b/protocols/VKontakte/src/vk_avatars.cpp @@ -27,7 +27,7 @@ void CVkProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) GetAvatarFileName(param->hContact, ai.filename, _countof(ai.filename)); ai.format = ProtoGetBufferFormat(reply->pData); - FILE *out = _tfopen(ai.filename, _T("wb")); + FILE *out = _tfopen(ai.filename, L"wb"); if (out == NULL) { ProtoBroadcastAck(param->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, &ai); delete param; @@ -130,7 +130,7 @@ INT_PTR CVkProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam) void CVkProto::GetAvatarFileName(MCONTACT hContact, TCHAR *pszDest, size_t cbLen) { - int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName); + int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName); DWORD dwAttributes = GetFileAttributes(pszDest); if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) @@ -138,7 +138,7 @@ void CVkProto::GetAvatarFileName(MCONTACT hContact, TCHAR *pszDest, size_t cbLen pszDest[tPathLen++] = '\\'; - const TCHAR *szFileType = _T(".jpg"); + const TCHAR *szFileType = L".jpg"; ptrT szUrl(getTStringA(hContact, "AvatarUrl")); if (szUrl) { TCHAR *p = _tcsrchr(szUrl, '.'); @@ -147,7 +147,7 @@ void CVkProto::GetAvatarFileName(MCONTACT hContact, TCHAR *pszDest, size_t cbLen } LONG id = getDword(hContact, "ID", -1); - mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%d%s"), id, szFileType); + mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%d%s", id, szFileType); } void CVkProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl) diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 41eeceb7eb..d931c85be0 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -30,7 +30,7 @@ extern JSONNode nullNode; CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg) { - debugLog(_T("CVkProto::AppendChat")); + debugLog(L"CVkProto::AppendChat"); if (id == 0) return NULL; @@ -46,11 +46,11 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg) c = new CVkChatInfo(id); if (jnDlg) { tszTitle = jnDlg["title"].as_mstring(); - c->m_tszTopic = mir_tstrdup(!tszTitle.IsEmpty() ? tszTitle : _T("")); + c->m_tszTopic = mir_tstrdup(!tszTitle.IsEmpty() ? tszTitle : L""); } CMString sid; - sid.Format(_T("%S_%d"), m_szModuleName, id); + sid.Format(L"%S_%d", m_szModuleName, id); c->m_tszId = mir_tstrdup(sid); GCSESSION gcw = { sizeof(gcw) }; @@ -79,7 +79,7 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg) setDword(gci.hContact, "vk_chat_id", id); - CMString tszHomepage(FORMAT, _T("https://vk.com/im?sel=c%d"), id); + CMString tszHomepage(FORMAT, L"https://vk.com/im?sel=c%d", id); setTString(gci.hContact, "Homepage", tszHomepage); db_unset(gci.hContact, m_szModuleName, "off"); @@ -187,7 +187,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (tszNick.IsEmpty()) { CMString fName(jnUser["first_name"].as_mstring()); CMString lName(jnUser["last_name"].as_mstring()); - tszNick = fName.Trim() + _T(" ") + lName.Trim(); + tszNick = fName.Trim() + L" " + lName.Trim(); } cu->m_tszNick = mir_tstrdup(tszNick); cu->m_bUnknown = false; @@ -217,7 +217,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe gce.ptszUID = tszId; gce.dwFlags = GCEF_REMOVECONTACT | GCEF_NOTNOTIFY; gce.time = time(NULL); - gce.ptszNick = mir_tstrdup(CMString(FORMAT, _T("%s (https://vk.com/id%s)"), cu.m_tszNick, tszId)); + gce.ptszNick = mir_tstrdup(CMString(FORMAT, L"%s (https://vk.com/id%s)", cu.m_tszNick, tszId)); CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce); cc->m_users.remove(i); @@ -268,7 +268,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe void CVkProto::SetChatTitle(CVkChatInfo *cc, LPCTSTR tszTopic) { - debugLog(_T("CVkProto::SetChatTitle")); + debugLog(L"CVkProto::SetChatTitle"); if (!cc) return; @@ -308,7 +308,7 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, const JSONNode & if (jnFwdMessages) { CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, bbcNo); if (!tszBody.IsEmpty()) - tszFwdMessages = _T("\n") + tszFwdMessages; + tszFwdMessages = L"\n" + tszFwdMessages; tszBody += tszFwdMessages; } @@ -316,7 +316,7 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, const JSONNode & if (jnAttachments) { CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, bbcNo); if (!tszBody.IsEmpty()) - tszAttachmentDescr = _T("\n") + tszAttachmentDescr; + tszAttachmentDescr = L"\n" + tszAttachmentDescr; tszBody += tszAttachmentDescr; } @@ -324,75 +324,75 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, const JSONNode & bIsAction = true; CMString tszAction = jnMsg["action"].as_mstring(); - if (tszAction == _T("chat_create")) { + if (tszAction == L"chat_create") { CMString tszActionText = jnMsg["action_text"].as_mstring(); - tszBody.AppendFormat(_T("%s \"%s\""), TranslateT("create chat"), tszActionText.IsEmpty() ? _T(" ") : tszActionText); + tszBody.AppendFormat(L"%s \"%s\"", TranslateT("create chat"), tszActionText.IsEmpty() ? L" " : tszActionText); } - else if (tszAction == _T("chat_kick_user")) { + else if (tszAction == L"chat_kick_user") { CMString tszActionMid = jnMsg["action_mid"].as_mstring(); if (tszActionMid.IsEmpty()) tszBody = TranslateT("kick user"); else { - CMString tszUid(FORMAT, _T("%d"), uid); + CMString tszUid(FORMAT, L"%d", uid); if (tszUid == tszActionMid) { if (cc->m_bHistoryRead) return; - tszBody.AppendFormat(_T(" (https://vk.com/id%s) %s"), tszUid, TranslateT("left chat")); + tszBody.AppendFormat(L" (https://vk.com/id%s) %s", tszUid, TranslateT("left chat")); } else { int a_uid = 0; - int iReadCount = _stscanf(tszActionMid, _T("%d"), &a_uid); + int iReadCount = _stscanf(tszActionMid, L"%d", &a_uid); if (iReadCount == 1) { CVkChatUser *cu = cc->m_users.find((CVkChatUser*)&a_uid); if (cu == NULL) - tszBody.AppendFormat(_T("%s (https://vk.com/id%d)"), TranslateT("kick user"), a_uid); + tszBody.AppendFormat(L"%s (https://vk.com/id%d)", TranslateT("kick user"), a_uid); else - tszBody.AppendFormat(_T("%s %s (https://vk.com/id%d)"), TranslateT("kick user"), cu->m_tszNick, a_uid); + tszBody.AppendFormat(L"%s %s (https://vk.com/id%d)", TranslateT("kick user"), cu->m_tszNick, a_uid); } else tszBody = TranslateT("kick user"); } } } - else if (tszAction == _T("chat_invite_user")) { + else if (tszAction == L"chat_invite_user") { CMString tszActionMid = jnMsg["action_mid"].as_mstring(); if (tszActionMid.IsEmpty()) tszBody = TranslateT("invite user"); else { - CMString tszUid(FORMAT, _T("%d"), uid); + CMString tszUid(FORMAT, L"%d", uid); if (tszUid == tszActionMid) - tszBody.AppendFormat(_T(" (https://vk.com/id%s) %s"), tszUid, TranslateT("returned to chat")); + tszBody.AppendFormat(L" (https://vk.com/id%s) %s", tszUid, TranslateT("returned to chat")); else { int a_uid = 0; - int iReadCount = _stscanf(tszActionMid, _T("%d"), &a_uid); + int iReadCount = _stscanf(tszActionMid, L"%d", &a_uid); if (iReadCount == 1) { CVkChatUser *cu = cc->m_users.find((CVkChatUser*)&a_uid); if (cu == NULL) - tszBody.AppendFormat(_T("%s (https://vk.com/id%d)"), TranslateT("invite user"), a_uid); + tszBody.AppendFormat(L"%s (https://vk.com/id%d)", TranslateT("invite user"), a_uid); else - tszBody.AppendFormat(_T("%s %s (https://vk.com/id%d)"), TranslateT("invite user"), cu->m_tszNick, a_uid); + tszBody.AppendFormat(L"%s %s (https://vk.com/id%d)", TranslateT("invite user"), cu->m_tszNick, a_uid); } else tszBody = TranslateT("invite user"); } } } - else if (tszAction == _T("chat_title_update")) { + else if (tszAction == L"chat_title_update") { CMString tszTitle = jnMsg["action_text"].as_mstring(); - tszBody.AppendFormat(_T("%s \"%s\""), TranslateT("change chat title to"), tszTitle.IsEmpty() ? _T(" ") : tszTitle); + tszBody.AppendFormat(L"%s \"%s\"", TranslateT("change chat title to"), tszTitle.IsEmpty() ? L" " : tszTitle); if (!bIsHistory) SetChatTitle(cc, tszTitle); } - else if (tszAction == _T("chat_photo_update")) + else if (tszAction == L"chat_photo_update") tszBody.Replace(TranslateT("Attachments:"), TranslateT("changed chat cover:")); - else if (tszAction == _T("chat_photo_remove")) + else if (tszAction == L"chat_photo_remove") tszBody = TranslateT("deleted chat cover"); else - tszBody.AppendFormat(_T(": %s (%s)"), TranslateT("chat action not supported"), tszAction); + tszBody.AppendFormat(L": %s (%s)", TranslateT("chat action not supported"), tszAction); } - tszBody.Replace(_T("%"), _T("%%")); + tszBody.Replace(L"%", L"%%"); if (cc->m_bHistoryRead) { if (jnMsg["title"]) @@ -434,7 +434,7 @@ void CVkProto::AppendChatMessage(CVkChatInfo *cc, int uid, int msgTime, LPCTSTR gce.time = msgTime; gce.dwFlags = (bIsHistory) ? GCEF_NOTNOTIFY : GCEF_ADDTOLOG; gce.ptszNick = cu->m_tszNick ? mir_tstrdup(cu->m_tszNick) : mir_tstrdup(hContact ? ptrT(db_get_tsa(hContact, m_szModuleName, "Nick")) : TranslateT("Unknown")); - gce.ptszText = IsEmpty((TCHAR *)ptszBody) ? mir_tstrdup(_T("...")) : mir_tstrdup(ptszBody); + gce.ptszText = IsEmpty((TCHAR *)ptszBody) ? mir_tstrdup(L"...") : mir_tstrdup(ptszBody); CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce); StopChatContactTyping(cc->m_chatid, uid); } @@ -782,7 +782,7 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch) case IDM_VISIT_PROFILE: hContact = FindUser(cu->m_uid); if (hContact == NULL) - Utils_OpenUrlT(CMString(FORMAT, _T("https://vk.com/id%d"), cu->m_uid)); + Utils_OpenUrlT(CMString(FORMAT, L"https://vk.com/id%d", cu->m_uid)); else SvcVisitProfile(hContact, 0); break; @@ -933,7 +933,7 @@ void CVkProto::StopChatContactTyping(int iChatId, int iUserId) StatusTextData st = { 0 }; st.cbSize = sizeof(st); - mir_sntprintf(st.tszText, _T(" ")); + mir_sntprintf(st.tszText, L" "); // CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, NULL) clears statusbar very slowly. // (1-10 sec(!!!) for me on tabSRMM O_o) @@ -963,7 +963,7 @@ void CVkProto::CreateNewChat(LPCSTR uids, LPCTSTR ptszTitle) if (!IsOnline()) return; Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.createChat.json", true, &CVkProto::OnCreateNewChat) - << TCHAR_PARAM("title", ptszTitle ? ptszTitle : _T("")) + << TCHAR_PARAM("title", ptszTitle ? ptszTitle : L"") << CHAR_PARAM("user_ids", uids)); } diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp index 21fe217e6d..9e6ba15815 100644 --- a/protocols/VKontakte/src/vk_dialogs.cpp +++ b/protocols/VKontakte/src/vk_dialogs.cpp @@ -120,7 +120,7 @@ void CVkWallPostForm::OnInitDialog() { Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_WALL)); - CMString tszTitle(FORMAT, _T("%s %s"), TranslateT("Wall message for"), m_param->ptszNick); + CMString tszTitle(FORMAT, L"%s %s", TranslateT("Wall message for"), m_param->ptszNick); SetCaption(tszTitle); m_btnShare.Disable(); diff --git a/protocols/VKontakte/src/vk_feed.cpp b/protocols/VKontakte/src/vk_feed.cpp index 4ed9786164..2bc441d403 100644 --- a/protocols/VKontakte/src/vk_feed.cpp +++ b/protocols/VKontakte/src/vk_feed.cpp @@ -32,12 +32,12 @@ void CVkProto::AddFeedSpecialUser() hContact = FindUser(VK_FEED_USER, true); setTString(hContact, "Nick", TranslateT("VKontakte")); - CMString tszUrl = _T("https://vk.com/press/Simple.png"); + CMString tszUrl = L"https://vk.com/press/Simple.png"; SetAvatarUrl(hContact, tszUrl); ReloadAvatarInfo(hContact); - setTString(hContact, "domain", _T("feed")); - setTString(hContact, "Homepage", _T("https://vk.com/feed")); + setTString(hContact, "domain", L"feed"); + setTString(hContact, "Homepage", L"https://vk.com/feed"); } if (getWord(hContact, "Status") != ID_STATUS_ONLINE) @@ -103,10 +103,10 @@ CVkUserInfo* CVkProto::GetVkUserInfo(LONG iUserId, OBJLIST<CVkUserInfo> &vkUsers if (vkUser == NULL) { CMString tszNick = TranslateT("Unknown"); - CMString tszLink(_T("https://vk.com/")); + CMString tszLink(L"https://vk.com/"); if (iUserId) { tszLink += bIsGroup ? "club" : "id"; - tszLink.AppendFormat(_T("%d"), bIsGroup ? -iUserId : iUserId); + tszLink.AppendFormat(L"%d", bIsGroup ? -iUserId : iUserId); } vkUser = new CVkUserInfo(iUserId, bIsGroup, tszNick, tszLink, bIsGroup ? NULL : FindUser(iUserId)); vkUsers.insert(vkUser); @@ -133,10 +133,10 @@ void CVkProto::CreateVkUserInfoList(OBJLIST<CVkUserInfo> &vkUsers, const JSONNod CMString tszNick(jnProfile["first_name"].as_mstring()); tszNick.AppendChar(' '); tszNick += jnProfile["last_name"].as_mstring(); - CMString tszLink = _T("https://vk.com/"); + CMString tszLink = L"https://vk.com/"; CMString tszScreenName(jnProfile["screen_name"].as_mstring()); if (tszScreenName.IsEmpty()) - tszScreenName.AppendFormat(_T("id%d"), UserId); + tszScreenName.AppendFormat(L"id%d", UserId); tszLink += tszScreenName; CVkUserInfo *vkUser = new CVkUserInfo(UserId, false, tszNick, tszLink, FindUser(UserId)); vkUsers.insert(vkUser); @@ -151,7 +151,7 @@ void CVkProto::CreateVkUserInfoList(OBJLIST<CVkUserInfo> &vkUsers, const JSONNod LONG UserId = - jnProfile["id"].as_int(); CMString tszNick(jnProfile["name"].as_mstring()); - CMString tszLink = _T("https://vk.com/"); + CMString tszLink = L"https://vk.com/"; tszLink += jnProfile["screen_name"].as_mstring(); CVkUserInfo *vkUser = new CVkUserInfo(UserId, true, tszNick, tszLink); vkUsers.insert(vkUser); @@ -178,11 +178,11 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo vkNewsItem->tDate = jnItem["date"].as_int(); if (!tszText.IsEmpty()) - tszText += _T("\n"); + tszText += L"\n"; - debugLog(_T("CVkProto::GetVkNewsItem %d %d %s"), iSourceId, iPostId, vkNewsItem->tszType); + debugLog(L"CVkProto::GetVkNewsItem %d %d %s", iSourceId, iPostId, vkNewsItem->tszType); - if (vkNewsItem->tszType == _T("photo_tag")) { + if (vkNewsItem->tszType == L"photo_tag") { bPostLink = false; const JSONNode &jnPhotos = jnItem["photo_tags"]; if (jnPhotos) { @@ -191,11 +191,11 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo tszText = TranslateT("User was tagged in these photos:"); tszPopupText = tszText + TranslateT("(photos)"); for (auto it = jnPhotoItems.begin(); it != jnPhotoItems.end(); ++it) - tszText += _T("\n") + GetVkPhotoItem((*it), m_vkOptions.BBCForNews()); + tszText += L"\n" + GetVkPhotoItem((*it), m_vkOptions.BBCForNews()); } } } - else if (vkNewsItem->tszType == _T("photo") || vkNewsItem->tszType == _T("wall_photo")) { + else if (vkNewsItem->tszType == L"photo" || vkNewsItem->tszType == L"wall_photo") { bPostLink = false; const JSONNode &jnPhotos = jnItem["photos"]; int i = 0; @@ -205,8 +205,8 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo tszPopupText += TranslateT("(photos)"); for (auto it = jnPhotoItems.begin(); it != jnPhotoItems.end(); ++it) { const JSONNode &jnPhotoItem = (*it); - tszText += GetVkPhotoItem(jnPhotoItem, m_vkOptions.BBCForNews()) + _T("\n"); - if (i == 0 && vkNewsItem->tszType == _T("wall_photo")) { + tszText += GetVkPhotoItem(jnPhotoItem, m_vkOptions.BBCForNews()) + L"\n"; + if (i == 0 && vkNewsItem->tszType == L"wall_photo") { if (jnPhotoItem["post_id"]) { bPostLink = true; iPostId = jnPhotoItem["post_id"].as_int(); @@ -218,18 +218,18 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo } } } - else if (vkNewsItem->tszType == _T("post") || vkNewsItem->tszType.IsEmpty()) { + else if (vkNewsItem->tszType == L"post" || vkNewsItem->tszType.IsEmpty()) { bPostLink = true; const JSONNode &jnRepost = jnItem["copy_history"]; if (jnRepost) { CVKNewsItem *vkRepost = GetVkNewsItem((*jnRepost.begin()), vkUsers, true); - vkRepost->tszText.Replace(_T("\n"), _T("\n\t")); + vkRepost->tszText.Replace(L"\n", L"\n\t"); tszText += vkRepost->tszText; - tszText += _T("\n"); + tszText += L"\n"; - tszPopupText += _T("\t"); + tszPopupText += L"\t"; tszPopupText += vkRepost->tszPopupTitle; - tszPopupText += _T("\n\t"); + tszPopupText += L"\n\t"; tszPopupText += vkRepost->tszPopupText; vkNewsItem->bIsRepost = true; delete vkRepost; @@ -264,14 +264,14 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo vkNewsItem->tszPopupTitle.AppendFormat(tszTitleFormat, vkNewsItem->vkUser->m_tszUserNick); vkNewsItem->tszPopupText = tszPopupText; - vkNewsItem->tszId.AppendFormat(_T("%d_%d"), vkNewsItem->vkUser->m_UserId, iPostId); + vkNewsItem->tszId.AppendFormat(L"%d_%d", vkNewsItem->vkUser->m_UserId, iPostId); if (bPostLink) { - vkNewsItem->tszLink = CMString(_T("https://vk.com/wall")) + vkNewsItem->tszId; + vkNewsItem->tszLink = CMString(L"https://vk.com/wall") + vkNewsItem->tszId; vkNewsItem->tszText.AppendChar(_T('\n')); vkNewsItem->tszText += SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNewsItem->tszLink); } - debugLog(_T("CVkProto::GetVkNewsItem %d %d <\n%s\n>"), iSourceId, iPostId, vkNewsItem->tszText); + debugLog(L"CVkProto::GetVkNewsItem %d %d <\n%s\n>", iSourceId, iPostId, vkNewsItem->tszText); return vkNewsItem; } @@ -290,11 +290,11 @@ CMString CVkProto::GetVkFeedback(const JSONNode &jnFeedback, VKObjType vkFeedbac if (vkFeedbackType == vkComment) { iUserId = jnFeedback["from_id"].as_int(); - tszFormat = _T("%s %%s %%s\n%s"); + tszFormat = L"%s %%s %%s\n%s"; } else if (vkFeedbackType == vkPost) { iUserId = jnFeedback["owner_id"].as_int(); - tszFormat = _T("%s %%s %%s\n%s"); + tszFormat = L"%s %%s %%s\n%s"; } else if (vkFeedbackType == VKObjType::vkUsers || vkFeedbackType == vkCopy) { const JSONNode &jnUsers = jnFeedback["items"]; @@ -307,10 +307,10 @@ CMString CVkProto::GetVkFeedback(const JSONNode &jnFeedback, VKObjType vkFeedbac iUserId = jnUserItem["from_id"].as_int(); vkUser = GetVkUserInfo(iUserId, vkUsers); if (!tszUsers.IsEmpty()) - tszUsers += _T(", "); + tszUsers += L", "; tszUsers += SetBBCString(vkUser->m_tszUserNick, m_vkOptions.BBCForNews(), vkbbcUrl, vkUser->m_tszLink); } - tszRes.AppendFormat(_T("%s %%s %%s"), tszUsers); + tszRes.AppendFormat(L"%s %%s %%s", tszUsers); vkUser = NULL; iUserId = 0; } @@ -318,7 +318,7 @@ CMString CVkProto::GetVkFeedback(const JSONNode &jnFeedback, VKObjType vkFeedbac if (iUserId) { vkUser = GetVkUserInfo(iUserId, vkUsers); CMString tszText(jnFeedback["text"].as_mstring()); - tszText.Replace(_T("%"), _T("%%")); + tszText.Replace(L"%", L"%%"); tszRes.AppendFormat(tszFormat, SetBBCString(vkUser->m_tszUserNick, m_vkOptions.BBCForNews(), vkbbcUrl, vkUser->m_tszLink), ClearFormatNick(tszText)); } @@ -338,84 +338,84 @@ CVKNewsItem* CVkProto::GetVkParent(const JSONNode &jnParent, VKObjType vkParentT CMString tszPhoto = GetVkPhotoItem(jnParent, m_vkOptions.BBCForNews()); LONG iOwnerId = jnParent["owner_id"].as_int(); LONG iId = jnParent["id"].as_int(); - vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iOwnerId, iId); - vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/photo%s"), vkNotificationItem->tszId); - vkNotificationItem->tszText.AppendFormat(_T("\n%s"), tszPhoto); + vkNotificationItem->tszId.AppendFormat(L"%d_%d", iOwnerId, iId); + vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/photo%s", vkNotificationItem->tszId); + vkNotificationItem->tszText.AppendFormat(L"\n%s", tszPhoto); if (ptszReplyText) { - vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI)); - vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText); + vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI)); + vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText); } - vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink)); + vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink)); } else if (vkParentType == vkVideo) { LONG iOwnerId = jnParent["owner_id"].as_int(); LONG iId = jnParent["id"].as_int(); CMString tszTitle(jnParent["title"].as_mstring()); - vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iOwnerId, iId); - vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/video%s"), vkNotificationItem->tszId); + vkNotificationItem->tszId.AppendFormat(L"%d_%d", iOwnerId, iId); + vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/video%s", vkNotificationItem->tszId); CMString tszText(jnParent["text"].as_mstring()); ClearFormatNick(tszText); if (!tszText.IsEmpty()) - vkNotificationItem->tszText.AppendFormat(_T("\n%s: %s"), SetBBCString(TranslateT("Video description:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI)); + vkNotificationItem->tszText.AppendFormat(L"\n%s: %s", SetBBCString(TranslateT("Video description:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI)); if (ptszReplyText) { - vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI)); - vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText); + vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI)); + vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText); } - vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink)); + vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink)); } else if (vkParentType == vkPost) { LONG iToId = jnParent["to_id"].as_int(); LONG iId = jnParent["id"].as_int(); - vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iToId, iId); - vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/wall%s%s"), vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : _T("")); + vkNotificationItem->tszId.AppendFormat(L"%d_%d", iToId, iId); + vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/wall%s%s", vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : L""); CMString tszText(jnParent["text"].as_mstring()); ClearFormatNick(tszText); if (!tszText.IsEmpty()) { - vkNotificationItem->tszText.AppendFormat(_T("\n%s: %s"), SetBBCString(TranslateT("Post text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI)); - vkNotificationItem->tszPopupText.AppendFormat(_T("%s: %s"), TranslateT("Post text:"), tszText); + vkNotificationItem->tszText.AppendFormat(L"\n%s: %s", SetBBCString(TranslateT("Post text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI)); + vkNotificationItem->tszPopupText.AppendFormat(L"%s: %s", TranslateT("Post text:"), tszText); } if (ptszReplyText) { - vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI)); + vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI)); if (!vkNotificationItem->tszPopupText.IsEmpty()) - vkNotificationItem->tszPopupText += _T("\n"); - vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText); + vkNotificationItem->tszPopupText += L"\n"; + vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText); } - vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink)); + vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink)); } else if (vkParentType == vkTopic) { LONG iOwnerId = jnParent["owner_id"].as_int(); LONG iId = jnParent["id"].as_int(); CMString tszTitle(jnParent["title"].as_mstring()); - vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iOwnerId, iId); - vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/topic%s%s"), - vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : _T("")); + vkNotificationItem->tszId.AppendFormat(L"%d_%d", iOwnerId, iId); + vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/topic%s%s", + vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : L""); CMString tszText(jnParent["text"].as_mstring()); ClearFormatNick(tszText); if (!tszText.IsEmpty()) { - vkNotificationItem->tszText.AppendFormat(_T("\n%s %s"), SetBBCString(TranslateT("Topic text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI)); - vkNotificationItem->tszPopupText.AppendFormat(_T("%s %s"), TranslateT("Topic text:"), tszText); + vkNotificationItem->tszText.AppendFormat(L"\n%s %s", SetBBCString(TranslateT("Topic text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI)); + vkNotificationItem->tszPopupText.AppendFormat(L"%s %s", TranslateT("Topic text:"), tszText); } if (ptszReplyText) { - vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI)); + vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI)); if (!vkNotificationItem->tszPopupText.IsEmpty()) - vkNotificationItem->tszPopupText += _T("\n"); - vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText); + vkNotificationItem->tszPopupText += L"\n"; + vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText); } - vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink)); + vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink)); } else if (vkParentType == vkComment) { CMString tszText(jnParent["text"].as_mstring()); @@ -437,14 +437,14 @@ CVKNewsItem* CVkProto::GetVkParent(const JSONNode &jnParent, VKObjType vkParentT const JSONNode &jnPost = jnParent["post"]; if (jnPost) { - CMString tszRepl(FORMAT, _T("?reply=%d"), iId); + CMString tszRepl(FORMAT, L"?reply=%d", iId); delete vkNotificationItem; return GetVkParent(jnPost, vkPost, tszText, tszRepl); } const JSONNode &jnTopic = jnParent["topic"]; if (jnTopic) { - CMString tszRepl(FORMAT, _T("?reply=%d"), iId); + CMString tszRepl(FORMAT, L"?reply=%d", iId); delete vkNotificationItem; return GetVkParent(jnTopic, vkTopic, tszText, tszRepl); } @@ -466,7 +466,7 @@ CVKNewsItem* CVkProto::GetVkNotificationsItem(const JSONNode &jnItem, OBJLIST<CV const JSONNode &jnFeedback = jnItem["feedback"]; const JSONNode &jnParent = jnItem["parent"]; - if (m_vkOptions.bNotificationFilterAcceptedFriends && tszType == _T("friend_accepted") && jnFeedback && vkFeedbackType == VKObjType::vkUsers) { + if (m_vkOptions.bNotificationFilterAcceptedFriends && tszType == L"friend_accepted" && jnFeedback && vkFeedbackType == VKObjType::vkUsers) { OnFriendAccepted(jnFeedback); return NULL; } @@ -487,12 +487,12 @@ CVKNewsItem* CVkProto::GetVkNotificationsItem(const JSONNode &jnItem, OBJLIST<CV vkNotification->tszText = tszNotificaton; tszFeedback = RemoveBBC(tszFeedback); - int idx = tszFeedback.Find(_T(" %s %s")); + int idx = tszFeedback.Find(L" %s %s"); - vkNotification->tszPopupTitle.AppendFormat(_T("%s %s"), tszFeedback.Mid(0, idx), tszNotificationTranslate); + vkNotification->tszPopupTitle.AppendFormat(L"%s %s", tszFeedback.Mid(0, idx), tszNotificationTranslate); if (tszFeedback.GetLength() > idx + 7) { if (!vkNotification->tszPopupText.IsEmpty()) - vkNotification->tszPopupText += _T("\n>> "); + vkNotification->tszPopupText += L"\n>> "; vkNotification->tszPopupText += tszFeedback.Mid(idx + 7, tszFeedback.GetLength() - idx - 7); } @@ -540,7 +540,7 @@ CVKNewsItem* CVkProto::GetVkGroupInvates(const JSONNode &jnItem, OBJLIST<CVkUser return NULL; LONG iGroupId = jnItem["id"].as_int(); - CMString tszId(FORMAT, _T("%d,"), iGroupId); + CMString tszId(FORMAT, L"%d,", iGroupId); CMString tszIds(ptrT(db_get_tsa(NULL, m_szModuleName, "InviteGroupIds"))); if (tszIds.Find(tszId, 0) != -1) @@ -557,13 +557,13 @@ CVKNewsItem* CVkProto::GetVkGroupInvates(const JSONNode &jnItem, OBJLIST<CVkUser CMString tszGroupName; CMString tszGName = jnItem["name"].as_mstring(); - CMString tszGLink(FORMAT, _T("https://vk.com/%s"), jnItem["screen_name"].as_mstring()); + CMString tszGLink(FORMAT, L"https://vk.com/%s", jnItem["screen_name"].as_mstring()); tszGroupName = SetBBCString(tszGName, m_vkOptions.BBCForNews(), vkbbcUrl, tszGLink); - CMString tszUsers = SetBBCString(iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), m_vkOptions.BBCForNews(), vkbbcUrl, iUserId ? vkNotification->vkUser->m_tszLink : _T("https://vk.com/")); + CMString tszUsers = SetBBCString(iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), m_vkOptions.BBCForNews(), vkbbcUrl, iUserId ? vkNotification->vkUser->m_tszLink : L"https://vk.com/"); - vkNotification->tszText.AppendFormat(_T("%s %s %s"), tszUsers, tszNotificationTranslate, tszGroupName); - vkNotification->tszPopupTitle.AppendFormat(_T("%s %s %s"), iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), tszNotificationTranslate, tszGName); + vkNotification->tszText.AppendFormat(L"%s %s %s", tszUsers, tszNotificationTranslate, tszGroupName); + vkNotification->tszPopupTitle.AppendFormat(L"%s %s %s", iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), tszNotificationTranslate, tszGName); tszIds += tszId; setTString("InviteGroupIds", tszIds); @@ -672,7 +672,7 @@ void CVkProto::OnReceiveUnreadNews(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *p CVKNewsItem *vkNewsFoundItem = vkNews.find(vkNewsItem); if (vkNewsFoundItem == NULL) vkNews.insert(vkNewsItem); - else if (vkNewsFoundItem->tszType == _T("wall_photo") && vkNewsItem->tszType == _T("post")) { + else if (vkNewsFoundItem->tszType == L"wall_photo" && vkNewsItem->tszType == L"post") { vkNews.remove(vkNewsFoundItem); vkNews.insert(vkNewsItem); } @@ -708,9 +708,9 @@ void CVkProto::RetrieveUnreadNotifications(time_t tLastNotificationsTime) if (time(NULL) - tLastNotificationsReqTime < 3 * 60) return; - CMString code(FORMAT, _T("return{\"notifications\":API.notifications.get({\"count\": 100, \"start_time\":%d})%s"), + CMString code(FORMAT, L"return{\"notifications\":API.notifications.get({\"count\": 100, \"start_time\":%d})%s", (LONG)(tLastNotificationsTime + 1), - m_vkOptions.bNotificationFilterInvites ? _T(",\"groupinvates\":API.groups.getInvites({\"extended\":1})};") : _T("};")); + m_vkOptions.bNotificationFilterInvites ? L",\"groupinvates\":API.groups.getInvites({\"extended\":1})};" : L"};"); Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/execute.json", true, &CVkProto::OnReceiveUnreadNotifications) << TCHAR_PARAM("code", code) ); @@ -724,9 +724,9 @@ bool CVkProto::FilterNotification(CVKNewsItem* vkNotificationItem, bool& isComme if (vkNotificationItem->vkParentType == vkNull) return false; - if (vkNotificationItem->tszType == _T("mention_comments") - || vkNotificationItem->tszType == _T("mention_comment_photo") - || vkNotificationItem->tszType == _T("mention_comment_video")) { + if (vkNotificationItem->tszType == L"mention_comments" + || vkNotificationItem->tszType == L"mention_comment_photo" + || vkNotificationItem->tszType == L"mention_comment_video") { isCommented = true; return (m_vkOptions.bNotificationFilterMentions != 0); } diff --git a/protocols/VKontakte/src/vk_files.cpp b/protocols/VKontakte/src/vk_files.cpp index 3e8d78ae2a..cb1e0bc607 100644 --- a/protocols/VKontakte/src/vk_files.cpp +++ b/protocols/VKontakte/src/vk_files.cpp @@ -89,7 +89,7 @@ void CVkProto::SendFileFiled(CVkFileUploadParam *fup, int ErrorCode) tszError = TranslateT("Unknown error occurred"); } ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, ErrorCode== VKERR_AUDIO_DEL_COPYRIGHT ? ACKRESULT_DENIED : ACKRESULT_FAILED, (HANDLE)fup); - debugLog(_T("CVkProto::SendFileFiled error code = %d (%s)"), ErrorCode, tszError); + debugLog(L"CVkProto::SendFileFiled error code = %d (%s)", ErrorCode, tszError); MsgPopup(NULL, tszError, TranslateT("File upload error"), true); delete fup; } @@ -97,7 +97,7 @@ void CVkProto::SendFileFiled(CVkFileUploadParam *fup, int ErrorCode) void CVkProto::SendFileThread(void *p) { CVkFileUploadParam *fup = (CVkFileUploadParam *)p; - debugLog(_T("CVkProto::SendFileThread %d %s"), fup->GetType(), fup->fileName()); + debugLog(L"CVkProto::SendFileThread %d %s", fup->GetType(), fup->fileName()); if (!IsOnline()) { SendFileFiled(fup, VKERR_OFFLINE); return; @@ -155,7 +155,7 @@ void CVkProto::OnReciveUploadServer(NETLIBHTTPREQUEST *reply, AsyncHttpRequest * return; } - FILE *pFile = _tfopen(fup->FileName, _T("rb")); + FILE *pFile = _tfopen(fup->FileName, L"rb"); if (pFile == NULL) { SendFileFiled(fup, VKERR_ERR_OPEN_FILE); return; @@ -263,7 +263,7 @@ void CVkProto::OnReciveUpload(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) switch (fup->GetType()) { case CVkFileUploadParam::typeImg: upload = jnRoot["photo"].as_mstring(); - if (upload == _T("[]")) { + if (upload == L"[]") { SendFileFiled(fup, VKERR_INVALID_PARAMETERS); return; } @@ -274,7 +274,7 @@ void CVkProto::OnReciveUpload(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) break; case CVkFileUploadParam::typeAudio: upload = jnRoot["audio"].as_mstring(); - if (upload == _T("[]")) { + if (upload == L"[]") { SendFileFiled(fup, VKERR_INVALID_PARAMETERS); return; } @@ -334,13 +334,13 @@ void CVkProto::OnReciveUploadFile(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pR switch (fup->GetType()) { case CVkFileUploadParam::typeImg: - Attachment.AppendFormat(_T("photo%d_%d"), owner_id, id); + Attachment.AppendFormat(L"photo%d_%d", owner_id, id); break; case CVkFileUploadParam::typeAudio: - Attachment.AppendFormat(_T("audio%d_%d"), owner_id, id); + Attachment.AppendFormat(L"audio%d_%d", owner_id, id); break; case CVkFileUploadParam::typeDoc: - Attachment.AppendFormat(_T("doc%d_%d"), owner_id, id); + Attachment.AppendFormat(L"doc%d_%d", owner_id, id); break; default: SendFileFiled(fup, VKERR_FTYPE_NOT_SUPPORTED); diff --git a/protocols/VKontakte/src/vk_history.cpp b/protocols/VKontakte/src/vk_history.cpp index 505b20ca54..ec6ed4100e 100644 --- a/protocols/VKontakte/src/vk_history.cpp +++ b/protocols/VKontakte/src/vk_history.cpp @@ -168,7 +168,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque mir_cslock lck(m_csLoadHistoryTask); if (m_iLoadHistoryTask > 0) m_iLoadHistoryTask--; - debugLog(_T("CVkProto::OnReceiveHistoryMessages error m_iLoadHistoryTask=%d"), m_iLoadHistoryTask); + debugLog(L"CVkProto::OnReceiveHistoryMessages error m_iLoadHistoryTask=%d", m_iLoadHistoryTask); MsgPopup(NULL, TranslateT("Error loading message history from server"), TranslateT("Error"), true); if (m_iLoadHistoryTask == 0 && m_bNotifyForEndLoadingHistoryAllContact) { @@ -189,10 +189,10 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque m_iLoadHistoryTask--; ptrT ptszNick(db_get_tsa(param->hContact, m_szModuleName, "Nick")); - CMString str(FORMAT, _T("%s %s %s"), TranslateT("Error loading message history from server"), TranslateT("for"), ptszNick); + CMString str(FORMAT, L"%s %s %s", TranslateT("Error loading message history from server"), TranslateT("for"), ptszNick); MsgPopup(param->hContact, str, TranslateT("Error"), true); - debugLog(_T("CVkProto::OnReceiveHistoryMessages error for %s m_iLoadHistoryTask=%d"), ptszNick, m_iLoadHistoryTask); + debugLog(L"CVkProto::OnReceiveHistoryMessages error for %s m_iLoadHistoryTask=%d", ptszNick, m_iLoadHistoryTask); if (m_iLoadHistoryTask == 0 && m_bNotifyForEndLoadingHistoryAllContact) { MsgPopup(NULL, TranslateT("Loading messages for all contacts is completed"), TranslateT("Loading history")); @@ -233,7 +233,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque if (jnFwdMessages) { CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, m_vkOptions.BBCForAttachments()); if (!tszBody.IsEmpty()) - tszFwdMessages = _T("\n") + tszFwdMessages; + tszFwdMessages = L"\n" + tszFwdMessages; tszBody += tszFwdMessages; } @@ -241,7 +241,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque if (jnAttachments) { CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, m_vkOptions.BBCForAttachments()); if (!tszBody.IsEmpty()) - tszAttachmentDescr = _T("\n") + tszAttachmentDescr; + tszAttachmentDescr = L"\n" + tszAttachmentDescr; tszBody += tszAttachmentDescr; } @@ -282,7 +282,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque ptrT ptszNick(db_get_tsa(param->hContact, m_szModuleName, "Nick")); CMString str(FORMAT, TranslateT("Loading messages for %s is completed"), ptszNick); - debugLog(_T("CVkProto::OnReceiveHistoryMessages for %s m_iLoadHistoryTask=%d"), ptszNick, m_iLoadHistoryTask); + debugLog(L"CVkProto::OnReceiveHistoryMessages for %s m_iLoadHistoryTask=%d", ptszNick, m_iLoadHistoryTask); if (m_bNotifyForEndLoadingHistory) MsgPopup(param->hContact, str, TranslateT("Loading history")); diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index 1a94e372a4..bdb6bdc3b0 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -104,7 +104,7 @@ void CVkProto::OnSendMessage(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) UINT mid; if (jnResponse.type() != JSON_STRING) mid = jnResponse.as_int(); - else if (_stscanf(jnResponse.as_mstring(), _T("%d"), &mid) != 1) + else if (_stscanf(jnResponse.as_mstring(), L"%d", &mid) != 1) mid = 0; if (param->iMsgID != -1) @@ -252,7 +252,7 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (jnFwdMessages) { CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, m_vkOptions.BBCForAttachments()); if (!tszBody.IsEmpty()) - tszFwdMessages = _T("\n") + tszFwdMessages; + tszFwdMessages = L"\n" + tszFwdMessages; tszBody += tszFwdMessages; } @@ -261,7 +261,7 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (jnAttachments) { tszAttachmentDescr = GetAttachmentDescr(jnAttachments, m_vkOptions.BBCForAttachments()); if (!tszBody.IsEmpty()) - tszBody += _T("\n"); + tszBody += L"\n"; tszBody += tszAttachmentDescr; } diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index 631fe55d41..b2b6d7233a 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -36,7 +36,7 @@ CVkAccMgrForm::CVkAccMgrForm(CVkProto *proto, HWND hwndParent): { SetParent(hwndParent); - CreateLink(m_edtLogin, "Login", _T("")); + CreateLink(m_edtLogin, "Login", L""); } void CVkAccMgrForm::OnInitDialog() @@ -111,14 +111,14 @@ int CVkProto::OnOptionsInit(WPARAM wParam, LPARAM) static CVKLang vkLangCodes[] = { { NULL, LPGENT("Account language") }, - { _T("en"), LPGENT("English") }, - { _T("ru"), LPGENT("Russian") }, - { _T("be"), LPGENT("Belarusian") }, - { _T("ua"), LPGENT("Ukrainian") }, - { _T("es"), LPGENT("Spanish") }, - { _T("fi"), LPGENT("Finnish") }, - { _T("de"), LPGENT("German") }, - { _T("it"), LPGENT("Italian") }, + { L"en", LPGENT("English") }, + { L"ru", LPGENT("Russian") }, + { L"be", LPGENT("Belarusian") }, + { L"ua", LPGENT("Ukrainian") }, + { L"es", LPGENT("Spanish") }, + { L"fi", LPGENT("Finnish") }, + { L"de", LPGENT("German") }, + { L"it", LPGENT("Italian") }, }; static CVKSync vkHistorySyncMethods[] = @@ -150,7 +150,7 @@ CVkOptionAccountForm::CVkOptionAccountForm(CVkProto *proto): m_cbxMarkAsRead(this, IDC_COMBO_MARKASREAD), m_cbxSyncHistory(this, IDC_COMBO_SYNCHISTORY) { - CreateLink(m_edtLogin, "Login", _T("")); + CreateLink(m_edtLogin, "Login", L""); CreateLink(m_edtGroupName, m_proto->m_vkOptions.ptszDefaultGroup); CreateLink(m_cbDelivery, m_proto->m_vkOptions.bServerDelivery); CreateLink(m_cbUseLocalTime, m_proto->m_vkOptions.bUseLocalTime); diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 10639738c0..f7c5c77900 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -425,7 +425,7 @@ void CVkProto::InitPopups(void) ppc.PluginWindowProc = PopupDlgProc; ppc.lParam = APF_RETURN_HWND; - mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Errors")); + mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Errors")); mir_snprintf(name, "%s_%s", m_szModuleName, "Error"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -435,7 +435,7 @@ void CVkProto::InitPopups(void) ppc.iSeconds = 60; m_hPopupClassError = Popup_RegisterClass(&ppc); - mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Notification")); + mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Notification")); mir_snprintf(name, "%s_%s", m_szModuleName, "Notification"); ppc.ptszDescription = desc; ppc.pszName = name; diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp index b016302971..bc5ebb88d2 100644 --- a/protocols/VKontakte/src/vk_search.cpp +++ b/protocols/VKontakte/src/vk_search.cpp @@ -69,8 +69,8 @@ void __cdecl CVkProto::SearchThread(void *p) PROTOSEARCHBYNAME *pParam = (PROTOSEARCHBYNAME *)p; TCHAR arg[200]; - mir_sntprintf(arg, _T("%s %s %s"), pParam->pszFirstName, pParam->pszNick, pParam->pszLastName); - debugLog(_T("CVkProto::SearchThread %s"), arg); + mir_sntprintf(arg, L"%s %s %s", pParam->pszFirstName, pParam->pszNick, pParam->pszLastName); + debugLog(L"CVkProto::SearchThread %s", arg); if (!IsOnline()) return; @@ -120,7 +120,7 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) PROTOSEARCHRESULT psr = { sizeof(psr) }; psr.flags = PSR_TCHAR; - CMString Id(FORMAT, _T("%d"), jnRecord["id"].as_int()); + CMString Id(FORMAT, L"%d", jnRecord["id"].as_int()); CMString FirstName(jnRecord["first_name"].as_mstring()); CMString LastName(jnRecord["last_name"].as_mstring()); CMString Nick(jnRecord["nickname"].as_mstring()); @@ -178,7 +178,7 @@ void CVkProto::OnSearchByMail(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) PROTOSEARCHRESULT psr = { sizeof(psr) }; psr.flags = PSR_TCHAR; - CMString Id(FORMAT, _T("%d"), jnRecord["id"].as_int()); + CMString Id(FORMAT, L"%d", jnRecord["id"].as_int()); CMString FirstName(jnRecord["first_name"].as_mstring()); CMString LastName(jnRecord["last_name"].as_mstring()); CMString Nick(jnRecord["nickname"].as_mstring()); diff --git a/protocols/VKontakte/src/vk_status.cpp b/protocols/VKontakte/src/vk_status.cpp index ef7d83b874..8a3566270c 100644 --- a/protocols/VKontakte/src/vk_status.cpp +++ b/protocols/VKontakte/src/vk_status.cpp @@ -240,11 +240,11 @@ INT_PTR __cdecl CVkProto::SvcSetListeningTo(WPARAM, LPARAM lParam) db_unset(NULL, m_szModuleName, "ListeningTo"); else if (pliInfo->dwFlags & LTI_UNICODE) { if (ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT)) - tszListeningTo = ptrT((LPWSTR)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)_T("%artist% - %title%"), (LPARAM)pliInfo)); + tszListeningTo = ptrT((LPWSTR)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%artist% - %title%", (LPARAM)pliInfo)); else - tszListeningTo.Format(_T("%s - %s"), - pliInfo->ptszArtist ? pliInfo->ptszArtist : _T(""), - pliInfo->ptszTitle ? pliInfo->ptszTitle : _T("")); + tszListeningTo.Format(L"%s - %s", + pliInfo->ptszArtist ? pliInfo->ptszArtist : L"", + pliInfo->ptszTitle ? pliInfo->ptszTitle : L""); setTString("ListeningTo", tszListeningTo); } RetrieveStatusMusic(tszListeningTo); diff --git a/protocols/VKontakte/src/vk_struct.cpp b/protocols/VKontakte/src/vk_struct.cpp index eff1800b1a..ad7ff94525 100644 --- a/protocols/VKontakte/src/vk_struct.cpp +++ b/protocols/VKontakte/src/vk_struct.cpp @@ -125,8 +125,8 @@ CVkFileUploadParam::VKFileType CVkFileUploadParam::GetType() if (fname) mir_free(fname); - TCHAR img[] = _T(".jpg .jpeg .png .bmp"); - TCHAR audio[] = _T(".mp3"); + TCHAR img[] = L".jpg .jpeg .png .bmp"; + TCHAR audio[] = L".mp3"; TCHAR DRIVE[3], DIR[256], FNAME[256], EXT[256]; _tsplitpath(FileName, DRIVE, DIR, FNAME, EXT); @@ -233,7 +233,7 @@ CVKOptions::CVKOptions(PROTO_INTERFACE *proto) : iInvisibleInterval(proto, "InvisibleInterval", 10), iMaxFriendsCount(proto, "MaxFriendsCount", 1000), - ptszDefaultGroup(proto, "ProtoGroup", _T("VKontakte")), + ptszDefaultGroup(proto, "ProtoGroup", L"VKontakte"), ptszReturnChatMessage(proto, "ReturnChatMessage", TranslateT("I\'m back")), ptszVKLang(proto, "VKLang", NULL) diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index e2985504b8..2f2dcdae8b 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -297,7 +297,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self) tszValue = jnItem["bdate"].as_mstring(); if (!tszValue.IsEmpty()) { int d, m, y, iReadCount; - iReadCount = _stscanf(tszValue, _T("%d.%d.%d"), &d, &m, &y); + iReadCount = _stscanf(tszValue, L"%d.%d.%d", &d, &m, &y); if (iReadCount > 1) { if (iReadCount == 3) setWord(hContact, "BirthYear", y); @@ -362,7 +362,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self) CMString tszOldListeningTo(ptrT(db_get_tsa(hContact, m_szModuleName, "ListeningTo"))); const JSONNode &jnAudio = jnItem["status_audio"]; if (jnAudio) { - CMString tszListeningTo(FORMAT, _T("%s - %s"), jnAudio["artist"].as_mstring(), jnAudio["title"].as_mstring()); + CMString tszListeningTo(FORMAT, L"%s - %s", jnAudio["artist"].as_mstring(), jnAudio["title"].as_mstring()); if (tszListeningTo != tszOldListeningTo) { setTString(hContact, "ListeningTo", tszListeningTo); setTString(hContact, "AudioUrl", jnAudio["url"].as_mstring()); @@ -461,7 +461,7 @@ void CVkProto::RetrieveUserInfo(LONG userID) if (userID == VK_FEED_USER || !IsOnline()) return; - CMString code(FORMAT, _T("var userIDs=\"%i\";var res=API.users.get({\"user_ids\":userIDs,\"fields\":\"%s\",\"name_case\":\"nom\"});return{\"freeoffline\":0,\"norepeat\":1,\"usercount\":res.length,\"users\":res};"), + CMString code(FORMAT, L"var userIDs=\"%i\";var res=API.users.get({\"user_ids\":userIDs,\"fields\":\"%s\",\"name_case\":\"nom\"});return{\"freeoffline\":0,\"norepeat\":1,\"usercount\":res.length,\"users\":res};", userID, CMString(fieldsName)); Push(new AsyncHttpRequest(this, REQUEST_POST, "/method/execute.json", true, &CVkProto::OnReceiveUserInfo) << TCHAR_PARAM("code", code)); @@ -481,7 +481,7 @@ void CVkProto::RetrieveUsersInfo(bool bFreeOffline, bool bRepeat) continue; if (!userIDs.IsEmpty()) userIDs.AppendChar(','); - userIDs.AppendFormat(_T("%i"), userID); + userIDs.AppendFormat(L"%i", userID); if (i == MAX_CONTACTS_PER_REQUEST) break; @@ -491,7 +491,7 @@ void CVkProto::RetrieveUsersInfo(bool bFreeOffline, bool bRepeat) CMString codeformat("var userIDs=\"%s\";var _fields=\"%s\";"); if (m_bNeedSendOnline) - codeformat += _T("API.account.setOnline();"); + codeformat += L"API.account.setOnline();"; if (bFreeOffline && !m_vkOptions.bLoadFullCList) codeformat += CMString("var US=[];var res=[];var t=10;while(t>0){" @@ -774,8 +774,8 @@ INT_PTR __cdecl CVkProto::SvcBanUser(WPARAM hContact, LPARAM) ptrT ptszNick(db_get_tsa(hContact, m_szModuleName, "Nick")); CMString ptszMsg(FORMAT, TranslateT("Are you sure to ban %s? %s%sContinue?"), IsEmpty(ptszNick) ? TranslateT("(Unknown contact)") : ptszNick, - tszVarWarning.IsEmpty() ? _T(" ") : TranslateT("\nIt will also"), - tszVarWarning.IsEmpty() ? _T("\n") : tszVarWarning); + tszVarWarning.IsEmpty() ? L" " : TranslateT("\nIt will also"), + tszVarWarning.IsEmpty() ? L"\n" : tszVarWarning); if (IDNO == MessageBox(NULL, ptszMsg, TranslateT("Attention!"), MB_ICONWARNING | MB_YESNO)) return 1; @@ -836,7 +836,7 @@ INT_PTR __cdecl CVkProto::SvcVisitProfile(WPARAM hContact, LPARAM) if (tszDomain) tszUrl.Append(tszDomain); else - tszUrl.AppendFormat(_T("id%i"), userID); + tszUrl.AppendFormat(L"id%i", userID); Utils_OpenUrlT(tszUrl); return 0; diff --git a/protocols/WhatsApp/src/avatars.cpp b/protocols/WhatsApp/src/avatars.cpp index 36d14bce77..2121430f62 100644 --- a/protocols/WhatsApp/src/avatars.cpp +++ b/protocols/WhatsApp/src/avatars.cpp @@ -46,24 +46,24 @@ INT_PTR WhatsAppProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) std::tstring WhatsAppProto::GetAvatarFileName(MCONTACT hContact) { - std::tstring result = m_tszAvatarFolder + _T("\\"); + std::tstring result = m_tszAvatarFolder + L"\\"; std::string jid; if (hContact != NULL) { ptrA szId(getStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : WHATSAPP_KEY_ID)); if (szId == NULL) - return _T(""); + return L""; jid = szId; } else jid = m_szJid; - return result + std::tstring(_A2T(jid.c_str())) + _T(".jpg"); + return result + std::tstring(_A2T(jid.c_str())) + L".jpg"; } INT_PTR WhatsAppProto::GetMyAvatar(WPARAM wParam, LPARAM lParam) { - std::tstring tszOwnAvatar(m_tszAvatarFolder + _T("\\myavatar.jpg")); + std::tstring tszOwnAvatar(m_tszAvatarFolder + L"\\myavatar.jpg"); _tcsncpy_s((TCHAR*)wParam, lParam, tszOwnAvatar.c_str(), _TRUNCATE); return 0; } @@ -102,13 +102,13 @@ int WhatsAppProto::InternalSetAvatar(MCONTACT hContact, const char *szJid, const TCHAR tszTempFile[MAX_PATH], tszMyFile[MAX_PATH]; if (hContact == NULL) { - mir_sntprintf(tszMyFile, _T("%s\\myavatar.jpg"), m_tszAvatarFolder.c_str()); - mir_sntprintf(tszTempFile, _T("%s\\myavatar.preview.jpg"), m_tszAvatarFolder.c_str()); + mir_sntprintf(tszMyFile, L"%s\\myavatar.jpg", m_tszAvatarFolder.c_str()); + mir_sntprintf(tszTempFile, L"%s\\myavatar.preview.jpg", m_tszAvatarFolder.c_str()); } else { std::tstring tszContactAva = GetAvatarFileName(hContact); _tcsncpy_s(tszMyFile, tszContactAva.c_str(), _TRUNCATE); - _tcsncpy_s(tszTempFile, (tszContactAva + _T(".preview")).c_str(), _TRUNCATE); + _tcsncpy_s(tszTempFile, (tszContactAva + L".preview").c_str(), _TRUNCATE); } IMGSRVC_INFO saveInfo = { sizeof(saveInfo), 0 }; diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp index ab84dfb4be..e55e8274cf 100644 --- a/protocols/WhatsApp/src/chat.cpp +++ b/protocols/WhatsApp/src/chat.cpp @@ -21,7 +21,7 @@ INT_PTR __cdecl WhatsAppProto::OnCreateGroup(WPARAM, LPARAM) ENTER_STRING es = { 0 }; es.cbSize = sizeof(es); es.type = ESF_MULTILINE; - es.caption = _T("Enter a subject for new group"); + es.caption = L"Enter a subject for new group"; es.szModuleName = m_szModuleName; if (EnterString(&es)) { if (isOnline()) { @@ -175,8 +175,8 @@ void WhatsAppProto::SetChatAvatar(WAChatInfo *pInfo) ofn.lpstrFile = tszFileName; ofn.nMaxFile = ofn.nMaxFileTitle = _countof(tszFileName); ofn.Flags = OFN_HIDEREADONLY; - ofn.lpstrInitialDir = _T("."); - ofn.lpstrDefExt = _T(""); + ofn.lpstrInitialDir = L"."; + ofn.lpstrDefExt = L""; if (GetOpenFileName(&ofn)) if (_taccess(tszFileName, 4) != -1) InternalSetAvatar(pInfo->hContact, _T2A(pInfo->tszJid), tszFileName); @@ -513,7 +513,7 @@ void WhatsAppProto::onGetParticipants(const std::string &gjid, const std::vector GCEVENT gce = { sizeof(gce), &gcd }; gce.ptszNick = nick; gce.ptszUID = utils::removeA(ujid); - gce.ptszStatus = (bIsOwner) ? _T("Owners") : _T("Members"); + gce.ptszStatus = (bIsOwner) ? L"Owners" : L"Members"; CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce); } } diff --git a/protocols/WhatsApp/src/constants.h b/protocols/WhatsApp/src/constants.h index 2fb002ab5b..e535eabded 100644 --- a/protocols/WhatsApp/src/constants.h +++ b/protocols/WhatsApp/src/constants.h @@ -2,7 +2,7 @@ #define CONSTANTS_H // Version management -#define PRODUCT_NAME _T("WhatsApp Protocol") +#define PRODUCT_NAME L"WhatsApp Protocol" // Limits #define WHATSAPP_GROUP_NAME_LIMIT 420 diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp index 413d3b80f1..3dfeec59a1 100644 --- a/protocols/WhatsApp/src/contacts.cpp +++ b/protocols/WhatsApp/src/contacts.cpp @@ -75,10 +75,10 @@ void WhatsAppProto::SetAllContactStatuses(int status, bool reset_client) for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) { if (reset_client) { ptrT tszMirVer(getTStringA(hContact, "MirVer")); - if (mir_tstrcmp(tszMirVer, _T("WhatsApp"))) - setTString(hContact, "MirVer", _T("WhatsApp")); + if (mir_tstrcmp(tszMirVer, L"WhatsApp")) + setTString(hContact, "MirVer", L"WhatsApp"); - db_set_ws(hContact, "CList", "StatusMsg", _T("")); + db_set_ws(hContact, "CList", "StatusMsg", L""); } if (getWord(hContact, "Status", ID_STATUS_OFFLINE) != status) @@ -163,7 +163,7 @@ void WhatsAppProto::onSendGetPicture(const std::string &jid, const std::vector<u // Save avatar std::tstring filename = GetAvatarFileName(hContact); - FILE *f = _tfopen(filename.c_str(), _T("wb")); + FILE *f = _tfopen(filename.c_str(), L"wb"); size_t r = fwrite(std::string(data.begin(), data.end()).c_str(), 1, data.size(), f); fclose(f); @@ -187,5 +187,5 @@ void WhatsAppProto::onSendGetPicture(const std::string &jid, const std::vector<u TCHAR* WhatsAppProto::GetContactDisplayName(const string& jid) { MCONTACT hContact = ContactIDToHContact(jid); - return (hContact) ? pcli->pfnGetContactDisplayName(hContact, 0) : _T("none"); + return (hContact) ? pcli->pfnGetContactDisplayName(hContact, 0) : L"none"; } diff --git a/protocols/WhatsApp/src/dialogs.cpp b/protocols/WhatsApp/src/dialogs.cpp index 069603bb2b..b770210dd6 100644 --- a/protocols/WhatsApp/src/dialogs.cpp +++ b/protocols/WhatsApp/src/dialogs.cpp @@ -31,10 +31,10 @@ public: CreateLink(m_remoteTime, WHATSAPP_KEY_USE_REMOTE_TIME, DBVT_BYTE, false); CreateLink(m_autorun, WHATSAPP_KEY_AUTORUNCHATS, DBVT_BYTE, true); - CreateLink(m_cc, WHATSAPP_KEY_CC, _T("")); - CreateLink(m_nick, WHATSAPP_KEY_NICK, _T("")); - CreateLink(m_login, WHATSAPP_KEY_LOGIN, _T("")); - CreateLink(m_group, WHATSAPP_KEY_DEF_GROUP, _T("")); + CreateLink(m_cc, WHATSAPP_KEY_CC, L""); + CreateLink(m_nick, WHATSAPP_KEY_NICK, L""); + CreateLink(m_login, WHATSAPP_KEY_LOGIN, L""); + CreateLink(m_group, WHATSAPP_KEY_DEF_GROUP, L""); m_requestSMS.OnClick = Callback(this, &COptionsDlg::OnRequestSMSClick); m_requestVoice.OnClick = Callback(this, &COptionsDlg::OnRequestVoiceClick); diff --git a/protocols/WhatsApp/src/media.cpp b/protocols/WhatsApp/src/media.cpp index 7136a3862a..c94d5ab6c8 100644 --- a/protocols/WhatsApp/src/media.cpp +++ b/protocols/WhatsApp/src/media.cpp @@ -17,7 +17,7 @@ HANDLE WhatsAppProto::SendFile(MCONTACT hContact, const TCHAR* desc, TCHAR **pps } // get file size - FILE *hFile = _tfopen(ppszFiles[0], _T("rb")); + FILE *hFile = _tfopen(ppszFiles[0], L"rb"); if (hFile == NULL) { debugLogA(__FUNCTION__": cannot open file %s", ppszFiles[0]); mir_free(name); @@ -69,7 +69,7 @@ HANDLE WhatsAppProto::SendFile(MCONTACT hContact, const TCHAR* desc, TCHAR **pps SHA256_CONTEXT sha256; mir_sha256_init(&sha256); - FILE *fd = _tfopen(ppszFiles[0], _T("rb")); + FILE *fd = _tfopen(ppszFiles[0], L"rb"); int read = 0; do { char buf[1024]; diff --git a/protocols/WhatsApp/src/messages.cpp b/protocols/WhatsApp/src/messages.cpp index 163144df5e..aa48df5444 100644 --- a/protocols/WhatsApp/src/messages.cpp +++ b/protocols/WhatsApp/src/messages.cpp @@ -132,6 +132,6 @@ void WhatsAppProto::onMessageStatusUpdate(const FMessage &fmsg) time_t ts = atol(fmsg.key.id.substr(0, delim).c_str()); TCHAR ttime[64]; - _tcsftime(ttime, _countof(ttime), _T("%X"), localtime(&ts)); + _tcsftime(ttime, _countof(ttime), L"%X", localtime(&ts)); utils::setStatusMessage(hContact, CMString(FORMAT, TranslateT("Message received: %s by %s"), ttime, ptszBy)); } diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index 63068ab57d..a361ad3e16 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -43,18 +43,18 @@ WhatsAppProto::WhatsAppProto(const char *proto_name, const TCHAR *username) if (m_hNetlibUser == NULL) { TCHAR error[200]; mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName); - MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR); + MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR); } WASocketConnection::initNetwork(m_hNetlibUser); - m_tszAvatarFolder = std::tstring(VARST(_T("%miranda_avatarcache%"))) + _T("\\") + m_tszUserName; + m_tszAvatarFolder = std::tstring(VARST(L"%miranda_avatarcache%")) + L"\\" + m_tszUserName; DWORD dwAttributes = GetFileAttributes(m_tszAvatarFolder.c_str()); if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) CreateDirectoryTreeT(m_tszAvatarFolder.c_str()); if (m_tszDefaultGroup == NULL) - m_tszDefaultGroup = mir_tstrdup(_T("WhatsApp")); + m_tszDefaultGroup = mir_tstrdup(L"WhatsApp"); Clist_GroupCreate(0, m_tszDefaultGroup); SetAllContactStatuses(ID_STATUS_OFFLINE, true); @@ -197,7 +197,7 @@ void WhatsAppProto::SearchAckThread(void *targ) PROTOSEARCHRESULT psr = { 0 }; psr.cbSize = sizeof(psr); psr.flags = PSR_TCHAR; - psr.nick.t = psr.firstName.t = psr.lastName.t = _T(""); + psr.nick.t = psr.firstName.t = psr.lastName.t = L""; psr.id.t = (TCHAR*)param->jid.c_str(); ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)param->id, (LPARAM)&psr); diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index 60a1579281..ec1696c65d 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -596,19 +596,19 @@ void CYahooProto::request_avatar(const char* who) void CYahooProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, int cbLen, int type) { - int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName); + int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName); if (_taccess(pszDest, 0)) CreateDirectoryTreeT(pszDest); if (hContact != NULL) { int ck_sum = getDword(hContact, "PictCK", 0); - tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%lX"), ck_sum); + tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%lX", ck_sum); } else - tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%S avatar"), m_szModuleName); + tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%S avatar", m_szModuleName); - _tcsncpy_s((pszDest + tPathLen), (cbLen - tPathLen), (type == 1 ? _T(".swf") : _T(".png")), _TRUNCATE); + _tcsncpy_s((pszDest + tPathLen), (cbLen - tPathLen), (type == 1 ? L".swf" : L".png"), _TRUNCATE); } INT_PTR __cdecl CYahooProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index 4999c4947c..105f86f19e 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -54,7 +54,7 @@ void ext_yahoo_conf_userdecline(int id, const char*, const char *who, const char TCHAR info[1024]; TCHAR *whot = mir_utf8decodeT(who); TCHAR *msgt = mir_utf8decodeT(msg); - mir_sntprintf(info, TranslateT("%s denied invitation with message: %s"), whot, msgt ? msgt : _T("")); + mir_sntprintf(info, TranslateT("%s denied invitation with message: %s"), whot, msgt ? msgt : L""); GETPROTOBYID(id)->ChatEvent(room, who, GC_EVENT_INFORMATION, info); mir_free(msgt); mir_free(whot); @@ -316,7 +316,7 @@ int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam) { { TranslateT("User &details"), 10, MENU_ITEM, FALSE }, { TranslateT("User &history"), 20, MENU_ITEM, FALSE }, - { _T(""), 100, MENU_SEPARATOR, FALSE }, + { L"", 100, MENU_SEPARATOR, FALSE }, { TranslateT("&Leave chat session"), 110, MENU_ITEM, FALSE } }; gcmi->nItems = _countof(Items); @@ -356,7 +356,7 @@ static void clist_chat_invite_send(MCONTACT hItem, HWND hwndList, YList* &who, c int chk = SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0); if (chk) { if (IsHContactInfo(hItem)) { - TCHAR buf[128] = _T(""); + TCHAR buf[128] = L""; SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf); who = y_list_append(who, mir_t2a(buf)); diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp index aac588cf74..d5549b571c 100644 --- a/protocols/Yahoo/src/file_transfer.cpp +++ b/protocols/Yahoo/src/file_transfer.cpp @@ -297,7 +297,7 @@ static void dl_file(int id, INT_PTR fd, int error, const char*, unsigned long si * * Don't rely on workingDir to be right, since it's not used to check if file exists. */ - mir_sntprintf(filefull, _T("%s\\%s"), sf->pfts.tszWorkingDir, sf->pfts.tszCurrentFile); + mir_sntprintf(filefull, L"%s\\%s", sf->pfts.tszWorkingDir, sf->pfts.tszCurrentFile); FREE(sf->pfts.tszCurrentFile); sf->pfts.tszCurrentFile = _tcsdup(filefull); diff --git a/protocols/Yahoo/src/links.cpp b/protocols/Yahoo/src/links.cpp index 48af9ef88e..18be749700 100644 --- a/protocols/Yahoo/src/links.cpp +++ b/protocols/Yahoo/src/links.cpp @@ -95,7 +95,7 @@ static INT_PTR ServiceParseYmsgrLink(WPARAM, LPARAM lParam) if (!proto) return 1; /* add a contact to the list */ - if (!_tcsnicmp(arg, _T("addfriend?"), 10)) { + if (!_tcsnicmp(arg, L"addfriend?", 10)) { arg += 10; char *id = get_buddy(&arg); @@ -119,7 +119,7 @@ static INT_PTR ServiceParseYmsgrLink(WPARAM, LPARAM lParam) return 0; } /* send a message to a contact */ - else if (!_tcsnicmp(arg, _T("sendim?"), 7)) { + else if (!_tcsnicmp(arg, L"sendim?", 7)) { arg += 7; char *id = get_buddy(&arg); @@ -128,7 +128,7 @@ static INT_PTR ServiceParseYmsgrLink(WPARAM, LPARAM lParam) TCHAR *msg = NULL; while (arg) { - if (!_tcsnicmp(arg, _T("m="), 2)) { + if (!_tcsnicmp(arg, L"m=", 2)) { msg = arg + 2; url_decode(msg); break; @@ -146,7 +146,7 @@ static INT_PTR ServiceParseYmsgrLink(WPARAM, LPARAM lParam) return 0; } /* open a chatroom */ - else if (!_tcsnicmp(arg, _T("chat?"), 5)) { + else if (!_tcsnicmp(arg, L"chat?", 5)) { arg += 5; // char *id = get_buddy(&arg); diff --git a/protocols/Yahoo/src/search.cpp b/protocols/Yahoo/src/search.cpp index 852a911a71..9a606c4245 100644 --- a/protocols/Yahoo/src/search.cpp +++ b/protocols/Yahoo/src/search.cpp @@ -174,10 +174,10 @@ void __cdecl CYahooProto::searchadv_thread(void *pHWND) psr.id.t = _tcslwr(searchid); switch (SendDlgItemMessage(hwndDlg, IDC_SEARCH_PROTOCOL, CB_GETCURSEL, 0, 0)) { - case 0: psr.firstName.t = _T("<Yahoo>"); psr.protocol = YAHOO_IM_YAHOO; break; - case 1: psr.firstName.t = _T("<Lotus Sametime>"); psr.protocol = YAHOO_IM_SAMETIME; break; - case 2: psr.firstName.t = _T("<LCS>"); psr.protocol = YAHOO_IM_LCS; break; - case 3: psr.firstName.t = _T("<Windows Live (MSN)>"); psr.protocol = YAHOO_IM_MSN; break; + case 0: psr.firstName.t = L"<Yahoo>"; psr.protocol = YAHOO_IM_YAHOO; break; + case 1: psr.firstName.t = L"<Lotus Sametime>"; psr.protocol = YAHOO_IM_SAMETIME; break; + case 2: psr.firstName.t = L"<LCS>"; psr.protocol = YAHOO_IM_LCS; break; + case 3: psr.firstName.t = L"<Windows Live (MSN)>"; psr.protocol = YAHOO_IM_MSN; break; } /* diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index df465c1668..7cb6c76f34 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -926,7 +926,7 @@ void CYahooProto::ext_mail_notify(const char *from, const char *subj, int cnt) TCHAR z[MAX_SECONDLINE], title[MAX_CONTACTNAME]; if (from == NULL) { - mir_sntprintf(title, _T("%s: %s"), m_tszUserName, TranslateT("New Mail")); + mir_sntprintf(title, L"%s: %s", m_tszUserName, TranslateT("New Mail")); mir_sntprintf(z, TranslateT("You have %i unread messages"), cnt); } else { -- cgit v1.2.3