summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/src/services.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/AimOscar/src/services.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/AimOscar/src/services.cpp')
-rw-r--r--protocols/AimOscar/src/services.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp
index c4be0f3401..c108139a3e 100644
--- a/protocols/AimOscar/src/services.cpp
+++ b/protocols/AimOscar/src/services.cpp
@@ -392,14 +392,14 @@ INT_PTR CAimProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam)
INT_PTR CAimProto::GetAvatar(WPARAM wParam, LPARAM lParam)
{
- TCHAR* buf = (TCHAR*)wParam;
+ wchar_t* buf = (wchar_t*)wParam;
size_t size = (size_t)lParam;
if (buf == NULL || size <= 0)
return -1;
PROTO_AVATAR_INFORMATION ai = { 0 };
if (GetAvatarInfo(0, (LPARAM)&ai) == GAIR_SUCCESS) {
- _tcsncpy_s(buf, size, ai.filename, _TRUNCATE);
+ wcsncpy_s(buf, size, ai.filename, _TRUNCATE);
return 0;
}
@@ -408,7 +408,7 @@ INT_PTR CAimProto::GetAvatar(WPARAM wParam, LPARAM lParam)
INT_PTR CAimProto::SetAvatar(WPARAM, LPARAM lParam)
{
- TCHAR *szFileName = (TCHAR*)lParam;
+ wchar_t *szFileName = (wchar_t*)lParam;
if (m_state != 1)
return 1;
@@ -461,10 +461,10 @@ INT_PTR CAimProto::SetAvatar(WPARAM, LPARAM lParam)
avatar_up_req *req = new avatar_up_req(data, size, data1, size1);
ForkThread(&CAimProto::avatar_upload_thread, req);
- TCHAR tFileName[MAX_PATH];
- TCHAR *ext = _tcsrchr(szFileName, '.');
+ wchar_t tFileName[MAX_PATH];
+ wchar_t *ext = wcsrchr(szFileName, '.');
get_avatar_filename(NULL, tFileName, _countof(tFileName), ext);
- int fileId = _topen(tFileName, _O_CREAT | _O_TRUNC | _O_WRONLY | O_BINARY, _S_IREAD | _S_IWRITE);
+ int fileId = _wopen(tFileName, _O_CREAT | _O_TRUNC | _O_WRONLY | O_BINARY, _S_IREAD | _S_IWRITE);
if (fileId < 0) {
char errmsg[512];
mir_snprintf(errmsg, "Cannot store avatar. File '%s' could not be created/overwritten", tFileName);