summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/src
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
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')
-rw-r--r--protocols/AimOscar/src/aim.cpp2
-rw-r--r--protocols/AimOscar/src/avatars.cpp10
-rw-r--r--protocols/AimOscar/src/chat.cpp18
-rw-r--r--protocols/AimOscar/src/conv.cpp2
-rw-r--r--protocols/AimOscar/src/file.cpp14
-rw-r--r--protocols/AimOscar/src/links.cpp8
-rw-r--r--protocols/AimOscar/src/popup.cpp10
-rw-r--r--protocols/AimOscar/src/proto.cpp20
-rw-r--r--protocols/AimOscar/src/server.cpp14
-rwxr-xr-xprotocols/AimOscar/src/ui.cpp6
-rwxr-xr-xprotocols/AimOscar/src/utility.cpp10
11 files changed, 57 insertions, 57 deletions
diff --git a/protocols/AimOscar/src/aim.cpp b/protocols/AimOscar/src/aim.cpp
index d9cbc9b6de..9172347766 100644
--- a/protocols/AimOscar/src/aim.cpp
+++ b/protocols/AimOscar/src/aim.cpp
@@ -30,7 +30,7 @@ HINSTANCE hInstance;
// Protocol instances
static int sttCompareProtocols(const CAimProto *p1, const CAimProto *p2)
{
- return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_wstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<CAimProto> g_Instances(1, sttCompareProtocols);
diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp
index ec3b7c3812..9a8a160503 100644
--- a/protocols/AimOscar/src/avatars.cpp
+++ b/protocols/AimOscar/src/avatars.cpp
@@ -118,7 +118,7 @@ void CAimProto::avatar_retrieval_handler(const char* sn, const char* /*hash*/, c
int CAimProto::get_avatar_filename(MCONTACT hContact, wchar_t* pszDest, size_t cbLen, const wchar_t *ext)
{
- int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
+ int tPathLen = mir_snwprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
if (ext && _waccess(pszDest, 0))
CreateDirectoryTreeT(pszDest);
@@ -127,19 +127,19 @@ int CAimProto::get_avatar_filename(MCONTACT hContact, wchar_t* pszDest, size_t c
DBVARIANT dbv;
if (getTString(hContact, AIM_KEY_AH, &dbv)) return GAIR_NOAVATAR;
- tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", dbv.ptszVal);
+ tPathLen += mir_snwprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", dbv.ptszVal);
db_free(&dbv);
bool found = false;
if (ext == NULL) {
- mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L".*");
+ mir_snwprintf(pszDest + tPathLen, cbLen - tPathLen, L".*");
_tfinddata_t c_file;
long hFile = _tfindfirst(pszDest, &c_file);
if (hFile > -1L) {
do {
if (wcsrchr(c_file.name, '.')) {
- mir_sntprintf(pszDest + tPathLen2, cbLen - tPathLen2, L"\\%s", c_file.name);
+ mir_snwprintf(pszDest + tPathLen2, cbLen - tPathLen2, L"\\%s", c_file.name);
found = true;
}
} while (_tfindnext(hFile, &c_file) == 0);
@@ -149,7 +149,7 @@ int CAimProto::get_avatar_filename(MCONTACT hContact, wchar_t* pszDest, size_t c
if (!found) pszDest[0] = 0;
}
else {
- mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, ext);
+ mir_snwprintf(pszDest + tPathLen, cbLen - tPathLen, ext);
found = _waccess(pszDest, 0) == 0;
}
diff --git a/protocols/AimOscar/src/chat.cpp b/protocols/AimOscar/src/chat.cpp
index dcc0d9449e..40a59adea1 100644
--- a/protocols/AimOscar/src/chat.cpp
+++ b/protocols/AimOscar/src/chat.cpp
@@ -36,7 +36,7 @@ void CAimProto::chat_register(void)
void CAimProto::chat_start(const char* id, unsigned short exchange)
{
- wchar_t *idt = mir_a2t(id);
+ wchar_t *idt = mir_a2u(id);
GCSESSION gcw = { sizeof(gcw) };
gcw.iType = GCW_CHATROOM;
@@ -66,8 +66,8 @@ void CAimProto::chat_start(const char* id, unsigned short exchange)
void CAimProto::chat_event(const char* id, const char* sn, int evt, const wchar_t* msg)
{
- wchar_t *idt = mir_a2t(id);
- wchar_t *snt = mir_a2t(sn);
+ wchar_t *idt = mir_a2u(id);
+ wchar_t *snt = mir_a2u(sn);
MCONTACT hContact = contact_from_sn(sn);
wchar_t *nick = hContact ? (wchar_t*)pcli->pfnGetContactDisplayName(
@@ -91,7 +91,7 @@ void CAimProto::chat_event(const char* id, const char* sn, int evt, const wchar_
void CAimProto::chat_leave(const char* id)
{
- wchar_t *idt = mir_a2t(id);
+ wchar_t *idt = mir_a2u(id);
GCDEST gcd = { m_szModuleName, idt, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
@@ -110,7 +110,7 @@ int CAimProto::OnGCEvent(WPARAM, LPARAM lParam)
if (mir_strcmp(gch->pDest->pszModule, m_szModuleName)) return 0;
- char *id = mir_t2a(gch->pDest->ptszID);
+ char *id = mir_u2a(gch->pDest->ptszID);
chat_list_item* item = find_chat_by_id(id);
if (item == NULL) return 0;
@@ -122,7 +122,7 @@ int CAimProto::OnGCEvent(WPARAM, LPARAM lParam)
break;
case GC_USER_MESSAGE:
- if (gch->ptszText && mir_tstrlen(gch->ptszText))
+ if (gch->ptszText && mir_wstrlen(gch->ptszText))
aim_chat_send_message(item->hconn, item->seqno, T2Utf(gch->ptszText));
break;
@@ -133,7 +133,7 @@ int CAimProto::OnGCEvent(WPARAM, LPARAM lParam)
case GC_USER_PRIVMESS:
{
- char* sn = mir_t2a(gch->ptszUID);
+ char* sn = mir_u2a(gch->ptszUID);
MCONTACT hContact = contact_from_sn(sn);
mir_free(sn);
CallService(MS_MSG_SENDMESSAGE, hContact, 0);
@@ -155,7 +155,7 @@ int CAimProto::OnGCEvent(WPARAM, LPARAM lParam)
case GC_USER_NICKLISTMENU:
{
- char *sn = mir_t2a(gch->ptszUID);
+ char *sn = mir_u2a(gch->ptszUID);
MCONTACT hContact = contact_from_sn(sn);
mir_free(sn);
@@ -198,7 +198,7 @@ int CAimProto::OnGCMenuHook(WPARAM, LPARAM lParam)
gcmi->Item = (gc_item*)Items;
}
else if (gcmi->Type == MENU_ON_NICKLIST) {
- char* sn = mir_t2a(gcmi->pszUID);
+ char* sn = mir_u2a(gcmi->pszUID);
if (!mir_strcmp(m_username, sn)) {
static const struct gc_item Items[] = {
{ TranslateT("User &details"), 10, MENU_ITEM, FALSE },
diff --git a/protocols/AimOscar/src/conv.cpp b/protocols/AimOscar/src/conv.cpp
index a2e3420b2e..ca36a38663 100644
--- a/protocols/AimOscar/src/conv.cpp
+++ b/protocols/AimOscar/src/conv.cpp
@@ -726,7 +726,7 @@ char* get_fname(char *path)
wchar_t* get_dir(wchar_t *path)
{
- wchar_t *cpath = mir_tstrdup(path);
+ wchar_t *cpath = mir_wstrdup(path);
wchar_t *swd = wcsrchr(cpath, '\\');
if (swd) swd[1] = 0; else cpath[0] = 0;
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))
diff --git a/protocols/AimOscar/src/links.cpp b/protocols/AimOscar/src/links.cpp
index ea50d67c58..d759679d9f 100644
--- a/protocols/AimOscar/src/links.cpp
+++ b/protocols/AimOscar/src/links.cpp
@@ -92,9 +92,9 @@ static INT_PTR ServiceParseAimLink(WPARAM, LPARAM lParam)
tok2 = wcschr(++tok, '&'); /* first token */
if (tok2) *tok2 = 0;
if (!wcsnicmp(tok, L"screenname=", 11) && *(tok + 11) != 0)
- sn = mir_t2a(url_decode(tok + 11));
+ sn = mir_u2a(url_decode(tok + 11));
if (!wcsnicmp(tok, L"groupname=", 10) && *(tok + 10) != 0)
- group = mir_utf8encodeT(url_decode(tok + 10)); /* group is currently ignored */
+ group = mir_utf8encodeW(url_decode(tok + 10)); /* group is currently ignored */
}
if (sn == NULL) {
mir_free(group);
@@ -119,7 +119,7 @@ static INT_PTR ServiceParseAimLink(WPARAM, LPARAM lParam)
tok2 = wcschr(++tok, '&'); /* first token */
if (tok2) *tok2 = 0;
if (!wcsnicmp(tok, L"screenname=", 11) && *(tok + 11) != 0)
- sn = mir_t2a(url_decode(tok + 11));
+ sn = mir_u2a(url_decode(tok + 11));
if (!wcsnicmp(tok, L"message=", 8) && *(tok + 8) != 0)
msg = url_decode(tok + 8);
}
@@ -143,7 +143,7 @@ static INT_PTR ServiceParseAimLink(WPARAM, LPARAM lParam)
tok2 = wcschr(++tok, '&'); /* first token */
if (tok2) *tok2 = 0;
if (!wcsnicmp(tok, L"roomname=", 9) && *(tok + 9) != 0) {
- rm = mir_t2a(url_decode(tok + 9));
+ rm = mir_u2a(url_decode(tok + 9));
for (char *ch = rm; *ch; ++ch)
if (*ch == '+') *ch = ' ';
}
diff --git a/protocols/AimOscar/src/popup.cpp b/protocols/AimOscar/src/popup.cpp
index 8747508724..7e52cd572c 100644
--- a/protocols/AimOscar/src/popup.cpp
+++ b/protocols/AimOscar/src/popup.cpp
@@ -65,13 +65,13 @@ void CAimProto::ShowPopup(const char* msg, int flags, char* url)
{
POPUPDATAT ppd = {0};
- mir_sntprintf(ppd.lptzContactName, TranslateT("%s Protocol"), m_tszUserName);
+ mir_snwprintf(ppd.lptzContactName, TranslateT("%s Protocol"), m_tszUserName);
if (flags & ERROR_POPUP)
{
if (flags & TCHAR_POPUP)
{
- char* errmsg = mir_t2a((wchar_t*)msg);
+ char* errmsg = mir_u2a((wchar_t*)msg);
debugLogA(errmsg);
mir_free(errmsg);
}
@@ -79,7 +79,7 @@ void CAimProto::ShowPopup(const char* msg, int flags, char* url)
debugLogA(msg);
}
- wchar_t *msgt = (flags & TCHAR_POPUP) ? mir_tstrdup((wchar_t*)msg) : mir_a2t(msg);
+ wchar_t *msgt = (flags & TCHAR_POPUP) ? mir_wstrdup((wchar_t*)msg) : mir_a2u(msg);
wcsncpy_s(ppd.lptzText, TranslateTS(msgt), _TRUNCATE);
mir_free(msgt);
@@ -87,8 +87,8 @@ void CAimProto::ShowPopup(const char* msg, int flags, char* url)
{
if (flags & MAIL_POPUP)
{
- size_t len = mir_tstrlen(ppd.lptzText);
- mir_sntprintf(&ppd.lptzText[len], _countof(ppd.lptzText) - len, L" %s", TranslateT("Open mail account?"));
+ size_t len = mir_wstrlen(ppd.lptzText);
+ mir_snwprintf(&ppd.lptzText[len], _countof(ppd.lptzText) - len, L" %s", TranslateT("Open mail account?"));
if (MessageBox(NULL, ppd.lptzText, ppd.lptzContactName, MB_YESNO | MB_ICONINFORMATION) == IDYES)
ShellExecuteA(NULL, "open", url, NULL, NULL, SW_SHOW);
}
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp
index a198c04b63..0a1f2e9e35 100644
--- a/protocols/AimOscar/src/proto.cpp
+++ b/protocols/AimOscar/src/proto.cpp
@@ -52,14 +52,14 @@ CAimProto::CAimProto(const char* aProtoName, const wchar_t* aUserName) :
nlu.cbSize = sizeof(nlu);
nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
nlu.szSettingsModule = m_szModuleName;
- mir_sntprintf(descr, TranslateT("%s server connection"), m_tszUserName);
+ mir_snwprintf(descr, TranslateT("%s server connection"), m_tszUserName);
nlu.ptszDescriptiveName = descr;
m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
char szP2P[128];
mir_snprintf(szP2P, "%sP2P", m_szModuleName);
nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_TCHAR;
- mir_sntprintf(descr, TranslateT("%s client-to-client connections"), m_tszUserName);
+ mir_snwprintf(descr, TranslateT("%s client-to-client connections"), m_tszUserName);
nlu.szSettingsModule = szP2P;
nlu.minIncomingPorts = 1;
m_hNetlibPeer = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
@@ -155,7 +155,7 @@ HANDLE __cdecl CAimProto::FileAllow(MCONTACT, HANDLE hTransfer, const wchar_t *s
{
file_transfer *ft = (file_transfer*)hTransfer;
if (ft && m_ft_list.find_by_ft(ft)) {
- char *path = mir_utf8encodeT(szPath);
+ char *path = mir_utf8encodeW(szPath);
if (ft->pfts.totalFiles > 1 && ft->file[0]) {
size_t path_len = mir_strlen(path);
@@ -231,7 +231,7 @@ int __cdecl CAimProto::FileResume(HANDLE hTransfer, int* action, const wchar_t**
case FILERESUME_RENAME:
mir_free(ft->pfts.tszCurrentFile);
- ft->pfts.tszCurrentFile = mir_tstrdup(*szFilename);
+ ft->pfts.tszCurrentFile = mir_wstrdup(*szFilename);
break;
case FILERESUME_OVERWRITE:
@@ -321,7 +321,7 @@ HANDLE __cdecl CAimProto::SearchBasic(const wchar_t *szId)
return 0;
//duplicating the parameter so that it isn't deleted before it's needed- e.g. this function ends before it's used
- ForkThread(&CAimProto::basic_search_ack_success, mir_t2a(szId));
+ ForkThread(&CAimProto::basic_search_ack_success, mir_u2a(szId));
return (HANDLE)1;
}
@@ -331,10 +331,10 @@ HANDLE __cdecl CAimProto::SearchBasic(const wchar_t *szId)
HANDLE __cdecl CAimProto::SearchByEmail(const wchar_t *email)
{
// Maximum email size should really be 320, but the char string is limited to 255.
- if (m_state != 1 || email == NULL || mir_tstrlen(email) >= 254)
+ if (m_state != 1 || email == NULL || mir_wstrlen(email) >= 254)
return NULL;
- char *szEmail = mir_t2a(email);
+ char *szEmail = mir_u2a(email);
aim_search_by_email(m_hServerConn, m_seqno, szEmail);
mir_free(szEmail);
return (HANDLE)1;
@@ -396,9 +396,9 @@ HANDLE __cdecl CAimProto::SendFile(MCONTACT hContact, const wchar_t* szDescripti
ft->pfts.flags |= PFTS_SENDING;
ft->pfts.ptszFiles = ppszFiles;
- ft->file = ft->pfts.totalFiles == 1 || isDir ? mir_utf8encodeT(ppszFiles[0]) : (char*)mir_calloc(1);
+ ft->file = ft->pfts.totalFiles == 1 || isDir ? mir_utf8encodeW(ppszFiles[0]) : (char*)mir_calloc(1);
ft->sending = true;
- ft->message = szDescription[0] ? mir_utf8encodeT(szDescription) : NULL;
+ ft->message = szDescription[0] ? mir_utf8encodeW(szDescription) : NULL;
ft->me_force_proxy = getByte(AIM_KEY_FP, 0) != 0;
ft->requester = true;
@@ -598,7 +598,7 @@ int __cdecl CAimProto::SetAwayMsg(int status, const wchar_t* msg)
char **msgptr = get_status_msg_loc(status);
if (msgptr == NULL) return 1;
- char *nmsg = mir_utf8encodeT(msg);
+ char *nmsg = mir_utf8encodeW(msg);
mir_free(*msgptr); *msgptr = nmsg;
switch (status) {
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp
index 34bc6151e2..db3679447b 100644
--- a/protocols/AimOscar/src/server.cpp
+++ b/protocols/AimOscar/src/server.cpp
@@ -487,7 +487,7 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003
char* msg_s = process_status_msg(msg, sn);
db_set_utf(hContact, MOD_KEY_CL, OTH_KEY_SM, msg_s);
- wchar_t* tszMsg = mir_utf8decodeT(msg_s);
+ wchar_t* tszMsg = mir_utf8decodeW(msg_s);
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, NULL, (LPARAM)tszMsg);
mir_free(tszMsg);
mir_free(msg);
@@ -1247,13 +1247,13 @@ void CAimProto::snac_received_message(SNAC &snac, HANDLE hServerConn, unsigned s
if (!descr_included) msg_buf = NULL;
- wchar_t* filenameT = mir_utf8decodeT(filename);
+ wchar_t* filenameT = mir_utf8decodeW(filename);
PROTORECVFILET pre = { 0 };
pre.dwFlags = PRFF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.descr.w = mir_utf8decodeT(msg_buf);
+ pre.descr.w = mir_utf8decodeW(msg_buf);
pre.files.w = &filenameT;
pre.lParam = (LPARAM)ft;
ProtoChainRecvFile(hContact, &pre);
@@ -1661,7 +1661,7 @@ void CAimProto::snac_mail_response(SNAC &snac)//family 0x0018
if (new_mail && num_msgs) {
wchar_t msg[1024];
- int len = mir_sntprintf(msg, L"%S@%S (%d)\r\n%s ", sn, address, num_msgs,
+ int len = mir_snwprintf(msg, L"%S@%S (%d)\r\n%s ", sn, address, num_msgs,
TranslateT("You've got mail! Checked at"));
SYSTEMTIME stLocal;
@@ -1864,19 +1864,19 @@ void CAimProto::snac_chat_received_message(SNAC &snac, chat_list_item* item)//fa
if (uni) {
char* msg = msg_tlv.dupw();
html_decode(msg);
- message = mir_utf8decodeT(msg);
+ message = mir_utf8decodeW(msg);
mir_free(msg);
}
else if (utf) {
char* msg = msg_tlv.dup();
html_decode(msg);
- message = mir_utf8decodeT(msg);
+ message = mir_utf8decodeW(msg);
mir_free(msg);
}
else {
char* msg = msg_tlv.dup();
html_decode(msg);
- message = mir_a2t(msg);
+ message = mir_a2u(msg);
mir_free(msg);
}
}
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp
index ee833e6eee..71ebfb2e10 100755
--- a/protocols/AimOscar/src/ui.cpp
+++ b/protocols/AimOscar/src/ui.cpp
@@ -105,7 +105,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L
cf.cbSize = sizeof(cf);
cf.yHeight = 12 * 20;
cf.dwMask = CFM_SIZE | CFM_FACE;
- mir_tstrcpy(cf.szFaceName, TEXT("Arial"));
+ mir_wstrcpy(cf.szFaceName, TEXT("Arial"));
SendDlgItemMessage(hwndDlg, IDC_PROFILE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
}
else {
@@ -190,7 +190,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L
DBVARIANT dbv;
if (!db_get_utf(NULL, ppro->m_szModuleName, AIM_KEY_PR, &dbv)) {
html_decode(dbv.pszVal);
- wchar_t *txt = mir_utf8decodeT(dbv.pszVal);
+ wchar_t *txt = mir_utf8decodeW(dbv.pszVal);
SetDlgItemText(hwndDlg, IDC_PROFILE, txt);
mir_free(txt);
db_free(&dbv);
@@ -1270,7 +1270,7 @@ static void clist_chat_invite_send(MCONTACT hItem, HWND hwndList, chat_list_item
wchar_t buf[128] = L"";
SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf);
- char *sn = mir_t2a(buf);
+ char *sn = mir_u2a(buf);
ppro->aim_chat_invite(ppro->m_hServerConn, ppro->m_seqno,
item->cookie, item->exchange, item->instance, sn, msg);
mir_free(sn);
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp
index 247d8bd3fa..10a18ba5af 100755
--- a/protocols/AimOscar/src/utility.cpp
+++ b/protocols/AimOscar/src/utility.cpp
@@ -363,7 +363,7 @@ void create_group(const char *group)
{
if (mir_strcmp(group, AIM_DEFAULT_GROUP) == 0) return;
- wchar_t* szGroupName = mir_utf8decodeT(group);
+ wchar_t* szGroupName = mir_utf8decodeW(group);
Clist_GroupCreate(0, szGroupName);
mir_free(szGroupName);
}
@@ -533,18 +533,18 @@ int CAimProto::open_contact_file(const char*, const wchar_t* file, const char*,
{
path = (wchar_t*)mir_alloc(MAX_PATH * sizeof(wchar_t));
- int pos = mir_sntprintf(path, MAX_PATH, L"%s\\%S", VARST(L"%miranda_userdata%"), m_szModuleName);
+ int pos = mir_snwprintf(path, MAX_PATH, L"%s\\%S", VARST(L"%miranda_userdata%"), m_szModuleName);
if (contact_dir)
- pos += mir_sntprintf(path + pos, MAX_PATH - pos, L"\\%S", m_szModuleName);
+ pos += mir_snwprintf(path + pos, MAX_PATH - pos, L"\\%S", m_szModuleName);
if (_waccess(path, 0))
CreateDirectoryTreeT(path);
- mir_sntprintf(path + pos, MAX_PATH - pos, L"\\%s", file);
+ mir_snwprintf(path + pos, MAX_PATH - pos, L"\\%s", file);
int fid = _wopen(path, _O_CREAT | _O_RDWR | _O_BINARY, _S_IREAD);
if (fid < 0) {
wchar_t errmsg[512];
- mir_sntprintf(errmsg, TranslateT("Failed to open file: %s %s"), path, __tcserror(NULL));
+ mir_snwprintf(errmsg, TranslateT("Failed to open file: %s %s"), path, __tcserror(NULL));
ShowPopup((char*)errmsg, ERROR_POPUP | TCHAR_POPUP);
}
return fid;