summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-05-16 15:19:22 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-05-16 15:19:22 +0000
commit011137bd4d5ef75cfb832f82a0cb47b06124a022 (patch)
treeb074d2b22acbc4eac3c39e01c4842a5f908c2c3f /protocols
parentfa02e76e325bfec6ca2737fcb086cab4e3de3cba (diff)
words of wisdom were well received
now the shortened types are called ptrA, ptrT & ptrW respectively git-svn-id: http://svn.miranda-ng.org/main/trunk@4682 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-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
22 files changed, 51 insertions, 51 deletions
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));