diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
commit | 2f261839b60692e33d0e160344d0d636d49c90ba (patch) | |
tree | 187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/Dropbox/src | |
parent | 2e931a0b2780587d85f3902468c935f5adba70c8 (diff) |
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src')
-rw-r--r-- | plugins/Dropbox/src/dropbox.cpp | 2 | ||||
-rw-r--r-- | plugins/Dropbox/src/dropbox_options.cpp | 4 | ||||
-rw-r--r-- | plugins/Dropbox/src/dropbox_services.cpp | 2 | ||||
-rw-r--r-- | plugins/Dropbox/src/dropbox_transfers.cpp | 6 | ||||
-rw-r--r-- | plugins/Dropbox/src/dropbox_utils.cpp | 10 | ||||
-rw-r--r-- | plugins/Dropbox/src/file_transfer.h | 4 |
6 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Dropbox/src/dropbox.cpp b/plugins/Dropbox/src/dropbox.cpp index 4a6faac5b1..6ec01a5354 100644 --- a/plugins/Dropbox/src/dropbox.cpp +++ b/plugins/Dropbox/src/dropbox.cpp @@ -173,7 +173,7 @@ UINT CDropbox::RequestAccessTokenAsync(void *owner, void *param) JSONNode node = root.at("error_description");
if (node != JSONNULL) {
- ptrT error_description(mir_a2t_cp(node.as_string().c_str(), CP_UTF8));
+ ptrW error_description(mir_a2u_cp(node.as_string().c_str(), CP_UTF8));
Netlib_Logf(instance->hNetlibConnection, "%s: %s", MODULE, HttpStatusToText((HTTP_STATUS)response->resultCode));
if (hwndDlg)
SetDlgItemText(hwndDlg, IDC_AUTH_STATUS, error_description);
diff --git a/plugins/Dropbox/src/dropbox_options.cpp b/plugins/Dropbox/src/dropbox_options.cpp index f5ff7516fd..3bba4c0520 100644 --- a/plugins/Dropbox/src/dropbox_options.cpp +++ b/plugins/Dropbox/src/dropbox_options.cpp @@ -77,8 +77,8 @@ void CDropboxOptionsInterception::OnInitDialog() PROTOACCOUNT *acc = accounts[i];
if (strstr(acc->szProtoName, MODULE) || strstr(acc->szProtoName, "Meta"))
continue;
- int iItem = m_accounts.AddItem(mir_tstrdup(acc->tszAccountName), -1, (LPARAM)acc);
- m_accounts.SetItem(iItem, 1, mir_a2t(acc->szProtoName));
+ int iItem = m_accounts.AddItem(mir_wstrdup(acc->tszAccountName), -1, (LPARAM)acc);
+ m_accounts.SetItem(iItem, 1, mir_a2u(acc->szProtoName));
if (interceptedAccounts && strstr(interceptedAccounts, acc->szModuleName))
m_accounts.SetCheckState(iItem, TRUE);
}
diff --git a/plugins/Dropbox/src/dropbox_services.cpp b/plugins/Dropbox/src/dropbox_services.cpp index 6896398ced..9dd4100a68 100644 --- a/plugins/Dropbox/src/dropbox_services.cpp +++ b/plugins/Dropbox/src/dropbox_services.cpp @@ -192,7 +192,7 @@ INT_PTR CDropbox::UploadToDropbox(WPARAM wParam, LPARAM lParam) int res = UploadToDropbox(this, ftp);
if (res == ACKRESULT_SUCCESS && wParam) {
char **data = (char**)wParam;
- *data = mir_utf8encodeT(ftp->GetData());
+ *data = mir_utf8encodeW(ftp->GetData());
}
transfers.remove(ftp);
diff --git a/plugins/Dropbox/src/dropbox_transfers.cpp b/plugins/Dropbox/src/dropbox_transfers.cpp index 33d9ed8613..85f3d44592 100644 --- a/plugins/Dropbox/src/dropbox_transfers.cpp +++ b/plugins/Dropbox/src/dropbox_transfers.cpp @@ -102,7 +102,7 @@ UINT CDropbox::UploadToDropbox(void *owner, void *arg) PreparePath(folderName, path);
instance->CreateFolder(path);
instance->CreateDownloadUrl(path, url);
- ftp->AppendFormatData(L"%s\r\n", ptrT(mir_utf8decodeT(url)));
+ ftp->AppendFormatData(L"%s\r\n", ptrW(mir_utf8decodeW(url)));
}
ftp->FirstFile();
@@ -142,7 +142,7 @@ UINT CDropbox::UploadToDropbox(void *owner, void *arg) const wchar_t *serverFolder = ftp->GetServerFolder();
if (serverFolder) {
wchar_t serverPath[MAX_PATH] = { 0 };
- mir_sntprintf(serverPath, L"%s\\%s", serverFolder, fileName);
+ mir_snwprintf(serverPath, L"%s\\%s", serverFolder, fileName);
PreparePath(serverPath, path);
}
else
@@ -154,7 +154,7 @@ UINT CDropbox::UploadToDropbox(void *owner, void *arg) if (!wcschr(fileName, L'\\')) {
char url[MAX_PATH];
instance->CreateDownloadUrl(path, url);
- ftp->AppendFormatData(L"%s\r\n", ptrT(mir_utf8decodeT(url)));
+ ftp->AppendFormatData(L"%s\r\n", ptrW(mir_utf8decodeW(url)));
}
} while (ftp->NextFile());
}
diff --git a/plugins/Dropbox/src/dropbox_utils.cpp b/plugins/Dropbox/src/dropbox_utils.cpp index 28bf244984..b388117db5 100644 --- a/plugins/Dropbox/src/dropbox_utils.cpp +++ b/plugins/Dropbox/src/dropbox_utils.cpp @@ -98,26 +98,26 @@ MEVENT CDropbox::AddEventToDb(MCONTACT hContact, WORD type, DWORD flags, DWORD c void CDropbox::SendToContact(MCONTACT hContact, const wchar_t *data)
{
if (hContact == GetDefaultContact()) {
- char *message = mir_utf8encodeT(data);
+ char *message = mir_utf8encodeW(data);
AddEventToDb(hContact, EVENTTYPE_MESSAGE, DBEF_UTF, (DWORD)mir_strlen(message), (PBYTE)message);
return;
}
const char *szProto = GetContactProto(hContact);
if (db_get_b(hContact, szProto, "ChatRoom", 0) == TRUE) {
- ptrT tszChatRoom(db_get_tsa(hContact, szProto, "ChatRoomID"));
+ ptrW tszChatRoom(db_get_tsa(hContact, szProto, "ChatRoomID"));
GCDEST gcd = { szProto, tszChatRoom, GC_EVENT_SENDMESSAGE };
GCEVENT gce = { sizeof(gce), &gcd };
gce.bIsMe = TRUE;
gce.dwFlags = GCEF_ADDTOLOG;
- gce.ptszText = mir_tstrdup(data);
+ gce.ptszText = mir_wstrdup(data);
gce.time = time(NULL);
CallServiceSync(MS_GC_EVENT, WINDOW_VISIBLE, (LPARAM)&gce);
mir_free((void*)gce.ptszText);
return;
}
- char *message = mir_utf8encodeT(data);
+ char *message = mir_utf8encodeW(data);
if (ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)message) != ACKRESULT_FAILED)
AddEventToDb(hContact, EVENTTYPE_MESSAGE, DBEF_UTF | DBEF_SENT, (DWORD)mir_strlen(message), (PBYTE)message);
}
@@ -142,7 +142,7 @@ void CDropbox::PasteToClipboard(const wchar_t *data) if (OpenClipboard(NULL)) {
EmptyClipboard();
- size_t size = sizeof(wchar_t) * (mir_tstrlen(data) + 1);
+ size_t size = sizeof(wchar_t) * (mir_wstrlen(data) + 1);
HGLOBAL hClipboardData = GlobalAlloc(NULL, size);
if (hClipboardData) {
wchar_t *pchData = (wchar_t*)GlobalLock(hClipboardData);
diff --git a/plugins/Dropbox/src/file_transfer.h b/plugins/Dropbox/src/file_transfer.h index 6feacbb445..f5ef1e56fd 100644 --- a/plugins/Dropbox/src/file_transfer.h +++ b/plugins/Dropbox/src/file_transfer.h @@ -91,7 +91,7 @@ public: {
relativePathStart = wcsrchr(path, '\\') - path + 1;
pfts.tszWorkingDir = (wchar_t*)mir_calloc(sizeof(wchar_t) * relativePathStart);
- mir_tstrncpy(pfts.tszWorkingDir, path, relativePathStart);
+ mir_wstrncpy(pfts.tszWorkingDir, path, relativePathStart);
if (PathIsDirectory(path))
folderName = wcsrchr(path, '\\') + 1;
}
@@ -117,7 +117,7 @@ public: void AddFile(const wchar_t *path)
{
pfts.ptszFiles = (wchar_t**)mir_realloc(pfts.ptszFiles, sizeof(wchar_t*) * (pfts.totalFiles + 2));
- pfts.ptszFiles[pfts.totalFiles++] = mir_tstrdup(path);
+ pfts.ptszFiles[pfts.totalFiles++] = mir_wstrdup(path);
pfts.ptszFiles[pfts.totalFiles] = NULL;
FILE *file = _wfopen(path, L"rb");
|