summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_avatars.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /protocols/Tox/src/tox_avatars.cpp
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
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
Diffstat (limited to 'protocols/Tox/src/tox_avatars.cpp')
-rw-r--r--protocols/Tox/src/tox_avatars.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp
index b62328ae11..252f9f6a18 100644
--- a/protocols/Tox/src/tox_avatars.cpp
+++ b/protocols/Tox/src/tox_avatars.cpp
@@ -1,8 +1,8 @@
#include "stdafx.h"
-TCHAR* CToxProto::GetAvatarFilePath(MCONTACT hContact)
+wchar_t* CToxProto::GetAvatarFilePath(MCONTACT hContact)
{
- TCHAR *path = (TCHAR*)mir_calloc(MAX_PATH * sizeof(TCHAR) + 1);
+ wchar_t *path = (wchar_t*)mir_calloc(MAX_PATH * sizeof(wchar_t) + 1);
mir_sntprintf(path, MAX_PATH, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(path);
@@ -22,9 +22,9 @@ TCHAR* CToxProto::GetAvatarFilePath(MCONTACT hContact)
return path;
}
-void CToxProto::SetToxAvatar(const TCHAR* path)
+void CToxProto::SetToxAvatar(const wchar_t* path)
{
- FILE *hFile = _tfopen(path, L"rb");
+ FILE *hFile = _wfopen(path, L"rb");
if (!hFile)
{
debugLogA(__FUNCTION__": failed to open avatar file");
@@ -96,7 +96,7 @@ void CToxProto::SetToxAvatar(const TCHAR* path)
transfer->pfts.flags |= PFTS_SENDING;
memcpy(transfer->hash, hash, TOX_HASH_LENGTH);
transfer->pfts.hContact = hContact;
- transfer->hFile = _tfopen(path, L"rb");
+ transfer->hFile = _wfopen(path, L"rb");
transfers.Add(transfer);
}
}
@@ -150,7 +150,7 @@ INT_PTR CToxProto::GetMyAvatar(WPARAM wParam, LPARAM lParam)
{
ptrT path(GetAvatarFilePath());
if (IsFileExists(path))
- mir_tstrncpy((TCHAR*)wParam, path, (int)lParam);
+ mir_tstrncpy((wchar_t*)wParam, path, (int)lParam);
return 0;
}
@@ -158,7 +158,7 @@ INT_PTR CToxProto::GetMyAvatar(WPARAM wParam, LPARAM lParam)
INT_PTR CToxProto::SetMyAvatar(WPARAM, LPARAM lParam)
{
debugLogA(__FUNCTION__": setting avatar");
- TCHAR *path = (TCHAR*)lParam;
+ wchar_t *path = (wchar_t*)lParam;
ptrT avatarPath(GetAvatarFilePath());
if (path != NULL)
{
@@ -230,7 +230,7 @@ void CToxProto::OnGotFriendAvatarInfo(AvatarTransferParam *transfer)
db_free(&dbv);
}
- TCHAR path[MAX_PATH];
+ wchar_t path[MAX_PATH];
mir_sntprintf(path, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
OnFileAllow(transfer->pfts.hContact, transfer, path);
}