summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp2
-rw-r--r--plugins/BuddyPounce/src/main.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_skinopt.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp2
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp2
-rw-r--r--plugins/CrashDumper/src/upload.cpp2
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp4
-rw-r--r--plugins/IEView/src/ChatHTMLBuilder.cpp4
-rw-r--r--plugins/IEView/src/HTMLBuilder.cpp8
-rw-r--r--plugins/IEView/src/HistoryHTMLBuilder.cpp6
-rw-r--r--plugins/IEView/src/MUCCHTMLBuilder.cpp4
-rw-r--r--plugins/IEView/src/ScriverHTMLBuilder.cpp6
-rw-r--r--plugins/IEView/src/TabSRMMHTMLBuilder.cpp4
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.cpp6
-rw-r--r--plugins/Import/src/import.cpp2
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp6
-rw-r--r--plugins/MyDetails/src/data.cpp4
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp6
-rw-r--r--plugins/Non-IM Contact/src/contactinfo.cpp2
-rw-r--r--plugins/PluginUpdater/src/Common.h4
-rw-r--r--plugins/PluginUpdater/src/Scanner.cpp2
-rw-r--r--plugins/Popup/src/actions.cpp2
-rw-r--r--plugins/Quotes/src/QuotesProviderBase.cppbin56912 -> 56896 bytes
-rw-r--r--plugins/Scriver/src/msgdialog.cpp6
-rw-r--r--plugins/Scriver/src/utils.cpp4
-rw-r--r--plugins/SecureIM/src/svcs_proto.cpp28
-rw-r--r--plugins/Sessions/Src/Main.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/options.cpp2
-rw-r--r--plugins/SkypeStatusChange/src/stdafx.h2
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp4
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp4
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp2
-rw-r--r--plugins/Variables/src/variables.cpp2
-rw-r--r--plugins/Weather/src/weather_addstn.cpp4
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp4
-rw-r--r--plugins/YARelay/src/main.cpp12
39 files changed, 83 insertions, 83 deletions
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index 6bf53acbf1..561f5801be 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -450,7 +450,7 @@ int FillAvatarListFromDB(HWND list, HANDLE hContact)
// Get file in disk
TCHAR path[MAX_PATH];
- mir_ptr<TCHAR> tszStoredPath(mir_utf8decodeT((char*)dbei.pBlob));
+ MTBuf tszStoredPath(mir_utf8decodeT((char*)dbei.pBlob));
PathToAbsoluteT(tszStoredPath, path);
// Add to list
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index eb77df785a..a11448d4c4 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -218,7 +218,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam)
if (ContactEnabled(hContact, "LogToHistory", AVH_DEF_LOGTOHISTORY)) {
TCHAR rel_path[MAX_PATH];
PathToRelativeT(history_filename, rel_path);
- mir_ptr<char> blob( mir_utf8encodeT(rel_path));
+ MCBuf blob( mir_utf8encodeT(rel_path));
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = GetContactProto(hContact);
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index 3b5e0c3836..f892ae1ef1 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -70,7 +70,7 @@ int MsgAck(WPARAM wParam, LPARAM lParam)
DBVARIANT dbv;
int reuse = db_get_b(ack->hContact,modname, "Reuse", 0);
if ( !db_get_ts(ack->hContact, modname, "PounceMsg", &dbv) && (dbv.ptszVal[0] != '\0')) {
- mir_ptr<char> pszUtf( mir_utf8encodeT(dbv.ptszVal));
+ MCBuf pszUtf( mir_utf8encodeT(dbv.ptszVal));
dbei.cbSize = sizeof(dbei);
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_UTF | DBEF_SENT;
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp
index 70c9495c82..d2077ff74b 100644
--- a/plugins/Clist_modern/src/modern_skinopt.cpp
+++ b/plugins/Clist_modern/src/modern_skinopt.cpp
@@ -412,7 +412,7 @@ HTREEITEM FillAvailableSkinList(HWND hwndDlg)
SearchSkinFiles(hwndDlg, SkinsFolder);
{
TCHAR skinfull[MAX_PATH];
- mir_ptr<TCHAR> skinfile( db_get_tsa( NULL, SKIN, "SkinFile"));
+ MTBuf skinfile( db_get_tsa( NULL, SKIN, "SkinFile"));
if (skinfile) {
PathToAbsoluteT(skinfile, skinfull);
res = AddSkinToListFullName(hwndDlg, skinfull);
@@ -518,7 +518,7 @@ HTREEITEM AddItemToTree(HWND hTree, TCHAR *folder, TCHAR *itemName, void *data)
INT_PTR SvcActiveSkin(WPARAM wParam, LPARAM lParam)
{
- mir_ptr<TCHAR> skinfile( db_get_tsa(NULL, SKIN, "SkinFile"));
+ MTBuf skinfile( db_get_tsa(NULL, SKIN, "SkinFile"));
if (skinfile) {
TCHAR skinfull[MAX_PATH];
PathToAbsoluteT(skinfile, skinfull);
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index 3539d7a30e..6f01f7408d 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -453,7 +453,7 @@ void SaveState()
if (szTempModeName) {
SendDlgItemMessage(clvmHwnd, IDC_VIEWMODES, LB_GETTEXT, clvm_curItem, (LPARAM)szTempModeName);
- mir_ptr<char> szModeName( mir_utf8encodeT(szTempModeName));
+ MCBuf szModeName( mir_utf8encodeT(szTempModeName));
DWORD dwGlobalMask = GetMaskForItem(hInfoItem);
for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
index bd14dfc47b..b9c5f01355 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
@@ -530,7 +530,7 @@ int LocateStorePosition(int Frameid, int maxstored)
for (int i = 0;i < maxstored;i++) {
char settingname[255];
mir_snprintf(settingname, sizeof(settingname), "Name%d", i);
- mir_ptr<TCHAR> frmname( db_get_tsa(0, CLUIFrameModule, settingname));
+ MTBuf frmname( db_get_tsa(0, CLUIFrameModule, settingname));
if (frmname == NULL) continue;
if (lstrcmpi(frmname, Frames[Frameid].name) == 0)
return i;
diff --git a/plugins/CrashDumper/src/upload.cpp b/plugins/CrashDumper/src/upload.cpp
index 7dd74d65c4..8ce0252826 100644
--- a/plugins/CrashDumper/src/upload.cpp
+++ b/plugins/CrashDumper/src/upload.cpp
@@ -75,7 +75,7 @@ void OpenAuthUrl(const char* url)
if (user[0] && pass[0]) {
char str[256];
mir_snprintf(str, sizeof(str), url, user);
- mir_snprintf(str, sizeof(str), "http://www.miranda-vi.org/cdlogin?name=%s&pass=%s&redir=%s", user, pass, mir_ptr<char>( mir_urlEncode(str)));
+ mir_snprintf(str, sizeof(str), "http://www.miranda-vi.org/cdlogin?name=%s&pass=%s&redir=%s", user, pass, MCBuf( mir_urlEncode(str)));
CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)str);
}
else CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://www.miranda-vi.org/");
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index 7f2ef7631c..8c57c2885c 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -1095,7 +1095,7 @@ static int OnContactSettingChanged(WPARAM wParam, LPARAM lParam)
if (cws && cws->szSetting && !strcmp(cws->szSetting, "MirVer")) {
switch (cws->value.type) {
case DBVT_UTF8:
- ApplyFingerprintImage(hContact, mir_ptr<TCHAR>(mir_utf8decodeT(cws->value.pszVal)));
+ ApplyFingerprintImage(hContact, MTBuf(mir_utf8decodeT(cws->value.pszVal)));
break;
case DBVT_ASCIIZ:
ApplyFingerprintImage(hContact, _A2T(cws->value.pszVal));
@@ -1125,7 +1125,7 @@ static int OnSrmmWindowEvent(WPARAM wParam, LPARAM lParam)
return 0;
if (event->uType == MSG_WINDOW_EVT_OPEN) {
- mir_ptr<TCHAR> ptszMirVer;
+ MTBuf ptszMirVer;
char *szProto = GetContactProto(event->hContact);
if (szProto != NULL)
ptszMirVer = db_get_tsa(event->hContact, szProto, "MirVer");
diff --git a/plugins/IEView/src/ChatHTMLBuilder.cpp b/plugins/IEView/src/ChatHTMLBuilder.cpp
index 774f766a0a..90d3e72ac1 100644
--- a/plugins/IEView/src/ChatHTMLBuilder.cpp
+++ b/plugins/IEView/src/ChatHTMLBuilder.cpp
@@ -87,7 +87,7 @@ char *ChatHTMLBuilder::timestampToString(time_t time)
char *pszStamp = "[%H:%M]";
//InitSetting( &g_Settings.pszTimeStamp, "HeaderTime", _T("[%H:%M]"));
strftime(str, 79, pszStamp, localtime(&time));
- lstrcpynA(szResult, mir_ptr<char>(mir_utf8encode(str)), 500);
+ lstrcpynA(szResult, MCBuf(mir_utf8encode(str)), 500);
return szResult;
}
@@ -171,7 +171,7 @@ void ChatHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event)
const char *className = "";
bool showIcon = false;
- mir_ptr<char> szName, szText;
+ MCBuf szName, szText;
if (eventData->dwFlags & IEEDF_UNICODE_TEXT)
szText = encodeUTF8(NULL, event->pszProto, eventData->pszTextW, ENF_ALL | ENF_CHAT_FORMATTING, isSent);
else
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp
index 6fad7a6fd5..e284aafe02 100644
--- a/plugins/IEView/src/HTMLBuilder.cpp
+++ b/plugins/IEView/src/HTMLBuilder.cpp
@@ -312,7 +312,7 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event)
HANDLE hDbEvent = event->hDbEventFirst;
event->hDbEventFirst = NULL;
- mir_ptr<char> szProto;
+ MCBuf szProto;
if (event->cbSize >= IEVIEWEVENT_SIZE_V3 && event->pszProto != NULL)
szProto = mir_strdup(event->pszProto);
else
@@ -435,7 +435,7 @@ ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(const char *protocolName)
ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(HANDLE hContact)
{
- return getSRMMProtocolSettings( mir_ptr<char>(getRealProto(hContact)));
+ return getSRMMProtocolSettings( MCBuf(getRealProto(hContact)));
}
ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(const char *protocolName)
@@ -450,7 +450,7 @@ ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(const char *protocolNa
ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(HANDLE hContact)
{
if (hContact != NULL)
- return getHistoryProtocolSettings( mir_ptr<char>(getRealProto(hContact)));
+ return getHistoryProtocolSettings( MCBuf(getRealProto(hContact)));
return Options::getProtocolSettings();
}
@@ -466,7 +466,7 @@ ProtocolSettings* HTMLBuilder::getChatProtocolSettings(const char *protocolName)
ProtocolSettings* HTMLBuilder::getChatProtocolSettings(HANDLE hContact)
{
- return getChatProtocolSettings( mir_ptr<char>(getRealProto(hContact)));
+ return getChatProtocolSettings( MCBuf(getRealProto(hContact)));
}
void HTMLBuilder::setLastIEViewEvent(IEVIEWEVENT *event)
diff --git a/plugins/IEView/src/HistoryHTMLBuilder.cpp b/plugins/IEView/src/HistoryHTMLBuilder.cpp
index c5ccebfa6a..decd8bc6a9 100644
--- a/plugins/IEView/src/HistoryHTMLBuilder.cpp
+++ b/plugins/IEView/src/HistoryHTMLBuilder.cpp
@@ -89,7 +89,7 @@ char *HistoryHTMLBuilder::timestampToString(DWORD dwFlags, time_t check) {
dbtts.szFormat = (char *)"d t";
CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM) & dbtts);
strncat(szResult, str, 500);
- lstrcpynA(szResult, mir_ptr<char>(mir_utf8encode(szResult)), 500);
+ lstrcpynA(szResult, MCBuf(mir_utf8encode(szResult)), 500);
return szResult;
}
@@ -221,7 +221,7 @@ void HistoryHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) {
void HistoryHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event)
{
DWORD dwFlags = db_get_b(NULL, HPPMOD, SRMSGSET_SHOWICONS, 0) ? SMF_LOG_SHOWICONS : 0;
- mir_ptr<char> szRealProto( getRealProto(event->hContact));
+ MCBuf szRealProto( getRealProto(event->hContact));
IEVIEWEVENTDATA* eventData = event->eventData;
for (int eventIdx = 0; eventData!=NULL && (eventIdx < event->count || event->count==-1); eventData = eventData->next, eventIdx++) {
int outputSize;
@@ -231,7 +231,7 @@ void HistoryHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event
if (eventData->iType == IEED_EVENT_MESSAGE || eventData->iType == IEED_EVENT_STATUSCHANGE ||
eventData->iType == IEED_EVENT_URL || eventData->iType == IEED_EVENT_FILE)
{
- mir_ptr<char> szName, szText;
+ MCBuf szName, szText;
if (eventData->dwFlags & IEEDF_UNICODE_NICK)
szName = encodeUTF8(event->hContact, szRealProto, eventData->pszNickW, ENF_NAMESMILEYS, true);
else
diff --git a/plugins/IEView/src/MUCCHTMLBuilder.cpp b/plugins/IEView/src/MUCCHTMLBuilder.cpp
index e8d5b30c19..e7dcbb916c 100644
--- a/plugins/IEView/src/MUCCHTMLBuilder.cpp
+++ b/plugins/IEView/src/MUCCHTMLBuilder.cpp
@@ -109,7 +109,7 @@ char *MUCCHTMLBuilder::timestampToString(DWORD dwData, time_t check)
}
CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM) & dbtts);
strncat(szResult, str, 500);
- lstrcpynA(szResult, mir_ptr<char>(mir_utf8encode(szResult)), 500);
+ lstrcpynA(szResult, MCBuf(mir_utf8encode(szResult)), 500);
return szResult;
}
@@ -190,7 +190,7 @@ void MUCCHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) {
bool isSent = eventData->bIsMe != 0;
int outputSize;
char *output = NULL;
- mir_ptr<char> szName, szText;
+ MCBuf szName, szText;
if (eventData->iType == IEED_MUCC_EVENT_MESSAGE) {
if (eventData->dwFlags & IEEDF_UNICODE_TEXT)
szText = encodeUTF8(NULL, event->pszProto, eventData->pszTextW, ENF_ALL, isSent);
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp
index a3752d753c..c55a60f154 100644
--- a/plugins/IEView/src/ScriverHTMLBuilder.cpp
+++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp
@@ -171,7 +171,7 @@ char *ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mod
//_tcsncat(szResult, str, 500);
strncat(szResult, str, 500);
}
- lstrcpynA(szResult, mir_ptr<char>(mir_utf8encode(szResult)), 500);
+ lstrcpynA(szResult, MCBuf(mir_utf8encode(szResult)), 500);
return szResult;
}
@@ -280,7 +280,7 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event
dwFlags |= db_get_b(NULL, SRMMMOD, SRMSGSET_MESSAGEONNEWLINE, 0) ? SMF_LOG_MSGONNEWLINE : 0;
dwFlags |= db_get_b(NULL, SRMMMOD, SRMSGSET_DRAWLINES, 0) ? SMF_LOG_DRAWLINES : 0;
- mir_ptr<char> szRealProto( getRealProto(event->hContact));
+ MCBuf szRealProto( getRealProto(event->hContact));
IEVIEWEVENTDATA* eventData = event->eventData;
for (int eventIdx = 0; eventData!=NULL && (eventIdx < event->count || event->count==-1); eventData = eventData->next, eventIdx++) {
const char *className = "";
@@ -300,7 +300,7 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event
(((eventData->time < startedTime) == (getLastEventTime() < startedTime)) || !(eventData->dwFlags & IEEDF_READ))) {
isGroupBreak = FALSE;
}
- mir_ptr<char> szName, szText;
+ MCBuf szName, szText;
if (eventData->dwFlags & IEEDF_UNICODE_NICK)
szName = encodeUTF8(event->hContact, szRealProto, eventData->pszNickW, ENF_NAMESMILEYS, true);
else
diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
index c589a520ca..bb87bdac92 100644
--- a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
+++ b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
@@ -197,7 +197,7 @@ char *TabSRMMHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int isG
}
CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM) & dbtts);
strncat(szResult, str, 500);
- lstrcpynA(szResult, mir_ptr<char>(mir_utf8encode(szResult)), 500);
+ lstrcpynA(szResult, MCBuf(mir_utf8encode(szResult)), 500);
return szResult;
}
@@ -327,7 +327,7 @@ void TabSRMMHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event
isGroupBreak = FALSE;
}
- mir_ptr<char> szName, szText;
+ MCBuf szName, szText;
if (eventData->dwFlags & IEEDF_UNICODE_NICK)
szName = encodeUTF8(event->hContact, szRealProto, eventData->pszNickW, ENF_NAMESMILEYS, true);
else
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp
index 05d7faf1d6..ecdf765f1d 100644
--- a/plugins/IEView/src/TemplateHTMLBuilder.cpp
+++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp
@@ -151,7 +151,7 @@ char *TemplateHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mo
}
}
- lstrcpynA(szResult, mir_ptr<char>(mir_utf8encodeT(str)), 500);
+ lstrcpynA(szResult, MCBuf(mir_utf8encodeT(str)), 500);
return szResult;
}
@@ -297,7 +297,7 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr
}
if (tokenVal != NULL) {
if (token->getEscape())
- Utils::appendText(&output, &outputSize, "%s", mir_ptr<char>(Utils::escapeString(tokenVal)));
+ Utils::appendText(&output, &outputSize, "%s", MCBuf(Utils::escapeString(tokenVal)));
else
Utils::appendText(&output, &outputSize, "%s", tokenVal);
}
@@ -606,7 +606,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event,
}
if (tokenVal != NULL) {
if (token->getEscape())
- Utils::appendText(&output, &outputSize, "%s", mir_ptr<char>(Utils::escapeString(tokenVal)));
+ Utils::appendText(&output, &outputSize, "%s", MCBuf(Utils::escapeString(tokenVal)));
else
Utils::appendText(&output, &outputSize, "%s", tokenVal);
}
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index 6d2d16215e..84e01231a9 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -84,7 +84,7 @@ static HANDLE HContactFromID(char* szProto, char* pszSetting, TCHAR* pwszID)
while (hContact != NULL) {
char* szProto = GetContactProto(hContact);
if ( !lstrcmpA(szProto, szProto)) {
- mir_ptr<WCHAR> id( db_get_tsa(hContact, szProto, pszSetting));
+ MWBuf id( db_get_tsa(hContact, szProto, pszSetting));
if ( !lstrcmp(pwszID, id))
return hContact;
}
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 97888172ce..a1cd406030 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -452,11 +452,11 @@ static bool bWriteTextToFile(HANDLE hFile, const TCHAR *pszSrc, bool bUtf8File,
if ( !bUtf8File) {
// We need to downgrade text to ansi
- mir_ptr<char> pszAstr( mir_t2a(pszSrc));
+ MCBuf pszAstr( mir_t2a(pszSrc));
return bWriteToFile(hFile, pszAstr, -1);
}
- mir_ptr<char> pszUtf8( mir_utf8encodeT(pszSrc));
+ MCBuf pszUtf8( mir_utf8encodeT(pszSrc));
return bWriteToFile(hFile, pszUtf8, -1);
}
@@ -473,7 +473,7 @@ static bool bWriteTextToFile( HANDLE hFile, const char *pszSrc, bool bUtf8File,
pszSrc = tmp;
}
- mir_ptr<char> pszUtf8( mir_utf8encode(pszSrc));
+ MCBuf pszUtf8( mir_utf8encode(pszSrc));
return bWriteToFile(hFile, pszUtf8, -1);
}
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp
index f88fb35acf..a952f56017 100644
--- a/plugins/MyDetails/src/data.cpp
+++ b/plugins/MyDetails/src/data.cpp
@@ -241,11 +241,11 @@ void Protocol::GetStatusMsg(int aStatus, TCHAR *msg, size_t msg_size)
if ( !CanGetStatusMsg())
lcopystr(msg, _T(""), msg_size);
else if (aStatus == status && ProtoServiceExists(name, PS_GETMYAWAYMSG)) {
- mir_ptr<TCHAR> tmp((TCHAR*)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_TCHAR));
+ MTBuf tmp((TCHAR*)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_TCHAR));
lcopystr(msg, tmp == NULL ? _T("") : tmp, msg_size);
}
else if (ServiceExists(MS_AWAYMSG_GETSTATUSMSG)) {
- mir_ptr<TCHAR> tmp((TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)aStatus, 0));
+ MTBuf tmp((TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)aStatus, 0));
lcopystr(msg, tmp == NULL ? _T("") : tmp, msg_size);
}
}
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index ab2636c8a2..d93addd369 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -462,11 +462,11 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, HANDLE hContact)
if (_stricmp(smi.proto, "mRadio") == 0 && !cws->value.type == DBVT_DELETED) {
TCHAR buf[MAX_PATH];
mir_sntprintf(buf, SIZEOF(buf), _T(" (%s)"), TranslateT("connecting"));
- mir_ptr<char> pszUtf( mir_utf8encodeT(buf));
+ MCBuf pszUtf( mir_utf8encodeT(buf));
mir_sntprintf(buf, SIZEOF(buf), _T(" (%s)"), TranslateT("aborting"));
- mir_ptr<char> pszUtf2( mir_utf8encodeT(buf));
+ MCBuf pszUtf2( mir_utf8encodeT(buf));
mir_sntprintf(buf, SIZEOF(buf), _T(" (%s)"), TranslateT("playing"));
- mir_ptr<char> pszUtf3( mir_utf8encodeT(buf));
+ MCBuf pszUtf3( mir_utf8encodeT(buf));
if (_stricmp(cws->value.pszVal, pszUtf) == 0 || _stricmp(cws->value.pszVal, pszUtf2) == 0 || _stricmp(cws->value.pszVal, pszUtf3) == 0)
return 0;
}
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp
index 76a774f567..deac669fdd 100644
--- a/plugins/Non-IM Contact/src/contactinfo.cpp
+++ b/plugins/Non-IM Contact/src/contactinfo.cpp
@@ -111,7 +111,7 @@ int BrowseForFolder(HWND hwnd,char *szPath)
if (SUCCEEDED(OleInitialize(NULL))) {
LPMALLOC pMalloc;
if (SUCCEEDED(CoGetMalloc(1,&pMalloc))) {
- mir_ptr<TCHAR> tszPath( mir_a2t(szPath));
+ MTBuf tszPath( mir_a2t(szPath));
BROWSEINFO bi={0};
bi.hwndOwner = hwnd;
bi.pszDisplayName = tszPath;
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h
index 4e8e121451..96627ee013 100644
--- a/plugins/PluginUpdater/src/Common.h
+++ b/plugins/PluginUpdater/src/Common.h
@@ -189,10 +189,10 @@ public:
__inline operator INT_PTR() const { return (INT_PTR)data; }
};
-struct VARST : public mir_ptr<TCHAR>
+struct VARST : public MTBuf
{
__forceinline VARST(const TCHAR *str) :
- mir_ptr<TCHAR>( Utils_ReplaceVarsT(str))
+ MTBuf( Utils_ReplaceVarsT(str))
{}
};
diff --git a/plugins/PluginUpdater/src/Scanner.cpp b/plugins/PluginUpdater/src/Scanner.cpp
index 0f2cf1c8fb..d198419df7 100644
--- a/plugins/PluginUpdater/src/Scanner.cpp
+++ b/plugins/PluginUpdater/src/Scanner.cpp
@@ -289,7 +289,7 @@ static void CheckUpdates(void *)
REPLACEVARSDATA dat = { sizeof(REPLACEVARSDATA) };
dat.dwFlags = RVF_TCHAR;
dat.variables = vars;
- mir_ptr<TCHAR> tszBaseUrl((TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)dbVar.ptszVal, (LPARAM)&dat));
+ MTBuf tszBaseUrl((TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)dbVar.ptszVal, (LPARAM)&dat));
db_free(&dbVar);
// Download version info
diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp
index 09f8b3d6fd..f157d7ebab 100644
--- a/plugins/Popup/src/actions.cpp
+++ b/plugins/Popup/src/actions.cpp
@@ -261,7 +261,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
LVITEM item = {0};
item.mask = LVIF_IMAGE|LVIF_PARAM|LVIF_TEXT|LVIF_STATE|LVIF_INDENT;
item.iItem = i;
- mir_ptr<TCHAR> tszName( mir_a2t(szName));
+ MTBuf tszName( mir_a2t(szName));
item.pszText = TranslateTS(tszName);
item.iImage = ImageList_AddIcon(hImgList, gActions[i]->lchIcon);
item.lParam = i;
diff --git a/plugins/Quotes/src/QuotesProviderBase.cpp b/plugins/Quotes/src/QuotesProviderBase.cpp
index 84698140b1..fbf62e66fe 100644
--- a/plugins/Quotes/src/QuotesProviderBase.cpp
+++ b/plugins/Quotes/src/QuotesProviderBase.cpp
Binary files differ
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index aa665e5a85..b49ded9c7f 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -355,7 +355,7 @@ static LRESULT CALLBACK LogEditSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
POINTL ptl = { (LONG)pt.x, (LONG)pt.y };
ScreenToClient(hwnd, (LPPOINT)&ptl);
- mir_ptr<TCHAR> pszWord( GetRichTextWord(hwnd, &ptl));
+ MTBuf pszWord( GetRichTextWord(hwnd, &ptl));
if ( pszWord && pszWord[0] ) {
TCHAR szMenuText[4096];
mir_sntprintf( szMenuText, 4096, TranslateT("Look up \'%s\':"), pszWord );
@@ -1109,8 +1109,8 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
wStatus = db_get_w( dat->windowData.hContact, dat->szProto, "Status", ID_STATUS_OFFLINE);
// log status change - should be moved to a separate place
if (dat->wStatus != wStatus && db_get_b(NULL, SRMMMOD, SRMSGSET_SHOWSTATUSCH, SRMSGDEFSET_SHOWSTATUSCH)) {
- mir_ptr<TCHAR> szOldStatus( mir_tstrdup((TCHAR *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM) dat->wStatus, GSMDF_TCHAR)));
- mir_ptr<TCHAR> szNewStatus( mir_tstrdup((TCHAR *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM) wStatus, GSMDF_TCHAR)));
+ MTBuf szOldStatus( mir_tstrdup((TCHAR *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM) dat->wStatus, GSMDF_TCHAR)));
+ MTBuf szNewStatus( mir_tstrdup((TCHAR *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM) wStatus, GSMDF_TCHAR)));
int iLen;
TCHAR buffer[512];
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index 0c90618d10..7460d211b4 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -431,8 +431,8 @@ void SearchWord(TCHAR * word, int engine)
{
char szURL[4096];
if (word && word[0]) {
- mir_ptr<char> wordUTF( mir_utf8encodeT(word));
- mir_ptr<char> wordURL( mir_urlEncode(wordUTF));
+ MCBuf wordUTF( mir_utf8encodeT(word));
+ MCBuf wordURL( mir_urlEncode(wordUTF));
switch (engine) {
case SEARCHENGINE_WIKIPEDIA:
mir_snprintf(szURL, SIZEOF(szURL), "http://en.wikipedia.org/wiki/%s", wordURL);
diff --git a/plugins/SecureIM/src/svcs_proto.cpp b/plugins/SecureIM/src/svcs_proto.cpp
index 21a228b041..55ee58c017 100644
--- a/plugins/SecureIM/src/svcs_proto.cpp
+++ b/plugins/SecureIM/src/svcs_proto.cpp
@@ -104,7 +104,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
if (ssig == SiG_NONE && !ptr->msgSplitted) {
Sent_NetLog("onRecvMsg: non-secure message");
- mir_ptr<char> szPlainMsg((ppre->flags & PREF_UNICODE) ? m_awstrcat(Translate(sim402),szEncMsg) : m_aastrcat(Translate(sim402),szEncMsg));
+ MCBuf szPlainMsg((ppre->flags & PREF_UNICODE) ? m_awstrcat(Translate(sim402),szEncMsg) : m_aastrcat(Translate(sim402),szEncMsg));
ppre->szMessage = szPlainMsg;
pccsd->wParam |= PREF_SIMNOMETA;
return CallService(MS_PROTO_CHAINRECV, wParam, lParam);
@@ -189,7 +189,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
szNewMsg = m_ustrcat(Translate(sim403), szOldMsg);
szOldMsg = szNewMsg;
}
- mir_ptr<char> szMsgUtf( utf8_to_miranda(szOldMsg, ppre->flags));
+ MCBuf szMsgUtf( utf8_to_miranda(szOldMsg, ppre->flags));
pccsd->wParam = ppre->flags;
ppre->szMessage = szMsgUtf;
@@ -224,7 +224,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
if (!szOldMsg)
return 1; // don't display it ...
- mir_ptr<char> szNewMsg( utf8_to_miranda(szOldMsg, ppre->flags));
+ MCBuf szNewMsg( utf8_to_miranda(szOldMsg, ppre->flags));
pccsd->wParam = ppre->flags;
ppre->szMessage = szNewMsg;
@@ -252,7 +252,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
// reinit key exchange user has send an encrypted message and i have no key
cpp_reset_context(ptr->cntx);
- mir_ptr<char> reSend((LPSTR)mir_alloc(strlen(szEncMsg)+LEN_RSND));
+ MCBuf reSend((LPSTR)mir_alloc(strlen(szEncMsg)+LEN_RSND));
strcpy(reSend,SIG_RSND); // copy resend sig
strcat(reSend,szEncMsg); // add mess
@@ -261,7 +261,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
pccsd->szProtoService = PSS_MESSAGE;
CallService(MS_PROTO_CHAINSEND, wParam, lParam); // send back cipher message
- mir_ptr<char> keyToSend( InitKeyA(ptr, 0)); // calculate public and private key
+ MCBuf keyToSend( InitKeyA(ptr, 0)); // calculate public and private key
pccsd->lParam = (LPARAM)(char*)keyToSend;
CallService(MS_PROTO_CHAINSEND, wParam, lParam); // send new key
@@ -301,7 +301,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
if (cpp_keyx(ptr->cntx)) {
// decrypt sended back message and save message for future sending with a new secret key
- addMsg2Queue(ptr, pccsd->wParam, mir_ptr<char>(decodeMsg(ptr,(LPARAM)pccsd,szEncMsg)));
+ addMsg2Queue(ptr, pccsd->wParam, MCBuf(decodeMsg(ptr,(LPARAM)pccsd,szEncMsg)));
showPopUpRM(ptr->hContact);
showPopUp(sim004,NULL,g_hPOP[POP_PU_DIS],0);
}
@@ -373,7 +373,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
if (ptr->features & CPP_FEATURES_NEWPG) {
cpp_reset_context(ptr->cntx);
- mir_ptr<char> keyToSend( InitKeyA(ptr,CPP_FEATURES_NEWPG|KEY_A_SIG)); // calculate NEW public and private key
+ MCBuf keyToSend( InitKeyA(ptr,CPP_FEATURES_NEWPG|KEY_A_SIG)); // calculate NEW public and private key
Sent_NetLog("onRecvMsg: Sending KEYA %s", keyToSend);
pccsd->wParam |= PREF_METANODB;
@@ -388,7 +388,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
// auto send my public key to keyB user if not done before
if (!cpp_keya(ptr->cntx)) {
- mir_ptr<char> keyToSend( InitKeyA(ptr,0)); // calculate public and private key
+ MCBuf keyToSend( InitKeyA(ptr,0)); // calculate public and private key
Sent_NetLog("onRecvMsg: Sending KEYA %s", keyToSend);
pccsd->wParam |= PREF_METANODB;
@@ -418,7 +418,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam)
return 1;
}
else {
- mir_ptr<char> keyToSend( InitKeyA(ptr, CPP_FEATURES_NEWPG | KEY_B_SIG)); // calculate NEW public and private key
+ MCBuf keyToSend( InitKeyA(ptr, CPP_FEATURES_NEWPG | KEY_B_SIG)); // calculate NEW public and private key
Sent_NetLog("onRecvMsg: Sending KEYB %s", keyToSend);
pccsd->wParam |= PREF_METANODB;
@@ -511,7 +511,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam)
if (!ptr->keyLoaded ) return returnError(pccsd->hContact,Translate(sim108));
LPSTR szNewMsg = NULL;
- mir_ptr<char> szUtfMsg( miranda_to_utf8((LPCSTR)pccsd->lParam,pccsd->wParam));
+ MCBuf szUtfMsg( miranda_to_utf8((LPCSTR)pccsd->lParam,pccsd->wParam));
if (ptr->keyLoaded == 1) // PGP
szNewMsg = pgp_encode(ptr->cntx,szUtfMsg);
else if (ptr->keyLoaded == 2) // GPG
@@ -559,7 +559,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam)
}
// шлем шифрованное в оффлайн
- exp->rsa_send(ptr->cntx, mir_ptr<char>( miranda_to_utf8((LPCSTR)pccsd->lParam,pccsd->wParam)));
+ exp->rsa_send(ptr->cntx, MCBuf( miranda_to_utf8((LPCSTR)pccsd->lParam,pccsd->wParam)));
showPopUpSM(ptr->hContact);
return returnNoError(pccsd->hContact);
}
@@ -591,7 +591,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam)
// соединение установлено
if (ptr->cntx && exp->rsa_get_state(ptr->cntx) == 7) {
- exp->rsa_send(ptr->cntx, mir_ptr<char>(miranda_to_utf8((LPCSTR)pccsd->lParam,pccsd->wParam)));
+ exp->rsa_send(ptr->cntx, MCBuf(miranda_to_utf8((LPCSTR)pccsd->lParam,pccsd->wParam)));
ShowStatusIconNotify(ptr->hContact);
showPopUpSM(ptr->hContact);
return returnNoError(pccsd->hContact);
@@ -738,7 +738,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam)
if (cpp_keyx(ptr->cntx)) {
Sent_NetLog("onSendMsg: cryptokey exist");
- mir_ptr<char> szNewMsg( encodeMsg(ptr,(LPARAM)pccsd));
+ MCBuf szNewMsg( encodeMsg(ptr,(LPARAM)pccsd));
Sent_NetLog("onSend: encrypted msg '%s'",szNewMsg);
pccsd->wParam |= PREF_METANODB;
@@ -759,7 +759,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam)
if (!ptr->waitForExchange) {
// init || always_try || always_if_possible
- mir_ptr<char> keyToSend( InitKeyA(ptr,0)); // calculate public and private key & fill KeyA
+ MCBuf keyToSend( InitKeyA(ptr,0)); // calculate public and private key & fill KeyA
Sent_NetLog("Sending KEY3: %s", keyToSend);
pccsd->wParam &= ~PREF_UNICODE;
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 3ead9ab314..87ae2c4e03 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -503,7 +503,7 @@ INT_PTR OpenSessionsManagerWindow(WPARAM wparam,LPARAM lparam)
return 0;
}
- mir_ptr<TCHAR>
+ MTBuf
tszSession(db_get_tsa(NULL, MODNAME, "SessionDate_0")),
tszUserSession(db_get_tsa(NULL, MODNAME, "UserSessionDsc_0"));
if (g_bIncompletedSave || tszSession || tszUserSession) {
diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp
index ad6e704b52..8ced5bc7d3 100644
--- a/plugins/SimpleStatusMsg/src/options.cpp
+++ b/plugins/SimpleStatusMsg/src/options.cpp
@@ -137,7 +137,7 @@ static INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
val = db_get_b(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(i, "Flags"), STATUS_DEFAULT);
data->status_msg[0].flags[i - ID_STATUS_ONLINE] = val;
- mir_ptr<TCHAR> text = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(i, "Default"));
+ MTBuf text = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(i, "Default"));
lstrcpyn(data->status_msg[0].msg[i - ID_STATUS_ONLINE], (text == NULL) ? GetDefaultMessage(i) : text, 1024);
for (j = 0; j < accounts->count; j++)
diff --git a/plugins/SkypeStatusChange/src/stdafx.h b/plugins/SkypeStatusChange/src/stdafx.h
index f6c0589707..a74bf594f8 100644
--- a/plugins/SkypeStatusChange/src/stdafx.h
+++ b/plugins/SkypeStatusChange/src/stdafx.h
@@ -64,7 +64,7 @@ class COptions
iStatus(_status)
{}
- mir_ptr<char> szProto;
+ MCBuf szProto;
int iStatus;
};
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 82f8b00e77..23bb20b231 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -3113,10 +3113,10 @@ LABEL_SHOWWINDOW:
if (GetSendButtonState(hwndDlg) != PBS_DISABLED) {
MODULEINFO *mi = MM_FindModule(si->pszModule);
- mir_ptr<char> pszRtf( Chat_Message_GetFromStream(hwndDlg, si));
+ MCBuf pszRtf( Chat_Message_GetFromStream(hwndDlg, si));
SM_AddCommand(si->ptszID, si->pszModule, pszRtf);
- mir_ptr<TCHAR> ptszText( Chat_DoRtfToTags(pszRtf, si));
+ MTBuf ptszText( Chat_DoRtfToTags(pszRtf, si));
if ((TCHAR*)ptszText == NULL)
break;
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 014f41ba20..3951c4efb1 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -554,11 +554,11 @@ static TCHAR *GetPreviewT(WORD eventType, DBEVENTINFO* dbe)
if (dbe->cbBlob > (sizeof(DWORD) + namelength + 1))
szDescr = szFileName + namelength + 1;
- mir_ptr<TCHAR> tszFileName( DbGetEventStringT(dbe, szFileName));
+ MTBuf tszFileName( DbGetEventStringT(dbe, szFileName));
TCHAR buf[1024];
if (szDescr && Utils::safe_strlen(szDescr, dbe->cbBlob - sizeof(DWORD) - namelength - 1) > 0) {
- mir_ptr<TCHAR> tszDescr( DbGetEventStringT(dbe, szDescr));
+ MTBuf tszDescr( DbGetEventStringT(dbe, szDescr));
if (tszFileName && tszDescr) {
mir_sntprintf(buf, SIZEOF(buf), _T("%s: %s (%s)"), TranslateT("Incoming file"), tszFileName, tszDescr);
return mir_tstrdup(buf);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 16a804abf8..40bbbeaeb8 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -712,7 +712,7 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c)
mir_sntprintf(buffer, SIZEOF(buffer), TranslateT("changed status from %s to %s."), szOldStatus, szNewStatus);
}
- mir_ptr<char> szMsg( mir_utf8encodeT(buffer));
+ MCBuf szMsg( mir_utf8encodeT(buffer));
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.pBlob = (PBYTE)(char*)szMsg;
dbei.cbBlob = lstrlenA(szMsg) + 1;
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index 634f26042e..f4bcfabd11 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -901,7 +901,7 @@ INT_PTR CALLBACK CSendLater::DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
job->writeFlags();
break;
case ID_QUEUEMANAGER_COPYMESSAGETOCLIPBOARD:
- Utils::CopyToClipBoard((TCHAR*)mir_ptr<TCHAR>( mir_utf8decodeT(job->sendBuffer)), m_hwndDlg);
+ Utils::CopyToClipBoard((TCHAR*)MTBuf( mir_utf8decodeT(job->sendBuffer)), m_hwndDlg);
break;
case ID_QUEUEMANAGER_RESETSELECTED:
if (job->bCode == CSendLaterJob::JOB_DEFERRED) {
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 7807a4d193..0367e22dcb 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -136,7 +136,7 @@ static int SendChunkW(WCHAR *chunk, HANDLE hContact, DWORD dwFlags)
int mbcsSize = WideCharToMultiByte(codePage, 0, chunk, -1, NULL, 0, 0, 0);
memRequired += mbcsSize;
- mir_ptr<char> pBuf((char*)mir_alloc(memRequired));
+ MCBuf pBuf((char*)mir_alloc(memRequired));
WideCharToMultiByte(codePage, 0, chunk, -1, pBuf, mbcsSize, 0, 0);
CopyMemory(&pBuf[mbcsSize], chunk, (wLen+1) * sizeof(WCHAR));
return CallContactService(hContact, PSS_MESSAGE, dwFlags, (LPARAM)pBuf);
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp
index 4758f9f167..d42d8f55db 100644
--- a/plugins/Variables/src/variables.cpp
+++ b/plugins/Variables/src/variables.cpp
@@ -502,7 +502,7 @@ TCHAR *formatString(FORMATINFO *fi)
if ((fi == NULL) || (fi->tszFormat == NULL))
return NULL;
- mir_ptr<TCHAR> string( mir_tstrdup(fi->tszFormat));
+ MTBuf string( mir_tstrdup(fi->tszFormat));
if (string == NULL)
return NULL;
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp
index 08ee90d862..1e7491249a 100644
--- a/plugins/Weather/src/weather_addstn.cpp
+++ b/plugins/Weather/src/weather_addstn.cpp
@@ -308,8 +308,8 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR *
// replace spaces with %20
char loc[256];
- mir_ptr<char> szSearchName( mir_utf8encodeT(name));
- wsprintfA(loc, sData->SearchURL, mir_ptr<char>( mir_urlEncode(szSearchName)));
+ MCBuf szSearchName( mir_utf8encodeT(name));
+ wsprintfA(loc, sData->SearchURL, MCBuf( mir_urlEncode(szSearchName)));
if (InternetDownloadFile(loc, NULL, &szData) == 0) {
TCHAR* szInfo = szData;
search = _tcsstr(szInfo, sData->NotFoundStr); // determine if data is available
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp
index f1e338daa3..1954c84f15 100644
--- a/plugins/XSoundNotify/src/xsn_main.cpp
+++ b/plugins/XSoundNotify/src/xsn_main.cpp
@@ -137,7 +137,7 @@ INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
break;
case DBVT_UTF8:
- _tcscpy(uid, mir_ptr<TCHAR>(mir_utf8decodeT(dbvuid.pszVal)));
+ _tcscpy(uid, MTBuf(mir_utf8decodeT(dbvuid.pszVal)));
break;
}
@@ -344,7 +344,7 @@ INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wParam, L
break;
case DBVT_UTF8:
- _tcscpy(uid, mir_ptr<TCHAR>( mir_utf8decodeT(dbvuid.pszVal)));
+ _tcscpy(uid, MTBuf( mir_utf8decodeT(dbvuid.pszVal)));
break;
}
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp
index 8613d49304..2a37b58c81 100644
--- a/plugins/YARelay/src/main.cpp
+++ b/plugins/YARelay/src/main.cpp
@@ -135,7 +135,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
// build a message
Buffer<char> szUtfMsg;
- mir_ptr<char> szTemplate( mir_utf8encodeT(tszForwardTemplate));
+ MCBuf szTemplate( mir_utf8encodeT(tszForwardTemplate));
for (char *p = szTemplate; *p; p++) {
if (*p != '%') {
szUtfMsg.append(*p);
@@ -146,7 +146,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
switch(*++p) {
case 'u':
case 'U':
- szUtfMsg.append( mir_ptr<char>(mir_utf8encodeT(pcli->pfnGetContactDisplayName(hContact, 0))));
+ szUtfMsg.append( MCBuf(mir_utf8encodeT(pcli->pfnGetContactDisplayName(hContact, 0))));
break;
case 'i':
@@ -167,19 +167,19 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
}
else mir_sntprintf(buf, SIZEOF(buf), _T("%p"), hContact);
}
- szUtfMsg.append( mir_ptr<char>(mir_utf8encodeT(buf)));
+ szUtfMsg.append( MCBuf(mir_utf8encodeT(buf)));
break;
case 't':
case 'T':
_tcsftime(buf, 10, _T("%H:%M"), tm_time);
- szUtfMsg.append( mir_ptr<char>(mir_utf8encodeT(buf)));
+ szUtfMsg.append( MCBuf(mir_utf8encodeT(buf)));
break;
case 'd':
case 'D':
_tcsftime(buf, 12, _T("%d/%m/%Y"), tm_time);
- szUtfMsg.append( mir_ptr<char>(mir_utf8encodeT(buf)));
+ szUtfMsg.append( MCBuf(mir_utf8encodeT(buf)));
break;
case 'm':
@@ -187,7 +187,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
if (dbei.flags & DBEF_UTF)
szUtfMsg.append((char*)dbei.pBlob, dbei.cbBlob);
else
- szUtfMsg.append( mir_ptr<char>(mir_utf8encode((char*)dbei.pBlob)));
+ szUtfMsg.append( MCBuf(mir_utf8encode((char*)dbei.pBlob)));
break;
case '%':