summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IcqOscarJ')
-rw-r--r--protocols/IcqOscarJ/src/dlgproc.cpp2
-rw-r--r--protocols/IcqOscarJ/src/fam_03buddy.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_avatar.cpp24
-rw-r--r--protocols/IcqOscarJ/src/icq_filerequests.cpp4
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp8
-rw-r--r--protocols/IcqOscarJ/src/icq_servlist.cpp4
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp12
-rw-r--r--protocols/IcqOscarJ/src/icqosc_svcs.cpp6
-rw-r--r--protocols/IcqOscarJ/src/loginpassword.cpp2
-rw-r--r--protocols/IcqOscarJ/src/oscar_filetransfer.cpp4
-rw-r--r--protocols/IcqOscarJ/src/userinfotab.cpp2
11 files changed, 35 insertions, 35 deletions
diff --git a/protocols/IcqOscarJ/src/dlgproc.cpp b/protocols/IcqOscarJ/src/dlgproc.cpp
index 9a99841d22..cf1a1a8f1c 100644
--- a/protocols/IcqOscarJ/src/dlgproc.cpp
+++ b/protocols/IcqOscarJ/src/dlgproc.cpp
@@ -465,7 +465,7 @@ INT_PTR CALLBACK ChangeInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
for (done = 0, i = 0; i < _countof(dat->hUpload); i++)
done += dat->hUpload[i] == NULL;
wchar_t buf[MAX_PATH];
- mir_sntprintf(buf, TranslateT("Upload in progress...%d%%"), 100 * done / (_countof(dat->hUpload)));
+ mir_snwprintf(buf, TranslateT("Upload in progress...%d%%"), 100 * done / (_countof(dat->hUpload)));
SetDlgItemText(hwndDlg, IDC_UPLOADING, buf);
if (done < _countof(dat->hUpload)) break;
diff --git a/protocols/IcqOscarJ/src/fam_03buddy.cpp b/protocols/IcqOscarJ/src/fam_03buddy.cpp
index 4a86609b9e..f78ba6541c 100644
--- a/protocols/IcqOscarJ/src/fam_03buddy.cpp
+++ b/protocols/IcqOscarJ/src/fam_03buddy.cpp
@@ -692,7 +692,7 @@ void CIcqProto::parseStatusNote(DWORD dwUin, char *szUid, MCONTACT hContact, osc
if (getContactXStatus(hContact) != 0 || !CheckContactCapabilities(hContact, CAPF_STATUS_MESSAGES)) {
setStatusMsgVar(hContact, szStatusNote, false);
- wchar_t *tszNote = mir_utf8decodeT(szStatusNote);
+ wchar_t *tszNote = mir_utf8decodeW(szStatusNote);
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, NULL, (LPARAM)tszNote);
mir_free(tszNote);
}
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp
index 3d03ed6f43..c2cc01818e 100644
--- a/protocols/IcqOscarJ/src/icq_avatar.cpp
+++ b/protocols/IcqOscarJ/src/icq_avatar.cpp
@@ -76,7 +76,7 @@ void CIcqProto::GetFullAvatarFileName(int dwUin, const char *szUid, int dwFormat
void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, wchar_t *pszDest, size_t cbLen)
{
wchar_t szPath[MAX_PATH * 2];
- mir_sntprintf(szPath, L"%s\\%S\\", VARST(L"%miranda_avatarcache%"), m_szModuleName);
+ mir_snwprintf(szPath, L"%s\\%S\\", VARST(L"%miranda_avatarcache%"), m_szModuleName);
FOLDERSGETDATA fgd = { sizeof(fgd) };
fgd.nMaxPathSize = _countof(szPath);
@@ -84,8 +84,8 @@ void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, wchar_t *pszDest
fgd.flags = FF_TCHAR;
// fill the destination
- mir_tstrncpy(pszDest, szPath, cbLen - 1);
- size_t tPathLen = mir_tstrlen(pszDest);
+ mir_wstrncpy(pszDest, szPath, cbLen - 1);
+ size_t tPathLen = mir_wstrlen(pszDest);
// make sure the avatar cache directory exists
CreateDirectoryTreeT(szPath);
@@ -93,21 +93,21 @@ void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, wchar_t *pszDest
if (dwUin != 0)
_ltow(dwUin, pszDest + tPathLen, 10);
else if (szUid) {
- wchar_t* p = mir_a2t(szUid);
- mir_tstrcpy(pszDest + tPathLen, p);
+ wchar_t* p = mir_a2u(szUid);
+ mir_wstrcpy(pszDest + tPathLen, p);
mir_free(p);
}
else {
wchar_t szBuf[MAX_PATH];
if (CallService(MS_DB_GETPROFILENAMET, MAX_PATH, (LPARAM)szBuf))
- mir_tstrcpy(pszDest + tPathLen, L"avatar");
+ mir_wstrcpy(pszDest + tPathLen, L"avatar");
else {
wchar_t *szLastDot = wcsrchr(szBuf, '.');
if (szLastDot)
szLastDot[0] = '\0';
- mir_tstrcpy(pszDest + tPathLen, szBuf);
- mir_tstrcat(pszDest + tPathLen, L"_avt");
+ mir_wstrcpy(pszDest + tPathLen, szBuf);
+ mir_wstrcat(pszDest + tPathLen, L"_avt");
}
}
}
@@ -115,7 +115,7 @@ void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, wchar_t *pszDest
void AddAvatarExt(int dwFormat, wchar_t *pszDest)
{
const wchar_t *ext = ProtoGetAvatarExtension(dwFormat);
- mir_tstrcat(pszDest, (*ext == 0) ? L".dat" : ext);
+ mir_wstrcat(pszDest, (*ext == 0) ? L".dat" : ext);
}
#define MD5_BLOCK_SIZE 1024*1024 /* use 1MB blocks */
@@ -1159,7 +1159,7 @@ void avatars_server_connection::handleAvatarFam(BYTE *pBuffer, size_t wBufferLen
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.format = PA_FORMAT_JPEG; // this is for error only
ai.hContact = pCookieData->hContact;
- mir_tstrncpy(ai.filename, pCookieData->szFile, _countof(ai.filename));
+ mir_wstrncpy(ai.filename, pCookieData->szFile, _countof(ai.filename));
AddAvatarExt(PA_FORMAT_JPEG, ai.filename);
ppro->FreeCookie(pSnacHeader->dwRef);
@@ -1212,11 +1212,11 @@ void avatars_server_connection::handleAvatarFam(BYTE *pBuffer, size_t wBufferLen
const wchar_t *ptszExt;
int dwPaFormat = ProtoGetBufferFormat(pBuffer, &ptszExt);
wchar_t tszImageFile[MAX_PATH];
- mir_sntprintf(tszImageFile, L"%s%s", pCookieData->szFile, ptszExt);
+ mir_snwprintf(tszImageFile, L"%s%s", pCookieData->szFile, ptszExt);
ppro->setByte(pCookieData->hContact, "AvatarType", (BYTE)dwPaFormat);
ai.format = dwPaFormat; // set the format
- mir_tstrncpy(ai.filename, tszImageFile, _countof(ai.filename));
+ mir_wstrncpy(ai.filename, tszImageFile, _countof(ai.filename));
int out = _wopen(tszImageFile, _O_BINARY | _O_CREAT | _O_TRUNC | _O_WRONLY, _S_IREAD | _S_IWRITE);
if (out != -1) {
diff --git a/protocols/IcqOscarJ/src/icq_filerequests.cpp b/protocols/IcqOscarJ/src/icq_filerequests.cpp
index e993445c08..93382f6b04 100644
--- a/protocols/IcqOscarJ/src/icq_filerequests.cpp
+++ b/protocols/IcqOscarJ/src/icq_filerequests.cpp
@@ -152,13 +152,13 @@ void CIcqProto::handleFileRequest(PBYTE buf, DWORD dwUin, DWORD dwCookie, DWORD
ft->bEmptyDesc = bEmptyDesc;
// Send chain event
- wchar_t* ptszFileName = mir_utf8decodeT(pszFileName);
+ wchar_t* ptszFileName = mir_utf8decodeW(pszFileName);
PROTORECVFILET pre = { 0 };
pre.dwFlags = PRFF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.descr.w = mir_utf8decodeT(pszDescription);
+ pre.descr.w = mir_utf8decodeW(pszDescription);
pre.files.w = &ptszFileName;
pre.lParam = (LPARAM)ft;
ProtoChainRecvFile(hContact, &pre);
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index 7843f50a10..0c755f0d79 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -158,7 +158,7 @@ CIcqProto::CIcqProto(const char* aProtoName, const wchar_t* aUserName) :
// Register netlib users
NETLIBUSER nlu = { 0 };
wchar_t szBuffer[MAX_PATH + 64];
- mir_sntprintf(szBuffer, TranslateT("%s server connection"), m_tszUserName);
+ mir_snwprintf(szBuffer, TranslateT("%s server connection"), m_tszUserName);
nlu.cbSize = sizeof(nlu);
nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
nlu.ptszDescriptiveName = szBuffer;
@@ -173,7 +173,7 @@ CIcqProto::CIcqProto(const char* aProtoName, const wchar_t* aUserName) :
char szP2PModuleName[MAX_PATH];
mir_snprintf(szP2PModuleName, "%sP2P", m_szModuleName);
- mir_sntprintf(szBuffer, TranslateT("%s client-to-client connections"), m_tszUserName);
+ mir_snwprintf(szBuffer, TranslateT("%s client-to-client connections"), m_tszUserName);
nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_TCHAR;
nlu.ptszDescriptiveName = szBuffer;
nlu.szSettingsModule = szP2PModuleName;
@@ -1644,7 +1644,7 @@ void __cdecl CIcqProto::GetAwayMsgThread(void *pStatusData)
setStatusMsgVar(pThreadData->hContact, pThreadData->szMessage, false);
- wchar_t *tszMsg = mir_utf8decodeT(pThreadData->szMessage);
+ wchar_t *tszMsg = mir_utf8decodeW(pThreadData->szMessage);
ProtoBroadcastAck(pThreadData->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, pThreadData->hProcess, (LPARAM)tszMsg);
mir_free(tszMsg);
@@ -1743,7 +1743,7 @@ int __cdecl CIcqProto::RecvAwayMsg(MCONTACT hContact, int, PROTORECVEVENT* evt)
{
setStatusMsgVar(hContact, evt->szMessage, false);
- wchar_t* pszMsg = mir_utf8decodeT(evt->szMessage);
+ wchar_t* pszMsg = mir_utf8decodeW(evt->szMessage);
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)evt->lParam, (LPARAM)pszMsg);
mir_free(pszMsg);
return 0;
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp
index 4c91d239ac..856c8327c9 100644
--- a/protocols/IcqOscarJ/src/icq_servlist.cpp
+++ b/protocols/IcqOscarJ/src/icq_servlist.cpp
@@ -1386,7 +1386,7 @@ int CIcqProto::getCListGroupExists(const char *szGroup)
break;
// we have found the group
- if (!mir_tstrcmp(tszGroup, tszGroupName))
+ if (!mir_wstrcmp(tszGroup, tszGroupName))
return i;
}
@@ -1396,7 +1396,7 @@ int CIcqProto::getCListGroupExists(const char *szGroup)
int CIcqProto::moveContactToCListGroup(MCONTACT hContact, const char *szGroup)
{
- MGROUP hGroup = Clist_GroupCreate(0, ptrT(mir_utf8decodeT(szGroup)));
+ MGROUP hGroup = Clist_GroupCreate(0, ptrW(mir_utf8decodeW(szGroup)));
return CallService(MS_CLIST_CONTACTCHANGEGROUP, hContact, hGroup);
}
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index ecc192ac4d..52f532436f 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -125,15 +125,15 @@ static HANDLE LoadXStatusIconLibrary(wchar_t *path, const wchar_t *sub)
wchar_t* p = wcsrchr(path, '\\');
HANDLE hLib;
- mir_tstrcpy(p, sub);
- mir_tstrcat(p, L"\\xstatus_ICQ.dll");
+ mir_wstrcpy(p, sub);
+ mir_wstrcat(p, L"\\xstatus_ICQ.dll");
if (hLib = LoadLibrary(path))
return hLib;
- mir_tstrcpy(p, sub);
- mir_tstrcat(p, L"\\xstatus_icons.dll");
+ mir_wstrcpy(p, sub);
+ mir_wstrcat(p, L"\\xstatus_icons.dll");
if (hLib = LoadLibrary(path))
return hLib;
- mir_tstrcpy(p, L"\\");
+ mir_wstrcpy(p, L"\\");
return hLib;
}
@@ -852,7 +852,7 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus)
HGENMENU hRoot;
{
wchar_t szItem[MAX_PATH + 64];
- mir_sntprintf(szItem, TranslateT("%s Custom Status"), m_tszUserName);
+ mir_snwprintf(szItem, TranslateT("%s Custom Status"), m_tszUserName);
CMenuItem mi;
mi.root = pcli->pfnGetProtocolMenu(m_szModuleName);
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
index a2c40d3b83..d8e50a1837 100644
--- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp
+++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
@@ -352,7 +352,7 @@ INT_PTR CIcqProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
GetFullAvatarFileName(dwUIN, szUID, dwPaFormat, tszFile, MAX_PATH * 2);
- mir_tstrncpy(pai->filename, tszFile, _countof(pai->filename)); // Avatar API does not support unicode :-(
+ mir_wstrncpy(pai->filename, tszFile, _countof(pai->filename)); // Avatar API does not support unicode :-(
pai->format = dwPaFormat;
if (!IsAvatarChanged(pai->hContact, dbv.pbVal, dbv.cpbVal)) { // hashes are the same
@@ -370,7 +370,7 @@ INT_PTR CIcqProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
GetAvatarFileName(dwUIN, szUID, tszFile, MAX_PATH * 2);
GetAvatarData(pai->hContact, dwUIN, szUID, dbv.pbVal, dbv.cpbVal, tszFile);
- mir_tstrncpy(pai->filename, tszFile, _countof(pai->filename)); // Avatar API does not support unicode :-(
+ mir_wstrncpy(pai->filename, tszFile, _countof(pai->filename)); // Avatar API does not support unicode :-(
db_free(&dbv);
@@ -501,7 +501,7 @@ INT_PTR CIcqProto::SetMyAvatar(WPARAM, LPARAM lParam)
GetFullAvatarFileName(0, NULL, dwPaFormat, tszMyFile, MAX_PATH);
// if not in our storage, copy
- if (mir_tstrcmp(tszFile, tszMyFile) && !CopyFile(tszFile, tszMyFile, FALSE)) {
+ if (mir_wstrcmp(tszFile, tszMyFile) && !CopyFile(tszFile, tszMyFile, FALSE)) {
debugLogA("Failed to copy our avatar to local storage.");
return -1;
}
diff --git a/protocols/IcqOscarJ/src/loginpassword.cpp b/protocols/IcqOscarJ/src/loginpassword.cpp
index 253bb1b843..8d37efc053 100644
--- a/protocols/IcqOscarJ/src/loginpassword.cpp
+++ b/protocols/IcqOscarJ/src/loginpassword.cpp
@@ -41,7 +41,7 @@ INT_PTR CALLBACK LoginPasswdDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
DWORD dwUin = ppro->getContactUin(NULL);
wchar_t pszUIN[MAX_PATH];
- mir_sntprintf(pszUIN, TranslateT("Enter a password for UIN %u:"), dwUin);
+ mir_snwprintf(pszUIN, TranslateT("Enter a password for UIN %u:"), dwUin);
SetDlgItemText(hwndDlg, IDC_INSTRUCTION, pszUIN);
SendDlgItemMessage(hwndDlg, IDC_LOGINPW, EM_LIMITTEXT, PASSWORDMAXLEN - 1, 0);
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
index be3dae1b0d..fdfa9da536 100644
--- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
+++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
@@ -497,13 +497,13 @@ void CIcqProto::handleRecvServMsgOFT(BYTE *buf, size_t wLen, DWORD dwUin, char *
mir_strcpy(szBlob + sizeof(DWORD), pszFileName);
mir_strcpy(szBlob + sizeof(DWORD) + mir_strlen(pszFileName) + 1, pszDescription);
- wchar_t* ptszFileName = mir_utf8decodeT(pszFileName);
+ wchar_t* ptszFileName = mir_utf8decodeW(pszFileName);
PROTORECVFILET pre = { 0 };
pre.dwFlags = PRFF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.descr.w = mir_utf8decodeT(pszDescription);
+ pre.descr.w = mir_utf8decodeW(pszDescription);
pre.files.w = &ptszFileName;
pre.lParam = (LPARAM)ft;
ProtoChainRecvFile(ft->hContact, &pre);
diff --git a/protocols/IcqOscarJ/src/userinfotab.cpp b/protocols/IcqOscarJ/src/userinfotab.cpp
index 207ff0fe32..25ba1d7e98 100644
--- a/protocols/IcqOscarJ/src/userinfotab.cpp
+++ b/protocols/IcqOscarJ/src/userinfotab.cpp
@@ -279,7 +279,7 @@ int CIcqProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
if (!lParam) {
wchar_t buf[200];
- mir_sntprintf(buf, TranslateT("%s Details"), m_tszUserName);
+ mir_snwprintf(buf, TranslateT("%s Details"), m_tszUserName);
odp.pwszTitle = buf;
odp.position = -1899999999;