summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/clisttray.cpp6
-rw-r--r--src/mir_app/src/db_events.cpp20
-rw-r--r--src/mir_app/src/db_ini.cpp2
-rw-r--r--src/mir_app/src/netlibbind.cpp2
-rw-r--r--src/mir_app/src/netlibopenconn.cpp2
-rw-r--r--src/mir_app/src/options.cpp2
-rw-r--r--src/mir_app/src/profilemanager.cpp2
-rw-r--r--src/mir_app/src/proto_opts.cpp6
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp4
-rw-r--r--src/mir_core/src/winver.cpp2
10 files changed, 24 insertions, 24 deletions
diff --git a/src/mir_app/src/clisttray.cpp b/src/mir_app/src/clisttray.cpp
index 2277ea364f..d9118001c7 100644
--- a/src/mir_app/src/clisttray.cpp
+++ b/src/mir_app/src/clisttray.cpp
@@ -112,7 +112,7 @@ MIR_APP_DLL(wchar_t*) Clist_TrayIconMakeTooltip(const wchar_t *szPrefix, const c
if (ProtoXStatus != nullptr) {
if (!tszTip.IsEmpty())
tszTip.AppendChar('\n');
- tszTip.AppendFormat(L"%-24.24s\n", ProtoXStatus);
+ tszTip.AppendFormat(L"%-24.24s\n", ProtoXStatus.get());
}
}
else tszTip.AppendFormat(L"%s %s", pa->tszAccountName, szStatus);
@@ -129,7 +129,7 @@ MIR_APP_DLL(wchar_t*) Clist_TrayIconMakeTooltip(const wchar_t *szPrefix, const c
if (db_get_b(0, "CList", "AlwaysStatus", SETTING_ALWAYSSTATUS_DEFAULT)) {
if (hasTips()) {
if (ProtoXStatus != nullptr)
- mir_snwprintf(g_clistApi.szTip, MAX_TIP_SIZE, L"%s%s<b>%-12.12s</b>\t%s%s%-24.24s", szPrefix, szSeparator, pa->tszAccountName, szStatus, szSeparator, ProtoXStatus);
+ mir_snwprintf(g_clistApi.szTip, MAX_TIP_SIZE, L"%s%s<b>%-12.12s</b>\t%s%s%-24.24s", szPrefix, szSeparator, pa->tszAccountName, szStatus, szSeparator, ProtoXStatus.get());
else
mir_snwprintf(g_clistApi.szTip, MAX_TIP_SIZE, L"%s%s<b>%-12.12s</b>\t%s", szPrefix, szSeparator, pa->tszAccountName, szStatus);
}
@@ -140,7 +140,7 @@ MIR_APP_DLL(wchar_t*) Clist_TrayIconMakeTooltip(const wchar_t *szPrefix, const c
else {
if (hasTips()) {
if (ProtoXStatus != nullptr)
- mir_snwprintf(g_clistApi.szTip, MAX_TIP_SIZE, L"<b>%-12.12s</b>\t%s\n%-24.24s", pa->tszAccountName, szStatus, ProtoXStatus);
+ mir_snwprintf(g_clistApi.szTip, MAX_TIP_SIZE, L"<b>%-12.12s</b>\t%s\n%-24.24s", pa->tszAccountName, szStatus, ProtoXStatus.get());
else
mir_snwprintf(g_clistApi.szTip, MAX_TIP_SIZE, L"<b>%-12.12s</b>\t%s", pa->tszAccountName, szStatus);
}
diff --git a/src/mir_app/src/db_events.cpp b/src/mir_app/src/db_events.cpp
index 67e4e3b526..b4301ce4e6 100644
--- a/src/mir_app/src/db_events.cpp
+++ b/src/mir_app/src/db_events.cpp
@@ -120,7 +120,7 @@ static INT_PTR DbEventGetTextWorker(DBEVENTINFO *dbei, int codepage, int datatyp
CMStringW nick, text;
if (tszFirst || tszLast) {
- nick.AppendFormat(L"%s %s", tszFirst, tszLast);
+ nick.AppendFormat(L"%s %s", tszFirst.get(), tszLast.get());
nick.Trim();
}
if (tszEmail) {
@@ -139,10 +139,10 @@ static INT_PTR DbEventGetTextWorker(DBEVENTINFO *dbei, int codepage, int datatyp
if (dbei->eventType == EVENTTYPE_AUTHREQUEST) {
ptrW tszReason(dbei->getString(blob.get_reason()));
text.Format(TranslateT("Authorization request from %s%s: %s"),
- (tszNick == nullptr) ? Clist_GetContactDisplayName(blob.get_contact()) : tszNick, nick.c_str(), tszReason);
+ (tszNick == nullptr) ? Clist_GetContactDisplayName(blob.get_contact()) : tszNick.get(), nick.c_str(), tszReason.get());
}
else text.Format(TranslateT("You were added by %s%s"),
- (tszNick == nullptr) ? Clist_GetContactDisplayName(blob.get_contact()) : tszNick, nick.c_str());
+ (tszNick == nullptr) ? Clist_GetContactDisplayName(blob.get_contact()) : tszNick.get(), nick.c_str());
return (datatype == DBVT_WCHAR) ? (INT_PTR)mir_wstrdup(text) : (INT_PTR)mir_u2a(text);
}
@@ -154,9 +154,9 @@ static INT_PTR DbEventGetTextWorker(DBEVENTINFO *dbei, int codepage, int datatyp
ptrW tszUin(getEventString(dbei, buf));
ptrW tszNick(getEventString(dbei, buf));
if (tszNick && *tszNick)
- text.AppendFormat(L"\"%s\" ", tszNick);
+ text.AppendFormat(L"\"%s\" ", tszNick.get());
if (tszUin && *tszUin)
- text.AppendFormat(L"<%s>; ", tszUin);
+ text.AppendFormat(L"<%s>; ", tszUin.get());
}
return (datatype == DBVT_WCHAR) ? (INT_PTR)mir_wstrdup(text) : (INT_PTR)mir_u2a(text);
}
@@ -305,11 +305,11 @@ PBYTE DB_AUTH_BLOB::makeBlob()
pCurBlob += sizeof(DWORD);
mir_snprintf((char*)pCurBlob, m_size - 8, "%s%c%s%c%s%c%s%c%s%c",
- (m_szNick) ? m_szNick : "", 0,
- (m_szFirstName) ? m_szFirstName : "", 0,
- (m_szLastName) ? m_szLastName : "", 0,
- (m_szEmail) ? m_szEmail : "", 0,
- (m_szReason) ? m_szReason : "", 0);
+ (m_szNick) ? m_szNick.get() : "", 0,
+ (m_szFirstName) ? m_szFirstName.get() : "", 0,
+ (m_szLastName) ? m_szLastName.get() : "", 0,
+ (m_szEmail) ? m_szEmail.get() : "", 0,
+ (m_szReason) ? m_szReason.get() : "", 0);
return pBlob;
}
diff --git a/src/mir_app/src/db_ini.cpp b/src/mir_app/src/db_ini.cpp
index cfc2ab0427..2113837ce0 100644
--- a/src/mir_app/src/db_ini.cpp
+++ b/src/mir_app/src/db_ini.cpp
@@ -481,7 +481,7 @@ LBL_NewLine:
break;
default:
wchar_t buf[250];
- mir_snwprintf(buf, TranslateT("Invalid setting type for '%s'. The first character of every value must be b, w, d, l, s, e, u, g, h or n."), _A2T(szName));
+ mir_snwprintf(buf, TranslateT("Invalid setting type for '%s'. The first character of every value must be b, w, d, l, s, e, u, g, h or n."), _A2T(szName).get());
MessageBox(nullptr, buf, TranslateT("Install database settings"), MB_ICONWARNING | MB_OK);
break;
}
diff --git a/src/mir_app/src/netlibbind.cpp b/src/mir_app/src/netlibbind.cpp
index ca551c20e1..4f39d7d9c2 100644
--- a/src/mir_app/src/netlibbind.cpp
+++ b/src/mir_app/src/netlibbind.cpp
@@ -166,7 +166,7 @@ static void __cdecl NetlibBindAcceptThread(NetlibBoundPort *nlbp)
}
else s = 0;
- Netlib_Logf(nlbp->nlu, "New incoming connection on port %u from %s (%p)", nlbp->wPort, ptrA(Netlib_AddressToString(&sin)), (void*)s);
+ Netlib_Logf(nlbp->nlu, "New incoming connection on port %u from %s (%p)", nlbp->wPort, ptrA(Netlib_AddressToString(&sin)).get(), (void*)s);
NetlibConnection *nlc = new NetlibConnection();
nlc->nlu = nlbp->nlu;
diff --git a/src/mir_app/src/netlibopenconn.cpp b/src/mir_app/src/netlibopenconn.cpp
index 80faef277c..ee4bb5d996 100644
--- a/src/mir_app/src/netlibopenconn.cpp
+++ b/src/mir_app/src/netlibopenconn.cpp
@@ -550,7 +550,7 @@ static bool my_connectIPv6(NetlibConnection *nlc, NETLIBOPENCONNECTION *nloc)
}
for (ai = air; ai && !Miranda_IsTerminated(); ai = ai->ai_next) {
- Netlib_Logf(nlu, "(%p) Connecting to ip %s ....", nlc, ptrA(Netlib_AddressToString((sockaddr_in*)ai->ai_addr)));
+ Netlib_Logf(nlu, "(%p) Connecting to ip %s ....", nlc, ptrA(Netlib_AddressToString((sockaddr_in*)ai->ai_addr)).get());
retry:
nlc->s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (nlc->s == INVALID_SOCKET) {
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp
index cbd2dbc969..e935a6b702 100644
--- a/src/mir_app/src/options.cpp
+++ b/src/mir_app/src/options.cpp
@@ -411,7 +411,7 @@ class COptionsDlg : public CDlgBase
void GetTreeSettingName(int idx, char *buf, size_t bufSize)
{
- mir_snprintf(buf, bufSize, "%s%S", OPTSTATE_PREFIX, (idx < 0) ? m_arOpd[-idx]->ptszGroup : m_arOpd[idx]->ptszTitle);
+ mir_snprintf(buf, bufSize, "%s%S", OPTSTATE_PREFIX, (idx < 0) ? m_arOpd[-idx]->ptszGroup.get() : m_arOpd[idx]->ptszTitle.get());
}
void SaveOptionsTreeState()
diff --git a/src/mir_app/src/profilemanager.cpp b/src/mir_app/src/profilemanager.cpp
index a2ffcafd58..4414f91594 100644
--- a/src/mir_app/src/profilemanager.cpp
+++ b/src/mir_app/src/profilemanager.cpp
@@ -216,7 +216,7 @@ public:
return false;
// profile placed in "profile_name" subfolder
- mir_snwprintf(m_pd->ptszProfile, MAX_PATH, L"%s\\%s\\%s.dat", m_pd->ptszProfileDir, szName, szName);
+ mir_snwprintf(m_pd->ptszProfile, MAX_PATH, L"%s\\%s\\%s.dat", m_pd->ptszProfileDir, szName.get(), szName.get());
m_pd->newProfile = 1;
m_pd->dblink = (DATABASELINK *)m_driverList.GetItemData(curSel);
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp
index f64dff3ea0..db222aff0b 100644
--- a/src/mir_app/src/proto_opts.cpp
+++ b/src/mir_app/src/proto_opts.cpp
@@ -704,9 +704,9 @@ BOOL CAccountListCtrl::OnDrawItem(DRAWITEMSTRUCT *lps)
ptrW tszIdName(szIdName ? mir_a2u(szIdName) : mir_wstrdup(TranslateT("Account ID")));
ptrW tszUniqueID(Contact_GetInfo(CNF_UNIQUEID, 0, acc->szModuleName));
if (tszUniqueID != nullptr)
- text.Format(L"%s: %s", tszIdName, tszUniqueID);
+ text.Format(L"%s: %s", tszIdName.get(), tszUniqueID.get());
else
- text.Format(L"%s: %s", tszIdName, TranslateT("<unknown>"));
+ text.Format(L"%s: %s", tszIdName.get(), TranslateT("<unknown>"));
}
else text.Format(TranslateT("Protocol is not loaded."));
@@ -873,7 +873,7 @@ bool CAccountFormDlg::OnApply()
if (m_action == PRAC_UPGRADED) {
BOOL oldProto = m_pa->bOldProto;
wchar_t szPlugin[MAX_PATH];
- mir_snwprintf(szPlugin, L"%s.dll", _A2T(m_pa->szProtoName));
+ mir_snwprintf(szPlugin, L"%S.dll", m_pa->szProtoName);
int idx = accounts.getIndex(m_pa);
UnloadAccount(m_pa, 0);
accounts.remove(idx);
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index 7b47a9afbe..b3c1aba600 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -124,7 +124,7 @@ MIR_APP_DLL(HANDLE) Srmm_AddButton(const BBButton *bbdi, HPLUGIN _hLang)
// download database settings
char SettingName[1024];
- mir_snprintf(SettingName, "%s_%d", cbd->m_pszModuleName, cbd->m_dwButtonID);
+ mir_snprintf(SettingName, "%s_%d", cbd->m_pszModuleName.get(), cbd->m_dwButtonID);
DBVARIANT dbv = { 0 };
if (!db_get_s(0, BB_MODULE_NAME, SettingName, &dbv)) {
@@ -448,7 +448,7 @@ static void CB_WriteButtonSettings(MCONTACT hContact, CustomButtonData *cbd)
//modulename_buttonID, position_inIM_inCHAT_isLSide_isRSide_CanBeHidden
- mir_snprintf(SettingName, "%s_%d", cbd->m_pszModuleName, cbd->m_dwButtonID);
+ mir_snprintf(SettingName, "%s_%d", cbd->m_pszModuleName.get(), cbd->m_dwButtonID);
mir_snprintf(SettingParameter, "%d_%u_%u_%u_%u_%u", cbd->m_dwPosition, cbd->m_bIMButton, cbd->m_bChatButton, 0, cbd->m_bRSided, cbd->m_bCanBeHidden);
if (!(cbd->m_opFlags & BBSF_NTBDESTRUCT))
db_set_s(hContact, BB_MODULE_NAME, SettingName, SettingParameter);
diff --git a/src/mir_core/src/winver.cpp b/src/mir_core/src/winver.cpp
index 47a83b62c1..3ca4636057 100644
--- a/src/mir_core/src/winver.cpp
+++ b/src/mir_core/src/winver.cpp
@@ -342,7 +342,7 @@ MIR_CORE_DLL(BOOL) GetOSDisplayString(wchar_t *buf, size_t bufSize)
HMODULE hNtDll = GetModuleHandleA("ntdll.dll");
if (WGV wine_get_version = (WGV)GetProcAddress(hNtDll, "wine_get_version"))
{
- ret.AppendFormat(L" (Wine %s)", _A2T(wine_get_version()));
+ ret.AppendFormat(L" (Wine %S)", wine_get_version());
}
mir_wstrncpy(buf, ret, bufSize);