summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_system_cpp.h6
-rw-r--r--include/m_utils.h8
-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.cppbin56896 -> 56894 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
-rw-r--r--protocols/AimOscar/src/utility.cpp2
-rw-r--r--protocols/FacebookRM/src/communication.cpp4
-rw-r--r--protocols/FacebookRM/src/messages.cpp4
-rw-r--r--protocols/FacebookRM/src/proto.cpp12
-rw-r--r--protocols/FacebookRM/src/utils.cpp2
-rw-r--r--protocols/GTalkExt/src/handlers.cpp6
-rw-r--r--protocols/GTalkExt/src/inbox.cpp8
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp2
-rw-r--r--protocols/JabberG/src/jabber_archive.cpp2
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp2
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp2
-rw-r--r--protocols/JabberG/src/jabber_xstatus.cpp8
-rw-r--r--protocols/MRA/src/MraSendCommand.cpp4
-rw-r--r--protocols/MRA/src/Mra_svcs.cpp2
-rw-r--r--protocols/MSN/src/msn_commands.cpp2
-rw-r--r--protocols/Omegle/src/utils.cpp2
-rw-r--r--protocols/Twitter/src/chat.cpp4
-rw-r--r--protocols/Twitter/src/http.cpp2
-rw-r--r--protocols/Yahoo/src/im.cpp2
-rw-r--r--protocols/Yahoo/src/proto.cpp10
-rw-r--r--protocols/Yahoo/src/yahoo.cpp18
-rw-r--r--src/core/stdauth/authdialogs.cpp10
-rw-r--r--src/core/stdfile/filerecvdlg.cpp4
-rw-r--r--src/modules/clist/movetogroup.cpp2
-rw-r--r--src/modules/extraicons/extraicons.cpp2
-rw-r--r--src/modules/options/options.cpp4
-rw-r--r--src/modules/plugins/pluginopts.cpp10
-rw-r--r--src/modules/protocols/protocols.cpp2
70 files changed, 158 insertions, 158 deletions
diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h
index 933b416e85..211d434da8 100644
--- a/include/m_system_cpp.h
+++ b/include/m_system_cpp.h
@@ -53,9 +53,9 @@ public:
__inline operator INT_PTR() const { return (INT_PTR)data; }
};
-typedef mir_ptr<char> MCBuf;
-typedef mir_ptr<TCHAR> MTBuf;
-typedef mir_ptr<WCHAR> MWBuf;
+typedef mir_ptr<char> ptrA;
+typedef mir_ptr<TCHAR> ptrT;
+typedef mir_ptr<WCHAR> ptrW;
///////////////////////////////////////////////////////////////////////////////
// mir_cslock - simple locker for the critical sections
diff --git a/include/m_utils.h b/include/m_utils.h
index c738cb924e..17640c6d32 100644
--- a/include/m_utils.h
+++ b/include/m_utils.h
@@ -428,17 +428,17 @@ __forceinline TCHAR* Utils_ReplaceVarsT(const TCHAR *szData) {
#include "m_system_cpp.h"
#endif
- struct VARS : public MCBuf
+ struct VARS : public ptrA
{
__forceinline VARS(const char *str) :
- MCBuf( Utils_ReplaceVars(str))
+ ptrA( Utils_ReplaceVars(str))
{}
};
- struct VARST : public MTBuf
+ struct VARST : public ptrT
{
__forceinline VARST(const TCHAR *str) :
- MTBuf( Utils_ReplaceVarsT(str))
+ ptrT( Utils_ReplaceVarsT(str))
{}
};
#endif
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index 561f5801be..46c84d363d 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];
- MTBuf tszStoredPath(mir_utf8decodeT((char*)dbei.pBlob));
+ ptrT 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 a11448d4c4..721c3a89f5 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);
- MCBuf blob( mir_utf8encodeT(rel_path));
+ ptrA 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 f892ae1ef1..eb48801848 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')) {
- MCBuf pszUtf( mir_utf8encodeT(dbv.ptszVal));
+ ptrA 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 d2077ff74b..4e3f81af69 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];
- MTBuf skinfile( db_get_tsa( NULL, SKIN, "SkinFile"));
+ ptrT 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)
{
- MTBuf skinfile( db_get_tsa(NULL, SKIN, "SkinFile"));
+ ptrT 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 6f01f7408d..b9d9a5748c 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);
- MCBuf szModeName( mir_utf8encodeT(szTempModeName));
+ ptrA 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 b9c5f01355..0b965d5886 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);
- MTBuf frmname( db_get_tsa(0, CLUIFrameModule, settingname));
+ ptrT 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 8ce0252826..0097ff80be 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, MCBuf( mir_urlEncode(str)));
+ mir_snprintf(str, sizeof(str), "http://www.miranda-vi.org/cdlogin?name=%s&pass=%s&redir=%s", user, pass, ptrA( 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 8c57c2885c..6d17d5f99d 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, MTBuf(mir_utf8decodeT(cws->value.pszVal)));
+ ApplyFingerprintImage(hContact, ptrT(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) {
- MTBuf ptszMirVer;
+ ptrT 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 90d3e72ac1..eb6ff7eaeb 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, MCBuf(mir_utf8encode(str)), 500);
+ lstrcpynA(szResult, ptrA(mir_utf8encode(str)), 500);
return szResult;
}
@@ -171,7 +171,7 @@ void ChatHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event)
const char *className = "";
bool showIcon = false;
- MCBuf szName, szText;
+ ptrA 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 e284aafe02..6934a72764 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;
- MCBuf szProto;
+ ptrA 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( MCBuf(getRealProto(hContact)));
+ return getSRMMProtocolSettings( ptrA(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( MCBuf(getRealProto(hContact)));
+ return getHistoryProtocolSettings( ptrA(getRealProto(hContact)));
return Options::getProtocolSettings();
}
@@ -466,7 +466,7 @@ ProtocolSettings* HTMLBuilder::getChatProtocolSettings(const char *protocolName)
ProtocolSettings* HTMLBuilder::getChatProtocolSettings(HANDLE hContact)
{
- return getChatProtocolSettings( MCBuf(getRealProto(hContact)));
+ return getChatProtocolSettings( ptrA(getRealProto(hContact)));
}
void HTMLBuilder::setLastIEViewEvent(IEVIEWEVENT *event)
diff --git a/plugins/IEView/src/HistoryHTMLBuilder.cpp b/plugins/IEView/src/HistoryHTMLBuilder.cpp
index decd8bc6a9..5d454b7f54 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, MCBuf(mir_utf8encode(szResult)), 500);
+ lstrcpynA(szResult, ptrA(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;
- MCBuf szRealProto( getRealProto(event->hContact));
+ ptrA 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)
{
- MCBuf szName, szText;
+ ptrA 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 e7dcbb916c..e6feaa0761 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, MCBuf(mir_utf8encode(szResult)), 500);
+ lstrcpynA(szResult, ptrA(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;
- MCBuf szName, szText;
+ ptrA 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 c55a60f154..642b2083ad 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, MCBuf(mir_utf8encode(szResult)), 500);
+ lstrcpynA(szResult, ptrA(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;
- MCBuf szRealProto( getRealProto(event->hContact));
+ ptrA 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;
}
- MCBuf szName, szText;
+ ptrA 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 bb87bdac92..120024509c 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, MCBuf(mir_utf8encode(szResult)), 500);
+ lstrcpynA(szResult, ptrA(mir_utf8encode(szResult)), 500);
return szResult;
}
@@ -327,7 +327,7 @@ void TabSRMMHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event
isGroupBreak = FALSE;
}
- MCBuf szName, szText;
+ ptrA 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 ecdf765f1d..042702089c 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, MCBuf(mir_utf8encodeT(str)), 500);
+ lstrcpynA(szResult, ptrA(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", MCBuf(Utils::escapeString(tokenVal)));
+ Utils::appendText(&output, &outputSize, "%s", ptrA(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", MCBuf(Utils::escapeString(tokenVal)));
+ Utils::appendText(&output, &outputSize, "%s", ptrA(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 84e01231a9..7730df32b6 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)) {
- MWBuf id( db_get_tsa(hContact, szProto, pszSetting));
+ ptrW 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 a1cd406030..adcaf3f94b 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
- MCBuf pszAstr( mir_t2a(pszSrc));
+ ptrA pszAstr( mir_t2a(pszSrc));
return bWriteToFile(hFile, pszAstr, -1);
}
- MCBuf pszUtf8( mir_utf8encodeT(pszSrc));
+ ptrA 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;
}
- MCBuf pszUtf8( mir_utf8encode(pszSrc));
+ ptrA pszUtf8( mir_utf8encode(pszSrc));
return bWriteToFile(hFile, pszUtf8, -1);
}
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp
index a952f56017..2f3ba4448b 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)) {
- MTBuf tmp((TCHAR*)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_TCHAR));
+ ptrT tmp((TCHAR*)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_TCHAR));
lcopystr(msg, tmp == NULL ? _T("") : tmp, msg_size);
}
else if (ServiceExists(MS_AWAYMSG_GETSTATUSMSG)) {
- MTBuf tmp((TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)aStatus, 0));
+ ptrT 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 d93addd369..9d135f31ee 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"));
- MCBuf pszUtf( mir_utf8encodeT(buf));
+ ptrA pszUtf( mir_utf8encodeT(buf));
mir_sntprintf(buf, SIZEOF(buf), _T(" (%s)"), TranslateT("aborting"));
- MCBuf pszUtf2( mir_utf8encodeT(buf));
+ ptrA pszUtf2( mir_utf8encodeT(buf));
mir_sntprintf(buf, SIZEOF(buf), _T(" (%s)"), TranslateT("playing"));
- MCBuf pszUtf3( mir_utf8encodeT(buf));
+ ptrA 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 deac669fdd..36fdb3c339 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))) {
- MTBuf tszPath( mir_a2t(szPath));
+ ptrT 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 96627ee013..9a54f61846 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 MTBuf
+struct VARST : public ptrT
{
__forceinline VARST(const TCHAR *str) :
- MTBuf( Utils_ReplaceVarsT(str))
+ ptrT( Utils_ReplaceVarsT(str))
{}
};
diff --git a/plugins/PluginUpdater/src/Scanner.cpp b/plugins/PluginUpdater/src/Scanner.cpp
index d198419df7..3653adfd2f 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;
- MTBuf tszBaseUrl((TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)dbVar.ptszVal, (LPARAM)&dat));
+ ptrT 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 f157d7ebab..3582d69b31 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;
- MTBuf tszName( mir_a2t(szName));
+ ptrT 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 fbf62e66fe..fd261098da 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 b49ded9c7f..cf769776f9 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);
- MTBuf pszWord( GetRichTextWord(hwnd, &ptl));
+ ptrT 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)) {
- 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)));
+ ptrT szOldStatus( mir_tstrdup((TCHAR *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM) dat->wStatus, GSMDF_TCHAR)));
+ ptrT 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 7460d211b4..d6602f039f 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]) {
- MCBuf wordUTF( mir_utf8encodeT(word));
- MCBuf wordURL( mir_urlEncode(wordUTF));
+ ptrA wordUTF( mir_utf8encodeT(word));
+ ptrA 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 55ee58c017..f1366e1521 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");
- MCBuf szPlainMsg((ppre->flags & PREF_UNICODE) ? m_awstrcat(Translate(sim402),szEncMsg) : m_aastrcat(Translate(sim402),szEncMsg));
+ ptrA 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;
}
- MCBuf szMsgUtf( utf8_to_miranda(szOldMsg, ppre->flags));
+ ptrA 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 ...
- MCBuf szNewMsg( utf8_to_miranda(szOldMsg, ppre->flags));
+ ptrA 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);
- MCBuf reSend((LPSTR)mir_alloc(strlen(szEncMsg)+LEN_RSND));
+ ptrA 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
- MCBuf keyToSend( InitKeyA(ptr, 0)); // calculate public and private key
+ ptrA 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, MCBuf(decodeMsg(ptr,(LPARAM)pccsd,szEncMsg)));
+ addMsg2Queue(ptr, pccsd->wParam, ptrA(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);
- MCBuf keyToSend( InitKeyA(ptr,CPP_FEATURES_NEWPG|KEY_A_SIG)); // calculate NEW public and private key
+ ptrA 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)) {
- MCBuf keyToSend( InitKeyA(ptr,0)); // calculate public and private key
+ ptrA 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 {
- MCBuf keyToSend( InitKeyA(ptr, CPP_FEATURES_NEWPG | KEY_B_SIG)); // calculate NEW public and private key
+ ptrA 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;
- MCBuf szUtfMsg( miranda_to_utf8((LPCSTR)pccsd->lParam,pccsd->wParam));
+ ptrA 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, MCBuf( miranda_to_utf8((LPCSTR)pccsd->lParam,pccsd->wParam)));
+ exp->rsa_send(ptr->cntx, ptrA( 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, MCBuf(miranda_to_utf8((LPCSTR)pccsd->lParam,pccsd->wParam)));
+ exp->rsa_send(ptr->cntx, ptrA(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");
- MCBuf szNewMsg( encodeMsg(ptr,(LPARAM)pccsd));
+ ptrA 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
- MCBuf keyToSend( InitKeyA(ptr,0)); // calculate public and private key & fill KeyA
+ ptrA 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 87ae2c4e03..de2455ef84 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;
}
- MTBuf
+ ptrT
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 8ced5bc7d3..608da025a6 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;
- MTBuf text = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(i, "Default"));
+ ptrT 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 a74bf594f8..ebc0f3036d 100644
--- a/plugins/SkypeStatusChange/src/stdafx.h
+++ b/plugins/SkypeStatusChange/src/stdafx.h
@@ -64,7 +64,7 @@ class COptions
iStatus(_status)
{}
- MCBuf szProto;
+ ptrA szProto;
int iStatus;
};
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 23bb20b231..6320547b24 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);
- MCBuf pszRtf( Chat_Message_GetFromStream(hwndDlg, si));
+ ptrA pszRtf( Chat_Message_GetFromStream(hwndDlg, si));
SM_AddCommand(si->ptszID, si->pszModule, pszRtf);
- MTBuf ptszText( Chat_DoRtfToTags(pszRtf, si));
+ ptrT 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 3951c4efb1..76c525af53 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;
- MTBuf tszFileName( DbGetEventStringT(dbe, szFileName));
+ ptrT tszFileName( DbGetEventStringT(dbe, szFileName));
TCHAR buf[1024];
if (szDescr && Utils::safe_strlen(szDescr, dbe->cbBlob - sizeof(DWORD) - namelength - 1) > 0) {
- MTBuf tszDescr( DbGetEventStringT(dbe, szDescr));
+ ptrT 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 40bbbeaeb8..fb8d333562 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);
}
- MCBuf szMsg( mir_utf8encodeT(buffer));
+ ptrA 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 f4bcfabd11..9132ad10bd 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*)MTBuf( mir_utf8decodeT(job->sendBuffer)), m_hwndDlg);
+ Utils::CopyToClipBoard((TCHAR*)ptrT( 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 0367e22dcb..d4a3941f7b 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;
- MCBuf pBuf((char*)mir_alloc(memRequired));
+ ptrA 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 d42d8f55db..7341259e7d 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;
- MTBuf string( mir_tstrdup(fi->tszFormat));
+ ptrT 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 1e7491249a..cc51c71e26 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];
- MCBuf szSearchName( mir_utf8encodeT(name));
- wsprintfA(loc, sData->SearchURL, MCBuf( mir_urlEncode(szSearchName)));
+ ptrA szSearchName( mir_utf8encodeT(name));
+ wsprintfA(loc, sData->SearchURL, ptrA( 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 1954c84f15..838705e82f 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, MTBuf(mir_utf8decodeT(dbvuid.pszVal)));
+ _tcscpy(uid, ptrT(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, MTBuf( mir_utf8decodeT(dbvuid.pszVal)));
+ _tcscpy(uid, ptrT( mir_utf8decodeT(dbvuid.pszVal)));
break;
}
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp
index 2a37b58c81..b6e479e9db 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;
- MCBuf szTemplate( mir_utf8encodeT(tszForwardTemplate));
+ ptrA 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( MCBuf(mir_utf8encodeT(pcli->pfnGetContactDisplayName(hContact, 0))));
+ szUtfMsg.append( ptrA(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( MCBuf(mir_utf8encodeT(buf)));
+ szUtfMsg.append( ptrA(mir_utf8encodeT(buf)));
break;
case 't':
case 'T':
_tcsftime(buf, 10, _T("%H:%M"), tm_time);
- szUtfMsg.append( MCBuf(mir_utf8encodeT(buf)));
+ szUtfMsg.append( ptrA(mir_utf8encodeT(buf)));
break;
case 'd':
case 'D':
_tcsftime(buf, 12, _T("%d/%m/%Y"), tm_time);
- szUtfMsg.append( MCBuf(mir_utf8encodeT(buf)));
+ szUtfMsg.append( ptrA(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( MCBuf(mir_utf8encode((char*)dbei.pBlob)));
+ szUtfMsg.append( ptrA(mir_utf8encode((char*)dbei.pBlob)));
break;
case '%':
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp
index 5e08f8f91a..77c3960acd 100644
--- a/protocols/AimOscar/src/utility.cpp
+++ b/protocols/AimOscar/src/utility.cpp
@@ -182,7 +182,7 @@ HANDLE CAimProto::find_chat_contact(const char* room)
HANDLE CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool temporary)
{
- MCBuf norm_sn( normalize_name(sn));
+ ptrA norm_sn( normalize_name(sn));
for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DBVARIANT dbv;
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index f10302491f..2cf3f4cdf7 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -618,7 +618,7 @@ bool facebook_client::login(const std::string &username,const std::string &passw
data += "&email=" + utils::url::encode(username);
data += "&pass=" + utils::url::encode(password);
- MCBuf locale( db_get_sa(NULL, parent->m_szModuleName, FACEBOOK_KEY_LOCALE));
+ ptrA locale( db_get_sa(NULL, parent->m_szModuleName, FACEBOOK_KEY_LOCALE));
if (locale != NULL)
data += "&locale=" + std::string(locale);
@@ -723,7 +723,7 @@ bool facebook_client::login(const std::string &username,const std::string &passw
TCHAR buf[200];
mir_sntprintf(buf, SIZEOF(buf), TranslateT("Login error: %s"),
- (!error_str.length()) ? TranslateT("Unknown error") : MTBuf(mir_utf8decodeT(error_str.c_str())));
+ (!error_str.length()) ? TranslateT("Unknown error") : ptrT(mir_utf8decodeT(error_str.c_str())));
client_notify(buf);
}
case HTTP_CODE_FORBIDDEN: // Forbidden
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index 14c6c3313d..02c130756f 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -174,7 +174,7 @@ void FacebookProto::ReadMessageWorker(void *p)
if (!db_get_b(NULL, m_szModuleName, FACEBOOK_KEY_MARK_READ, 0)) {
// old variant - no seen info updated
- MCBuf id( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID));
+ ptrA id( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID));
if (id == NULL) return;
std::string data = "action=chatMarkRead";
@@ -185,7 +185,7 @@ void FacebookProto::ReadMessageWorker(void *p)
http::response resp = facy.flap(FACEBOOK_REQUEST_ASYNC, &data);
} else {
// new variant - with seen info
- MCBuf mid( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_MESSAGE_ID));
+ ptrA mid( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_MESSAGE_ID));
if (mid == NULL) return;
std::string data = "ids[" + std::string(mid) + "]=true";
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index c20752f50b..c6c0f4401b 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -459,7 +459,7 @@ int FacebookProto::VisitProfile(WPARAM wParam,LPARAM lParam)
std::string url = FACEBOOK_URL_PROFILE;
- MCBuf val = db_get_sa(hContact, m_szModuleName, "Homepage");
+ ptrA val = db_get_sa(hContact, m_szModuleName, "Homepage");
if (val != NULL) {
// Homepage link already present, get it
url = val;
@@ -481,7 +481,7 @@ int FacebookProto::VisitFriendship(WPARAM wParam,LPARAM lParam)
if (wParam == 0 || !IsMyContact(hContact))
return 1;
- MCBuf id = db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID);
+ ptrA id = db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID);
std::string url = FACEBOOK_URL_PROFILE;
url += facy.self_.user_id;
@@ -498,7 +498,7 @@ int FacebookProto::Poke(WPARAM wParam,LPARAM lParam)
HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
- MCBuf id( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID));
+ ptrA id( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID));
if (id == NULL)
return 1;
@@ -520,14 +520,14 @@ int FacebookProto::CancelFriendship(WPARAM wParam,LPARAM lParam)
|| (deleting && db_get_b(hContact, m_szModuleName, FACEBOOK_KEY_CONTACT_TYPE, 0) != FACEBOOK_CONTACT_FRIEND))
return 0;
- MTBuf tname = db_get_tsa(hContact, m_szModuleName, FACEBOOK_KEY_NAME);
+ ptrT tname = db_get_tsa(hContact, m_szModuleName, FACEBOOK_KEY_NAME);
if (tname == NULL)
tname = db_get_tsa(hContact, m_szModuleName, FACEBOOK_KEY_ID);
TCHAR tstr[256];
if (MessageBox(0, tstr, m_tszUserName, MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2) == IDYES) {
- MCBuf id = db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID);
+ ptrA id = db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID);
if (id == NULL)
return 1;
@@ -552,7 +552,7 @@ int FacebookProto::RequestFriendship(WPARAM wParam,LPARAM lParam)
HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
- MCBuf id = db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID);
+ ptrA id = db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID);
if (id == NULL)
return 1;
diff --git a/protocols/FacebookRM/src/utils.cpp b/protocols/FacebookRM/src/utils.cpp
index f3b5c62640..10214d970c 100644
--- a/protocols/FacebookRM/src/utils.cpp
+++ b/protocols/FacebookRM/src/utils.cpp
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
std::string utils::url::encode(const std::string &s)
{
- return (char*)MCBuf(mir_urlEncode(s.c_str()));
+ return (char*)ptrA(mir_urlEncode(s.c_str()));
}
std::string utils::url::decode(std::string data)
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp
index cc54281dc4..46d08fc594 100644
--- a/protocols/GTalkExt/src/handlers.cpp
+++ b/protocols/GTalkExt/src/handlers.cpp
@@ -214,10 +214,10 @@ void RequestMail(LPCTSTR jidWithRes, IJabberInterface *ji)
xi.addAttr(node, ATTRNAME_FROM, jidWithRes);
UINT uID = ji->Net()->SerialNext();
- MTBuf jid( ExtractJid(jidWithRes));
+ ptrT jid( ExtractJid(jidWithRes));
xi.addAttr(node, ATTRNAME_TO, jid);
- MTBuf
+ ptrT
lastMailTime( ReadJidSetting(LAST_MAIL_TIME_FROM_JID, jid)),
lastThreadId( ReadJidSetting(LAST_THREAD_ID_FROM_JID, jid));
@@ -280,7 +280,7 @@ void SetNotificationSetting(LPCTSTR jidWithResource, IJabberInterface *ji)
xi.addAttr(node, ATTRNAME_TYPE, IQTYPE_SET);
xi.addAttr(node, ATTRNAME_FROM, jidWithResource);
- MTBuf jid( ExtractJid(jidWithResource));
+ ptrT jid( ExtractJid(jidWithResource));
xi.addAttr(node, ATTRNAME_TO, jid);
TCHAR id[30];
diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp
index 60f8896f23..5608a7794f 100644
--- a/protocols/GTalkExt/src/inbox.cpp
+++ b/protocols/GTalkExt/src/inbox.cpp
@@ -91,7 +91,7 @@ LPSTR HttpPost(HANDLE hUser, LPSTR reqUrl, LPSTR reqParams)
LPSTR MakeRequest(HANDLE hUser, LPSTR reqUrl, LPSTR reqParamsFormat, LPSTR p1, LPSTR p2)
{
- MCBuf encodedP1( mir_urlEncode(p1)), encodedP2( mir_urlEncode(p2));
+ ptrA encodedP1( mir_urlEncode(p1)), encodedP2( mir_urlEncode(p2));
LPSTR reqParams = (LPSTR)alloca(lstrlenA(reqParamsFormat) + 1 + lstrlenA(encodedP1) + lstrlenA(encodedP2));
sprintf(reqParams, reqParamsFormat, encodedP1, encodedP2);
return HttpPost(hUser, reqUrl, reqParams);
@@ -119,7 +119,7 @@ LPSTR FindSid(LPSTR resp, LPSTR *LSID)
void DoOpenUrl(LPSTR tokenResp, LPSTR url)
{
- MCBuf encodedUrl( mir_urlEncode(url)), encodedToken( mir_urlEncode(tokenResp));
+ ptrA encodedUrl( mir_urlEncode(url)), encodedToken( mir_urlEncode(tokenResp));
LPSTR composedUrl = (LPSTR)alloca(lstrlenA(TOKEN_AUTH_URL) + 1 + lstrlenA(encodedToken) + lstrlenA(encodedUrl));
sprintf(composedUrl, TOKEN_AUTH_URL, encodedToken, encodedUrl);
CallService(MS_UTILS_OPENURL, 0, (LPARAM)composedUrl);
@@ -127,13 +127,13 @@ void DoOpenUrl(LPSTR tokenResp, LPSTR url)
BOOL AuthAndOpen(HANDLE hUser, LPSTR url, LPSTR mailbox, LPSTR pwd)
{
- MCBuf authResp( MakeRequest(hUser, AUTH_REQUEST_URL, AUTH_REQUEST_PARAMS, mailbox, pwd));
+ ptrA authResp( MakeRequest(hUser, AUTH_REQUEST_URL, AUTH_REQUEST_PARAMS, mailbox, pwd));
if (!authResp)
return FALSE;
LPSTR LSID;
LPSTR SID = FindSid(authResp, &LSID);
- MCBuf tokenResp( MakeRequest(hUser, ISSUE_TOKEN_REQUEST_URL, ISSUE_TOKEN_REQUEST_PARAMS, SID, LSID));
+ ptrA tokenResp( MakeRequest(hUser, ISSUE_TOKEN_REQUEST_URL, ISSUE_TOKEN_REQUEST_PARAMS, SID, LSID));
if (!tokenResp)
return FALSE;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index c9bbcac8b4..f532995637 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -158,7 +158,7 @@ void GGPROTO::cleanuplastplugin(DWORD version)
TCHAR avatarsPath[MAX_PATH];
if (hAvatarsFolder == NULL || FoldersGetCustomPathT(hAvatarsFolder, avatarsPath, MAX_PATH, _T(""))) {
- MTBuf tmpPath( Utils_ReplaceVarsT( _T("%miranda_avatarcache%")));
+ ptrT tmpPath( Utils_ReplaceVarsT( _T("%miranda_avatarcache%")));
mir_sntprintf(avatarsPath, MAX_PATH, _T("%s\\%s"), (TCHAR*)tmpPath, m_tszUserName);
}
netlog("cleanuplastplugin() 1: miranda_avatarcache = %S", avatarsPath);
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index cb851cab0b..5a6b38d9b6 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -1029,7 +1029,7 @@ void* GGPROTO::img_loadpicture(gg_event* e, TCHAR *szFileName)
dat->lpData = (char*)malloc(dat->nSize);
memcpy(dat->lpData, e->event.image_reply.image, dat->nSize);
- MTBuf tmpFileName( mir_a2t(e->event.image_reply.filename));
+ ptrT tmpFileName( mir_a2t(e->event.image_reply.filename));
if (!gg_img_hasextension(tmpFileName)) {
// Add missing file extension
const TCHAR *szImgType = gg_img_guessfileextension(dat->lpData);
diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp
index 9c09b1a1fb..5e6f742547 100644
--- a/protocols/JabberG/src/jabber_archive.cpp
+++ b/protocols/JabberG/src/jabber_archive.cpp
@@ -292,7 +292,7 @@ void CJabberProto::OnIqResultGetCollection(HXML iqNode)
if (!tszBody || !tszSecs)
continue;
- MCBuf szEventText( mir_utf8encodeT(tszBody));
+ ptrA szEventText( mir_utf8encodeT(tszBody));
DBEVENTINFO dbei = { sizeof(DBEVENTINFO) };
dbei.eventType = EVENTTYPE_MESSAGE;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 83ed88f04b..6e7a0cc115 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -1346,7 +1346,7 @@ static void sttLogListHook(CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK* g
mir_sntprintf(szCaption, SIZEOF(szCaption), _T("%s %s"), TranslateT("Set topic for"), gch->pDest->ptszID);
{
size_t cbLen = 2048 + lstrlen(item->itemResource.statusMessage)*2;
- MTBuf ptszBuf((TCHAR*)mir_alloc( sizeof(TCHAR) * cbLen));
+ ptrT ptszBuf((TCHAR*)mir_alloc( sizeof(TCHAR) * cbLen));
if (item->itemResource.statusMessage) {
TCHAR *d = ptszBuf;
for (int i = 0; i < (int)cbLen; i++) {
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 049c110f05..920a5454d6 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -1150,7 +1150,7 @@ static char PGP_EPILOG[] = "\r\n-----END PGP MESSAGE-----\r\n";
int __cdecl CJabberProto::SendMsg(HANDLE hContact, int flags, const char* pszSrc)
{
- MTBuf ptszJid( db_get_tsa(hContact, m_szModuleName, "jid"));
+ ptrT ptszJid( db_get_tsa(hContact, m_szModuleName, "jid"));
if ( !m_bJabberOnline || ptszJid == NULL) {
TFakeAckParams *param = new TFakeAckParams(hContact, Translate("Protocol is offline or no jid"));
JForkThread(&CJabberProto::SendMessageAckThread, param);
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp
index d21cba9719..a0a7fe974f 100644
--- a/protocols/JabberG/src/jabber_xstatus.cpp
+++ b/protocols/JabberG/src/jabber_xstatus.cpp
@@ -1383,12 +1383,12 @@ INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM wParam, LPARAM lParam)
else {
*pData->ptszName = 0;
if (pData->flags & CSSF_UNICODE) {
- MTBuf title( ReadAdvStatusT(hContact, ADVSTATUS_MOOD, ADVSTATUS_VAL_TITLE));
+ ptrT title( ReadAdvStatusT(hContact, ADVSTATUS_MOOD, ADVSTATUS_VAL_TITLE));
if (title)
_tcsncpy(pData->ptszName, title, STATUS_TITLE_MAX);
}
else {
- MCBuf title( ReadAdvStatusA(hContact, ADVSTATUS_MOOD, ADVSTATUS_VAL_TITLE));
+ ptrA title( ReadAdvStatusA(hContact, ADVSTATUS_MOOD, ADVSTATUS_VAL_TITLE));
if (title)
strncpy(pData->pszName, title, STATUS_TITLE_MAX);
}
@@ -1399,12 +1399,12 @@ INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM wParam, LPARAM lParam)
if (pData->flags & CSSF_MASK_MESSAGE) {
*pData->pszMessage = 0;
if (pData->flags & CSSF_UNICODE) {
- MTBuf title( ReadAdvStatusT(hContact, ADVSTATUS_MOOD, ADVSTATUS_VAL_TEXT));
+ ptrT title( ReadAdvStatusT(hContact, ADVSTATUS_MOOD, ADVSTATUS_VAL_TEXT));
if (title)
_tcsncpy(pData->ptszMessage, title, STATUS_TITLE_MAX);
}
else {
- MCBuf title( ReadAdvStatusA(hContact, ADVSTATUS_MOOD, ADVSTATUS_VAL_TEXT));
+ ptrA title( ReadAdvStatusA(hContact, ADVSTATUS_MOOD, ADVSTATUS_VAL_TEXT));
if (title)
strncpy(pData->pszMessage, title, STATUS_TITLE_MAX);
}
diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp
index 1eb45085be..00f7558033 100644
--- a/protocols/MRA/src/MraSendCommand.cpp
+++ b/protocols/MRA/src/MraSendCommand.cpp
@@ -105,7 +105,7 @@ DWORD CMraProto::MraMessageW(BOOL bAddToQueue, HANDLE hContact, DWORD dwAckType,
dwFlags |= MESSAGE_FLAG_RTF;
lpszMessageRTF = (LPSTR)mir_calloc(dwRFTBuffSize);
- MCBuf lpbRTFData((char*)mir_calloc(dwRFTBuffSize));
+ ptrA lpbRTFData((char*)mir_calloc(dwRFTBuffSize));
if (lpszMessageRTF && lpbRTFData) {
DWORD dwBackColour = mraGetDword(NULL, "RTFBackgroundColour", MRA_DEFAULT_RTF_BACKGROUND_COLOUR);
lpbDataCurrent = (LPBYTE)lpszMessageRTF;
@@ -130,7 +130,7 @@ DWORD CMraProto::MraMessageW(BOOL bAddToQueue, HANDLE hContact, DWORD dwAckType,
size_t dwRFTBuffSize = (((dwMessageSize*sizeof(WCHAR))*16)+8192), dwRTFDataSize;
lpszMessageRTF = (LPSTR)mir_calloc(dwRFTBuffSize);
- MCBuf lpbRTFData((char*)mir_calloc(dwRFTBuffSize));
+ ptrA lpbRTFData((char*)mir_calloc(dwRFTBuffSize));
if (lpszMessageRTF && lpbRTFData) {
if ( !MraConvertToRTFW(lpwszMessage, dwMessageSize, (LPSTR)lpbRTFData, dwRFTBuffSize, &dwRTFDataSize)) {
DWORD dwBackColour = mraGetDword(NULL, "RTFBackgroundColour", MRA_DEFAULT_RTF_BACKGROUND_COLOUR);
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp
index 0852b973cc..58faf4bd1e 100644
--- a/protocols/MRA/src/Mra_svcs.cpp
+++ b/protocols/MRA/src/Mra_svcs.cpp
@@ -186,7 +186,7 @@ INT_PTR CMraProto::MraSendSMS(WPARAM wParam, LPARAM lParam)
if (!m_bLoggedIn || !wParam || !lParam)
return 0;
- MWBuf lpwszMessageXMLEncoded( mir_utf8decodeW((LPSTR)lParam));
+ ptrW lpwszMessageXMLEncoded( mir_utf8decodeW((LPSTR)lParam));
size_t dwBuffLen = lstrlenA((LPSTR)lParam) + MAX_PATH;
LPWSTR lpwszMessageXMLDecoded = (LPWSTR)mir_calloc((dwBuffLen*sizeof(WCHAR)));
if (lpwszMessageXMLEncoded && lpwszMessageXMLDecoded) {
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 49a10ef339..b4b7ed8478 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -827,7 +827,7 @@ void CMsnProto::sttProcessStatusMessage(char* buf, unsigned len, const char* wli
else db_unset(hContact, "CList", "StatusMsg");
{
- MTBuf tszStatus( mir_utf8decodeT(szStatMsg));
+ ptrT tszStatus( mir_utf8decodeT(szStatMsg));
SendBroadcast(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, NULL, tszStatus);
}
diff --git a/protocols/Omegle/src/utils.cpp b/protocols/Omegle/src/utils.cpp
index b530ee84c3..d8c5837cb0 100644
--- a/protocols/Omegle/src/utils.cpp
+++ b/protocols/Omegle/src/utils.cpp
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
std::string utils::url::encode(const std::string &s)
{
- return (char*)MCBuf( mir_urlEncode( s.c_str()));
+ return (char*)ptrA( mir_urlEncode( s.c_str()));
}
void utils::text::replace_first( std::string* data, std::string from, std::string to )
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp
index c9a7f319ee..dd2219e6f7 100644
--- a/protocols/Twitter/src/chat.cpp
+++ b/protocols/Twitter/src/chat.cpp
@@ -69,7 +69,7 @@ int TwitterProto::OnChatOutgoing(WPARAM wParam,LPARAM lParam)
case GC_USER_MESSAGE:
LOG ( _T("**Chat - Outgoing message: %s"), hook->ptszText);
{
- MCBuf text( mir_utf8encodeT(hook->ptszText));
+ ptrA text( mir_utf8encodeT(hook->ptszText));
std::string tweet(text);
replaceAll(tweet, "%%", "%"); // the chat plugin will turn "%" into "%%", so we have to change it back :/
@@ -81,7 +81,7 @@ int TwitterProto::OnChatOutgoing(WPARAM wParam,LPARAM lParam)
case GC_USER_PRIVMESS:
{
- MCBuf text( mir_t2a(hook->ptszUID));
+ ptrA text( mir_t2a(hook->ptszUID));
CallService(MS_MSG_SENDMESSAGE, WPARAM(UsernameToHContact(text)), 0);
}
break;
diff --git a/protocols/Twitter/src/http.cpp b/protocols/Twitter/src/http.cpp
index 711aa321ee..3d0414b7d5 100644
--- a/protocols/Twitter/src/http.cpp
+++ b/protocols/Twitter/src/http.cpp
@@ -23,5 +23,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
std::string http::url_encode(const std::string &s)
{
- return (char*)MCBuf( mir_urlEncode( s.c_str()));
+ return (char*)ptrA( mir_urlEncode( s.c_str()));
}
diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp
index 30220bdffd..928595c61c 100644
--- a/protocols/Yahoo/src/im.cpp
+++ b/protocols/Yahoo/src/im.cpp
@@ -180,7 +180,7 @@ int __cdecl CYahooProto::SendMsg( HANDLE hContact, int flags, const char* pszSrc
return 1;
}
- MCBuf msg;
+ ptrA msg;
if (flags & PREF_UNICODE) /* convert to utf8 */
msg = mir_utf8encodeW(( wchar_t* )&pszSrc[ strlen(pszSrc)+1 ] );
else if ( flags & PREF_UTF )
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp
index f56efaba62..1270da32e2 100644
--- a/protocols/Yahoo/src/proto.cpp
+++ b/protocols/Yahoo/src/proto.cpp
@@ -209,9 +209,9 @@ int CYahooProto::Authorize( HANDLE hdbe )
/* Need to remove the buddy from our Miranda Lists */
HANDLE hContact = DbGetAuthEventContact(&dbei);
if (hContact != NULL) {
- MCBuf who( db_get_sa(hContact, m_szModuleName, YAHOO_LOGINID));
+ ptrA who( db_get_sa(hContact, m_szModuleName, YAHOO_LOGINID));
if (who) {
- MCBuf myid( db_get_sa(hContact, m_szModuleName, "MyIdentity"));
+ ptrA myid( db_get_sa(hContact, m_szModuleName, "MyIdentity"));
DebugLog("Accepting buddy:%s", who);
accept(myid, who, GetWord(hContact, "yprotoid", 0));
}
@@ -254,10 +254,10 @@ int CYahooProto::AuthDeny( HANDLE hdbe, const TCHAR* reason )
/* Need to remove the buddy from our Miranda Lists */
HANDLE hContact = DbGetAuthEventContact(&dbei);
if (hContact != NULL) {
- MCBuf who( db_get_sa(hContact, m_szModuleName, YAHOO_LOGINID));
+ ptrA who( db_get_sa(hContact, m_szModuleName, YAHOO_LOGINID));
if (who) {
- MCBuf myid( db_get_sa(hContact, m_szModuleName, "MyIdentity"));
- MCBuf u_reason( mir_utf8encodeT(reason));
+ ptrA myid( db_get_sa(hContact, m_szModuleName, "MyIdentity"));
+ ptrA u_reason( mir_utf8encodeT(reason));
DebugLog("Rejecting buddy:%s msg: %s", who, u_reason);
reject(myid, who, GetWord(hContact, "yprotoid", 0), u_reason);
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp
index f3b8d6a438..e0bd6f5e34 100644
--- a/protocols/Yahoo/src/yahoo.cpp
+++ b/protocols/Yahoo/src/yahoo.cpp
@@ -586,7 +586,7 @@ void CYahooProto::ext_got_calendar(const char *url, int type, const char *msg, i
{
LOG(("[ext_got_calendar] URL:%s type: %d msg: %s svc: %d", url, type, msg, svc));
- MTBuf tszMsg(mir_utf8decodeT(msg));
+ ptrT tszMsg(mir_utf8decodeT(msg));
if (!ShowPopup( TranslateT("Calendar Reminder"), tszMsg, url))
ShowNotification(TranslateT("Calendar Reminder"), tszMsg, NIIF_INFO);
}
@@ -731,8 +731,8 @@ void CYahooProto::ext_rejected(const char *who, const char *msg)
}
else LOG(("[ext_rejected] Buddy not on our buddy list"));
- MTBuf tszWho( mir_utf8decodeT(who));
- MTBuf tszMsg( mir_utf8decodeT(msg));
+ ptrT tszWho( mir_utf8decodeT(who));
+ ptrT tszMsg( mir_utf8decodeT(msg));
TCHAR buff[1024];
mir_sntprintf(buff, SIZEOF(buff), TranslateT("%s has rejected your request and sent the following message:"), (TCHAR*)tszWho);
@@ -991,8 +991,8 @@ void CYahooProto::ext_mail_notify(const char *from, const char *subj, int cnt)
else {
mir_sntprintf(title, SIZEOF(title), TranslateT("New Mail (%i msgs)"), cnt);
- MTBuf tszFrom( mir_utf8decodeT(from));
- MTBuf tszSubj( mir_utf8decodeT(subj));
+ ptrT tszFrom( mir_utf8decodeT(from));
+ ptrT tszSubj( mir_utf8decodeT(subj));
mir_sntprintf(z, SIZEOF(z), TranslateT("From: %s\nSubject: %s"), (TCHAR*)tszFrom, (TCHAR*)tszSubj);
}
@@ -1009,8 +1009,8 @@ void CYahooProto::ext_system_message(const char *me, const char *who, const char
{
LOG(("[ext_system_message] System Message to: %s from: %s msg: %s", me, who, msg));
- MTBuf tszWho( mir_utf8decodeT(who));
- MTBuf tszMsg( mir_utf8decodeT(msg));
+ ptrT tszWho( mir_utf8decodeT(who));
+ ptrT tszMsg( mir_utf8decodeT(msg));
ShowPopup((who != NULL) ? tszWho : TranslateT("Yahoo System Message"), tszMsg, NULL);
}
@@ -1069,7 +1069,7 @@ void CYahooProto::ext_got_ping(const char *errormsg)
if (errormsg) {
LOG(("[ext_got_ping] Error msg: %s", errormsg));
- MTBuf tszMsg( mir_utf8decodeT(errormsg));
+ ptrT tszMsg( mir_utf8decodeT(errormsg));
ShowError( TranslateT("Yahoo Ping Error"), tszMsg);
return;
}
@@ -1168,7 +1168,7 @@ void CYahooProto::ext_login_response(int succ, const char *url)
void CYahooProto::ext_error(const char *err, int fatal, int num)
{
- MTBuf tszErr( mir_utf8decodeT(err));
+ ptrT tszErr( mir_utf8decodeT(err));
TCHAR buff[1024];
LOG(("[ext_error] Error: fatal: %d, num: %d, err: %s", fatal, num, err));
diff --git a/src/core/stdauth/authdialogs.cpp b/src/core/stdauth/authdialogs.cpp
index 72b8064114..2d265591f7 100644
--- a/src/core/stdauth/authdialogs.cpp
+++ b/src/core/stdauth/authdialogs.cpp
@@ -179,11 +179,11 @@ INT_PTR CALLBACK DlgProcAuthReq(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
PROTOACCOUNT* acc = ProtoGetAccount(dbei.szModule);
- MTBuf lastT(dbei.flags & DBEF_UTF ? Utf8DecodeT(last) : mir_a2t(last));
- MTBuf firstT(dbei.flags & DBEF_UTF ? Utf8DecodeT(first) : mir_a2t(first));
- MTBuf nickT(dbei.flags & DBEF_UTF ? Utf8DecodeT(nick) : mir_a2t(nick));
- MTBuf emailT(dbei.flags & DBEF_UTF ? Utf8DecodeT(email) : mir_a2t(email));
- MTBuf reasonT(dbei.flags & DBEF_UTF ? Utf8DecodeT(reason) : mir_a2t(reason));
+ ptrT lastT(dbei.flags & DBEF_UTF ? Utf8DecodeT(last) : mir_a2t(last));
+ ptrT firstT(dbei.flags & DBEF_UTF ? Utf8DecodeT(first) : mir_a2t(first));
+ ptrT nickT(dbei.flags & DBEF_UTF ? Utf8DecodeT(nick) : mir_a2t(nick));
+ ptrT emailT(dbei.flags & DBEF_UTF ? Utf8DecodeT(email) : mir_a2t(email));
+ ptrT reasonT(dbei.flags & DBEF_UTF ? Utf8DecodeT(reason) : mir_a2t(reason));
TCHAR name[128] = _T("");
int off = 0;
diff --git a/src/core/stdfile/filerecvdlg.cpp b/src/core/stdfile/filerecvdlg.cpp
index ae42779071..476ae54918 100644
--- a/src/core/stdfile/filerecvdlg.cpp
+++ b/src/core/stdfile/filerecvdlg.cpp
@@ -258,13 +258,13 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
dat->fs = cle->lParam ? (HANDLE)cle->lParam : (HANDLE)*(PDWORD)dbei.pBlob;
char *str = (char*)dbei.pBlob + 4;
- MTBuf ptszFileName( DbGetEventStringT(&dbei, str));
+ ptrT ptszFileName( DbGetEventStringT(&dbei, str));
SetDlgItemText(hwndDlg, IDC_FILENAMES, ptszFileName);
unsigned len = (unsigned)strlen(str) + 1;
if (len + 4 < dbei.cbBlob) {
str += len;
- MTBuf ptszDescription( DbGetEventStringT(&dbei, str));
+ ptrT ptszDescription( DbGetEventStringT(&dbei, str));
SetDlgItemText(hwndDlg, IDC_MSG, ptszDescription);
}
}
diff --git a/src/modules/clist/movetogroup.cpp b/src/modules/clist/movetogroup.cpp
index d994e30592..8351010ac5 100644
--- a/src/modules/clist/movetogroup.cpp
+++ b/src/modules/clist/movetogroup.cpp
@@ -100,7 +100,7 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM)
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)lphGroupsItems[i], 0);
lphGroupsItems.destroy();
- MTBuf szContactGroup( db_get_tsa((HANDLE)wParam, "CList", "Group"));
+ ptrT szContactGroup( db_get_tsa((HANDLE)wParam, "CList", "Group"));
int pos = 1000;
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp
index fb06bb4ee4..1a34874b83 100644
--- a/src/modules/extraicons/extraicons.cpp
+++ b/src/modules/extraicons/extraicons.cpp
@@ -363,7 +363,7 @@ INT_PTR ExtraIcon_Register(WPARAM wParam, LPARAM lParam)
if (ei->type == EXTRAICON_TYPE_CALLBACK && (ei->ApplyIcon == NULL || ei->RebuildIcons == NULL))
return 0;
- MTBuf tszDesc( mir_a2t(ei->description));
+ ptrT tszDesc( mir_a2t(ei->description));
TCHAR *desc = TranslateTH(lParam, tszDesc);
BaseExtraIcon *extra = GetExtraIconByName(ei->name);
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp
index d47ad558c0..5d995447bb 100644
--- a/src/modules/options/options.cpp
+++ b/src/modules/options/options.cpp
@@ -1256,10 +1256,10 @@ static void OpenOptionsNow(int hLangpack, const char *pszGroup, const char *pszP
ShowWindow(hwndOptions, SW_RESTORE);
SetForegroundWindow(hwndOptions);
if (pszPage != NULL) {
- MTBuf ptszPage( mir_a2t(pszPage));
+ ptrT ptszPage( mir_a2t(pszPage));
HTREEITEM hItem = NULL;
if (pszGroup != NULL) {
- MTBuf ptszGroup( mir_a2t(pszGroup));
+ ptrT ptszGroup( mir_a2t(pszGroup));
hItem = FindNamedTreeItemAtRoot( GetDlgItem(hwndOptions, IDC_PAGETREE), TranslateTH(hLangpack, ptszGroup));
if (hItem != NULL)
hItem = FindNamedTreeItemAtChildren( GetDlgItem(hwndOptions, IDC_PAGETREE), hItem, TranslateTH(hLangpack, ptszPage));
diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp
index a424516d5f..c985d44a6e 100644
--- a/src/modules/plugins/pluginopts.cpp
+++ b/src/modules/plugins/pluginopts.cpp
@@ -366,19 +366,19 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
ListView_GetItemText(hwndList, hdr->iItem, 1, buf, SIZEOF(buf));
SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGININFOFRAME), sel ? buf : _T(""));
- MTBuf tszAuthor( latin2t(sel ? dat->author : NULL));
+ ptrT tszAuthor( latin2t(sel ? dat->author : NULL));
SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINAUTHOR), tszAuthor);
- MTBuf tszEmail( latin2t(sel ? dat->authorEmail : NULL));
+ ptrT tszEmail( latin2t(sel ? dat->authorEmail : NULL));
SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINEMAIL), tszEmail);
- MTBuf p( Langpack_PcharToTchar(dat->description));
+ ptrT p( Langpack_PcharToTchar(dat->description));
SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINLONGINFO), sel ? (TCHAR*)p : _T(""));
- MTBuf tszCopyright( latin2t(sel ? dat->copyright : NULL));
+ ptrT tszCopyright( latin2t(sel ? dat->copyright : NULL));
SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINCPYR), tszCopyright);
- MTBuf tszUrl( latin2t(sel ? dat->homepage : NULL));
+ ptrT tszUrl( latin2t(sel ? dat->homepage : NULL));
SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINURL), tszUrl);
if ( !equalUUID(miid_last, dat->uuid)) {
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp
index 9eba7673ee..ef2a4b7eac 100644
--- a/src/modules/protocols/protocols.cpp
+++ b/src/modules/protocols/protocols.cpp
@@ -165,7 +165,7 @@ static INT_PTR Proto_RecvMessage(WPARAM, LPARAM lParam)
if (pre->szMessage == NULL)
return NULL;
- MCBuf pszTemp;
+ ptrA pszTemp;
DBEVENTINFO dbei = { 0 };
dbei.cbSize = sizeof(dbei);