summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
commit428bf0cbd77813a43094cb5c984436deff251936 (patch)
treed7dfa8971153d53a849e45c942be97fe5b90b7ec /protocols/IcqOscarJ
parent82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff)
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ')
-rw-r--r--protocols/IcqOscarJ/src/fam_04message.cpp4
-rw-r--r--protocols/IcqOscarJ/src/fam_0alookup.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_avatar.cpp12
-rw-r--r--protocols/IcqOscarJ/src/icq_db.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_filerequests.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_opts.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp4
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icqosc_svcs.cpp8
-rw-r--r--protocols/IcqOscarJ/src/oscar_filetransfer.cpp2
-rw-r--r--protocols/IcqOscarJ/src/userinfotab.cpp2
-rw-r--r--protocols/IcqOscarJ/src/utilities.cpp4
12 files changed, 27 insertions, 27 deletions
diff --git a/protocols/IcqOscarJ/src/fam_04message.cpp b/protocols/IcqOscarJ/src/fam_04message.cpp
index 104c7c8652..1d2b182bd9 100644
--- a/protocols/IcqOscarJ/src/fam_04message.cpp
+++ b/protocols/IcqOscarJ/src/fam_04message.cpp
@@ -947,7 +947,7 @@ void CIcqProto::handleRecvServMsgContacts(BYTE *buf, size_t wLen, DWORD dwUin, c
}
contacts[iContact] = (ICQSEARCHRESULT*)SAFE_MALLOC(sizeof(ICQSEARCHRESULT));
contacts[iContact]->hdr.cbSize = sizeof(ICQSEARCHRESULT);
- contacts[iContact]->hdr.flags = PSR_TCHAR;
+ contacts[iContact]->hdr.flags = PSR_UNICODE;
contacts[iContact]->hdr.nick.w = null_strdup(L"");
contacts[iContact]->hdr.id.w = ansi_to_tchar(szUid);
@@ -1682,7 +1682,7 @@ void CIcqProto::handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp,
for (int i = 0; i < nContacts; i++) {
isrList[i] = (ICQSEARCHRESULT*)SAFE_MALLOC(sizeof(ICQSEARCHRESULT));
isrList[i]->hdr.cbSize = sizeof(ICQSEARCHRESULT);
- isrList[i]->hdr.flags = PSR_TCHAR;
+ isrList[i]->hdr.flags = PSR_UNICODE;
if (IsStringUIN(pszMsgField[1 + i * 2])) { // icq contact
isrList[i]->uin = atoi(pszMsgField[1 + i * 2]);
if (isrList[i]->uin == 0)
diff --git a/protocols/IcqOscarJ/src/fam_0alookup.cpp b/protocols/IcqOscarJ/src/fam_0alookup.cpp
index bb37764957..909ae75838 100644
--- a/protocols/IcqOscarJ/src/fam_0alookup.cpp
+++ b/protocols/IcqOscarJ/src/fam_0alookup.cpp
@@ -92,7 +92,7 @@ void CIcqProto::handleLookupEmailReply(BYTE* buf, size_t wLen, DWORD dwCookie)
debugLogA("SNAC(0x0A,0x3): Lookup reply");
sr.hdr.cbSize = sizeof(sr);
- sr.hdr.flags = PSR_TCHAR;
+ sr.hdr.flags = PSR_UNICODE;
sr.hdr.email.w = ansi_to_tchar(pCookie->szObject);
// Syntax check, read chain
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp
index c2cc01818e..bfd2b1ee14 100644
--- a/protocols/IcqOscarJ/src/icq_avatar.cpp
+++ b/protocols/IcqOscarJ/src/icq_avatar.cpp
@@ -57,11 +57,11 @@ avatars_request::~avatars_request()
wchar_t* CIcqProto::GetOwnAvatarFileName()
{
DBVARIANT dbvFile = {DBVT_DELETED};
- if (getTString(NULL, "AvatarFile", &dbvFile))
+ if (getWString(NULL, "AvatarFile", &dbvFile))
return NULL;
wchar_t tmp[MAX_PATH * 2];
- PathToAbsoluteT(dbvFile.ptszVal, tmp);
+ PathToAbsoluteW(dbvFile.ptszVal, tmp);
db_free(&dbvFile);
return null_strdup(tmp);
@@ -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_snwprintf(szPath, L"%s\\%S\\", VARST(L"%miranda_avatarcache%"), m_szModuleName);
+ mir_snwprintf(szPath, L"%s\\%S\\", VARSW(L"%miranda_avatarcache%"), m_szModuleName);
FOLDERSGETDATA fgd = { sizeof(fgd) };
fgd.nMaxPathSize = _countof(szPath);
@@ -88,7 +88,7 @@ void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, wchar_t *pszDest
size_t tPathLen = mir_wstrlen(pszDest);
// make sure the avatar cache directory exists
- CreateDirectoryTreeT(szPath);
+ CreateDirectoryTreeW(szPath);
if (dwUin != 0)
_ltow(dwUin, pszDest + tPathLen, 10);
@@ -99,7 +99,7 @@ void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, wchar_t *pszDest
}
else {
wchar_t szBuf[MAX_PATH];
- if (CallService(MS_DB_GETPROFILENAMET, MAX_PATH, (LPARAM)szBuf))
+ if (CallService(MS_DB_GETPROFILENAMEW, MAX_PATH, (LPARAM)szBuf))
mir_wstrcpy(pszDest + tPathLen, L"avatar");
else {
wchar_t *szLastDot = wcsrchr(szBuf, '.');
@@ -1226,7 +1226,7 @@ void avatars_server_connection::handleAvatarFam(BYTE *pBuffer, size_t wBufferLen
if (!pCookieData->hContact) { // our avatar, set filename
wchar_t tmp[MAX_PATH * 2];
PathToRelativeT(tszImageFile, tmp);
- ppro->setTString(NULL, "AvatarFile", tmp);
+ ppro->setWString(NULL, "AvatarFile", tmp);
}
else { // contact's avatar set hash
DBVARIANT dbv = { DBVT_DELETED };
diff --git a/protocols/IcqOscarJ/src/icq_db.cpp b/protocols/IcqOscarJ/src/icq_db.cpp
index bafbfb8dda..938a486e08 100644
--- a/protocols/IcqOscarJ/src/icq_db.cpp
+++ b/protocols/IcqOscarJ/src/icq_db.cpp
@@ -169,7 +169,7 @@ void CIcqProto::setStatusMsgVar(MCONTACT hContact, char* szStatusMsg, bool isAns
char *oldStatusMsg = NULL;
DBVARIANT dbv;
- if (!db_get_ts(hContact, "CList", "StatusMsg", &dbv)) {
+ if (!db_get_ws(hContact, "CList", "StatusMsg", &dbv)) {
oldStatusMsg = make_utf8_string(dbv.ptszVal);
db_free(&dbv);
}
diff --git a/protocols/IcqOscarJ/src/icq_filerequests.cpp b/protocols/IcqOscarJ/src/icq_filerequests.cpp
index 93382f6b04..f1855ce4b4 100644
--- a/protocols/IcqOscarJ/src/icq_filerequests.cpp
+++ b/protocols/IcqOscarJ/src/icq_filerequests.cpp
@@ -155,7 +155,7 @@ void CIcqProto::handleFileRequest(PBYTE buf, DWORD dwUin, DWORD dwCookie, DWORD
wchar_t* ptszFileName = mir_utf8decodeW(pszFileName);
PROTORECVFILET pre = { 0 };
- pre.dwFlags = PRFF_TCHAR;
+ pre.dwFlags = PRFF_UNICODE;
pre.fileCount = 1;
pre.timestamp = time(NULL);
pre.descr.w = mir_utf8decodeW(pszDescription);
diff --git a/protocols/IcqOscarJ/src/icq_opts.cpp b/protocols/IcqOscarJ/src/icq_opts.cpp
index a767d5987a..94633b1d97 100644
--- a/protocols/IcqOscarJ/src/icq_opts.cpp
+++ b/protocols/IcqOscarJ/src/icq_opts.cpp
@@ -93,14 +93,14 @@ static INT_PTR CALLBACK DlgProcIcqOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
LoadDBCheckState(ppro, hwndDlg, IDC_KEEPALIVE, "KeepAlive", DEFAULT_KEEPALIVE_ENABLED);
SendDlgItemMessage(hwndDlg, IDC_LOGLEVEL, TBM_SETRANGE, FALSE, MAKELONG(0, 4));
SendDlgItemMessage(hwndDlg, IDC_LOGLEVEL, TBM_SETPOS, TRUE, 4 - ppro->getByte("ShowLogLevel", LOG_WARNING));
- SetDlgItemText(hwndDlg, IDC_LEVELDESCR, TranslateTS(szLogLevelDescr[4 - SendDlgItemMessage(hwndDlg, IDC_LOGLEVEL, TBM_GETPOS, 0, 0)]));
+ SetDlgItemText(hwndDlg, IDC_LEVELDESCR, TranslateW(szLogLevelDescr[4 - SendDlgItemMessage(hwndDlg, IDC_LOGLEVEL, TBM_GETPOS, 0, 0)]));
ShowDlgItem(hwndDlg, IDC_RECONNECTREQD, SW_HIDE);
LoadDBCheckState(ppro, hwndDlg, IDC_NOERRMULTI, "IgnoreMultiErrorBox", 0);
}
return TRUE;
case WM_HSCROLL:
- SetDlgItemText(hwndDlg, IDC_LEVELDESCR, TranslateTS(szLogLevelDescr[4 - SendDlgItemMessage(hwndDlg, IDC_LOGLEVEL, TBM_GETPOS, 0, 0)]));
+ SetDlgItemText(hwndDlg, IDC_LEVELDESCR, TranslateW(szLogLevelDescr[4 - SendDlgItemMessage(hwndDlg, IDC_LOGLEVEL, TBM_GETPOS, 0, 0)]));
OptDlgChanged(hwndDlg);
break;
@@ -514,7 +514,7 @@ int CIcqProto::OnOptionsInit(WPARAM wParam, LPARAM)
odp.pwszGroup = LPGENW("Network");
odp.dwInitParam = LPARAM(this);
odp.pwszTitle = m_tszUserName;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
odp.pwszTab = LPGENW("Account");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ICQ);
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index 0c755f0d79..fe362f382a 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -160,7 +160,7 @@ CIcqProto::CIcqProto(const char* aProtoName, const wchar_t* aUserName) :
wchar_t szBuffer[MAX_PATH + 64];
mir_snwprintf(szBuffer, TranslateT("%s server connection"), m_tszUserName);
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.ptszDescriptiveName = szBuffer;
nlu.szSettingsModule = m_szModuleName;
nlu.szHttpGatewayHello = "http://http.proxy.icq.com/hello";
@@ -174,7 +174,7 @@ CIcqProto::CIcqProto(const char* aProtoName, const wchar_t* aUserName) :
char szP2PModuleName[MAX_PATH];
mir_snprintf(szP2PModuleName, "%sP2P", m_szModuleName);
mir_snwprintf(szBuffer, TranslateT("%s client-to-client connections"), m_tszUserName);
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_UNICODE;
nlu.ptszDescriptiveName = szBuffer;
nlu.szSettingsModule = szP2PModuleName;
nlu.minIncomingPorts = 1;
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index 52f532436f..417541d349 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -893,7 +893,7 @@ void InitXStatusIcons()
SKINICONDESC sid = { 0 };
sid.section.a = "Protocols/" ICQ_PROTOCOL_NAME "/" LPGEN("Custom Status");
- sid.flags = SIDF_PATH_TCHAR;
+ sid.flags = SIDF_PATH_UNICODE;
sid.defaultFile.w = InitXStatusIconLibrary(lib, _countof(lib));
for (int i = 0; i < XSTATUS_COUNT; i++) {
@@ -945,13 +945,13 @@ INT_PTR CIcqProto::SetXStatusEx(WPARAM, LPARAM lParam)
if (m_bXStatusEnabled && (pData->flags & CSSF_MASK_NAME)) { // set custom status name
if (pData->flags & CSSF_UNICODE)
- setTString(DBSETTING_XSTATUS_NAME, pData->pwszName);
+ setWString(DBSETTING_XSTATUS_NAME, pData->pwszName);
else
setString(DBSETTING_XSTATUS_NAME, pData->pszName);
}
if (pData->flags & CSSF_MASK_MESSAGE) { // set custom status message
if (pData->flags & CSSF_UNICODE)
- setTString(DBSETTING_XSTATUS_MSG, pData->pwszMessage);
+ setWString(DBSETTING_XSTATUS_MSG, pData->pwszMessage);
else
setString(DBSETTING_XSTATUS_MSG, pData->pszMessage);
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
index d8e50a1837..b1ec3e8330 100644
--- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp
+++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
@@ -66,7 +66,7 @@ static int LookupDatabaseSetting(const FieldNamesItem* table, int code, DBVARIAN
}
else if (type == DBVT_WCHAR) {
WCHAR* wtext = make_unicode_string(text);
- dbv->pwszVal = mir_wstrdup(TranslateTS(wtext));
+ dbv->pwszVal = mir_wstrdup(TranslateW(wtext));
dbv->type = DBVT_WCHAR;
SAFE_FREE((void**)&wtext);
}
@@ -524,7 +524,7 @@ INT_PTR CIcqProto::SetMyAvatar(WPARAM, LPARAM lParam)
wchar_t tmp[MAX_PATH];
PathToRelativeT(tszMyFile, tmp);
- setTString(NULL, "AvatarFile", tmp);
+ setWString(NULL, "AvatarFile", tmp);
SAFE_FREE((void**)&hash);
}
else {
@@ -542,7 +542,7 @@ INT_PTR CIcqProto::SetNickName(WPARAM wParam, LPARAM lParam)
return 0; // failure
if (wParam & SMNN_UNICODE)
- setTString("Nick", (WCHAR*)lParam);
+ setWString("Nick", (WCHAR*)lParam);
else
setString("Nick", (char*)lParam);
@@ -668,7 +668,7 @@ INT_PTR icq_getEventTextMissedMessage(WPARAM, LPARAM lParam)
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, pszText, (int)mir_strlen(pszText), pwszText, wchars);
- nRetVal = (INT_PTR)mir_wstrdup(TranslateTS(pwszText));
+ nRetVal = (INT_PTR)mir_wstrdup(TranslateW(pwszText));
}
else if (pEvent->datatype == DBVT_ASCIIZ)
nRetVal = (INT_PTR)mir_strdup(Translate(pszText));
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
index fdfa9da536..5d5d480194 100644
--- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
+++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
@@ -500,7 +500,7 @@ void CIcqProto::handleRecvServMsgOFT(BYTE *buf, size_t wLen, DWORD dwUin, char *
wchar_t* ptszFileName = mir_utf8decodeW(pszFileName);
PROTORECVFILET pre = { 0 };
- pre.dwFlags = PRFF_TCHAR;
+ pre.dwFlags = PRFF_UNICODE;
pre.fileCount = 1;
pre.timestamp = time(NULL);
pre.descr.w = mir_utf8decodeW(pszDescription);
diff --git a/protocols/IcqOscarJ/src/userinfotab.cpp b/protocols/IcqOscarJ/src/userinfotab.cpp
index 25ba1d7e98..f58065619b 100644
--- a/protocols/IcqOscarJ/src/userinfotab.cpp
+++ b/protocols/IcqOscarJ/src/userinfotab.cpp
@@ -268,7 +268,7 @@ int CIcqProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
return 0;
OPTIONSDIALOGPAGE odp = { 0 };
- odp.flags = ODPF_TCHAR | ODPF_DONTTRANSLATE;
+ odp.flags = ODPF_UNICODE | ODPF_DONTTRANSLATE;
odp.hInstance = hInst;
odp.dwInitParam = LPARAM(this);
odp.pfnDlgProc = IcqDlgProc;
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp
index 3e13e9efe1..c1f05aacbb 100644
--- a/protocols/IcqOscarJ/src/utilities.cpp
+++ b/protocols/IcqOscarJ/src/utilities.cpp
@@ -1443,7 +1443,7 @@ char* __fastcall ICQTranslateUtf(const char *src)
{ // we can use unicode translate (0.5+)
WCHAR* usrc = make_unicode_string(src);
- szRes = make_utf8_string(TranslateTS(usrc));
+ szRes = make_utf8_string(TranslateW(usrc));
SAFE_FREE((void**)&usrc);
}
@@ -1455,7 +1455,7 @@ char* __fastcall ICQTranslateUtfStatic(const char *src, char *buf, size_t bufsiz
if (mir_strlen(src)) { // we can use unicode translate (0.5+)
WCHAR *usrc = make_unicode_string(src);
- make_utf8_string_static(TranslateTS(usrc), buf, bufsize);
+ make_utf8_string_static(TranslateW(usrc), buf, bufsize);
SAFE_FREE((void**)&usrc);
}