summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/src/file.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
commit2f261839b60692e33d0e160344d0d636d49c90ba (patch)
tree187921722698b681d29df3f6e60fb18394a5e9d5 /protocols/AimOscar/src/file.cpp
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar/src/file.cpp')
-rw-r--r--protocols/AimOscar/src/file.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/AimOscar/src/file.cpp b/protocols/AimOscar/src/file.cpp
index d2a392b9a7..a186b29fa8 100644
--- a/protocols/AimOscar/src/file.cpp
+++ b/protocols/AimOscar/src/file.cpp
@@ -96,8 +96,8 @@ bool send_init_oft2(file_transfer *ft, char* file)
void CAimProto::report_file_error(wchar_t *fname)
{
wchar_t errmsg[512];
- wchar_t* error = mir_a2t(_strerror(NULL));
- mir_sntprintf(errmsg, TranslateT("Failed to open file: %s : %s"), fname, error);
+ wchar_t* error = mir_a2u(_strerror(NULL));
+ mir_snwprintf(errmsg, TranslateT("Failed to open file: %s : %s"), fname, error);
mir_free(error);
ShowPopup((char*)errmsg, ERROR_POPUP | TCHAR_POPUP);
}
@@ -266,7 +266,7 @@ int CAimProto::receiving_file(file_transfer *ft, HANDLE hServerPacketRecver, NET
oft2 *oft = NULL;
- ft->pfts.tszWorkingDir = mir_utf8decodeT(ft->file);
+ ft->pfts.tszWorkingDir = mir_utf8decodeW(ft->file);
//start listen for packets stuff
for (;;) {
@@ -314,20 +314,20 @@ int CAimProto::receiving_file(file_transfer *ft, HANDLE hServerPacketRecver, NET
wchar_t* wbuf = (wchar_t*)buf;
wcs_htons(wbuf);
for (wchar_t *p = wbuf; *p; ++p) { if (*p == 1) *p = '\\'; }
- name = mir_u2t(wbuf);
+ name = mir_wstrdup(wbuf);
}
else {
for (char *p = buf; *p; ++p) { if (*p == 1) *p = '\\'; }
- name = mir_a2t(buf);
+ name = mir_a2u(buf);
}
mir_free(buf);
wchar_t fname[256];
- mir_sntprintf(fname, L"%s%s", ft->pfts.tszWorkingDir, name);
+ mir_snwprintf(fname, L"%s%s", ft->pfts.tszWorkingDir, name);
mir_free(name);
mir_free(ft->pfts.tszCurrentFile);
- ft->pfts.tszCurrentFile = mir_tstrdup(fname);
+ ft->pfts.tszCurrentFile = mir_wstrdup(fname);
ResetEvent(ft->hResumeEvent);
if (ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, ft, (LPARAM)&ft->pfts))