From 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Jul 2016 09:20:25 +0000 Subject: less TCHARs: - TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_utils.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'protocols/Tox/src/tox_utils.cpp') diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index 0ad5015340..f09f7ca8c1 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -55,7 +55,7 @@ int CToxProto::ToxToMirandaStatus(TOX_USER_STATUS userstatus) return status; } -TCHAR* CToxProto::ToxErrorToString(TOX_ERR_NEW error) +wchar_t* CToxProto::ToxErrorToString(TOX_ERR_NEW error) { switch (error) { @@ -82,20 +82,20 @@ TCHAR* CToxProto::ToxErrorToString(TOX_ERR_NEW error) } } -TCHAR* CToxProto::ToxErrorToString(TOX_ERR_FRIEND_SEND_MESSAGE error) +wchar_t* CToxProto::ToxErrorToString(TOX_ERR_FRIEND_SEND_MESSAGE error) { switch (error) { - case TOX_ERR_FRIEND_SEND_MESSAGE_NULL: - return TranslateT("One of the arguments is missing"); - case TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_FOUND: - return TranslateT("The friend number did not designate a valid friend"); - case TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_CONNECTED: - return TranslateT("This client is currently not connected to the friend"); - case TOX_ERR_FRIEND_SEND_MESSAGE_SENDQ: - return TranslateT("An allocation error occurred while increasing the send queue size"); - case TOX_ERR_FRIEND_SEND_MESSAGE_TOO_LONG: - return TranslateT("Message length exceeded TOX_MAX_MESSAGE_LENGTH"); + case TOX_ERR_FRIEND_SEND_MESSAGE_NULL: + return TranslateT("One of the arguments is missing"); + case TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_FOUND: + return TranslateT("The friend number did not designate a valid friend"); + case TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_CONNECTED: + return TranslateT("This client is currently not connected to the friend"); + case TOX_ERR_FRIEND_SEND_MESSAGE_SENDQ: + return TranslateT("An allocation error occurred while increasing the send queue size"); + case TOX_ERR_FRIEND_SEND_MESSAGE_TOO_LONG: + return TranslateT("Message length exceeded TOX_MAX_MESSAGE_LENGTH"); case TOX_ERR_FRIEND_SEND_MESSAGE_EMPTY: return TranslateT("Attempted to send a zero-length message"); default: @@ -103,7 +103,7 @@ TCHAR* CToxProto::ToxErrorToString(TOX_ERR_FRIEND_SEND_MESSAGE error) } } -void CToxProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int flags, MCONTACT hContact) +void CToxProto::ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, MCONTACT hContact) { if (Miranda_Terminated()) { @@ -125,14 +125,14 @@ void CToxProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int MessageBox(NULL, message, caption, MB_OK | flags); } -void CToxProto::ShowNotification(const TCHAR *message, int flags, MCONTACT hContact) +void CToxProto::ShowNotification(const wchar_t *message, int flags, MCONTACT hContact) { ShowNotification(_T(MODULE), message, flags, hContact); } -bool CToxProto::IsFileExists(const TCHAR* path) +bool CToxProto::IsFileExists(const wchar_t* path) { - return _taccess(path, 0) == 0; + return _waccess(path, 0) == 0; } MEVENT CToxProto::AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, PBYTE pBlob, size_t cbBlob) @@ -149,7 +149,7 @@ MEVENT CToxProto::AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp, DW INT_PTR CToxProto::ParseToxUri(WPARAM, LPARAM lParam) { - TCHAR *uri = (TCHAR*)lParam; + wchar_t *uri = (wchar_t*)lParam; if (mir_tstrlen(uri) <= 4) return 1; @@ -168,7 +168,7 @@ INT_PTR CToxProto::ParseToxUri(WPARAM, LPARAM lParam) if (proto == NULL) return 1; - if (_tcschr(uri, _T('@')) != NULL) + if (wcschr(uri, '@') != NULL) return 1; PROTOSEARCHRESULT psr = { sizeof(psr) }; -- cgit v1.2.3