diff options
author | George Hazan <george.hazan@gmail.com> | 2013-05-16 15:08:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-05-16 15:08:49 +0000 |
commit | 2e4abd268c71f15bcf73c49a5005f128ffd8ee96 (patch) | |
tree | 92624c24bafa4a02eb7e7fd2501a988e385ffab3 /plugins/IEView | |
parent | 769714b0aa9606e0d94a9d88c7c3ee3064792e4a (diff) |
shortened typedefs for string buffers:
MCBuf -> mir_ptr<char>
MTBuf -> mir_ptr<TCHAR>
MWBuf -> mir_ptr<WCHAR>
git-svn-id: http://svn.miranda-ng.org/main/trunk@4680 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IEView')
-rw-r--r-- | plugins/IEView/src/ChatHTMLBuilder.cpp | 4 | ||||
-rw-r--r-- | plugins/IEView/src/HTMLBuilder.cpp | 8 | ||||
-rw-r--r-- | plugins/IEView/src/HistoryHTMLBuilder.cpp | 6 | ||||
-rw-r--r-- | plugins/IEView/src/MUCCHTMLBuilder.cpp | 4 | ||||
-rw-r--r-- | plugins/IEView/src/ScriverHTMLBuilder.cpp | 6 | ||||
-rw-r--r-- | plugins/IEView/src/TabSRMMHTMLBuilder.cpp | 4 | ||||
-rw-r--r-- | plugins/IEView/src/TemplateHTMLBuilder.cpp | 6 |
7 files changed, 19 insertions, 19 deletions
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);
}
|