diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:23:03 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:23:03 +0000 |
commit | efd438ad7b533ba2adb4f22a1cb358ee449db825 (patch) | |
tree | a5a4a84ee1b46b8902fc646d42056d574369b85a /plugins/TabSRMM/src | |
parent | 65c19c2a4f8e907c56fbdbfb5bf500f33c218574 (diff) |
new mir_sntprintf templates without SIZEOF
git-svn-id: http://svn.miranda-ng.org/main/trunk@14004 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/chat/log.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/services.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/tools.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/eventpopups.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/infopanel.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/srmm.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/taskbar.cpp | 12 | ||||
-rw-r--r-- | plugins/TabSRMM/src/themes.cpp | 16 | ||||
-rw-r--r-- | plugins/TabSRMM/src/userprefs.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/utils.cpp | 4 |
16 files changed, 46 insertions, 50 deletions
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp index 55bfc761b6..86cb4817cc 100644 --- a/plugins/TabSRMM/src/chat/log.cpp +++ b/plugins/TabSRMM/src/chat/log.cpp @@ -115,7 +115,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR ** szTemp3[1] = line[2];
szTemp3[2] = '\0';
col = _ttoi(szTemp3);
- mir_sntprintf(szTemp, SIZEOF(szTemp), _T("%%%c#%02X%02X%02X"), c, GetRValue(mi->crColors[col]), GetGValue(mi->crColors[col]), GetBValue(mi->crColors[col]));
+ mir_sntprintf(szTemp, _T("%%%c#%02X%02X%02X"), c, GetRValue(mi->crColors[col]), GetGValue(mi->crColors[col]), GetBValue(mi->crColors[col]));
}
}
line += 2;
@@ -123,7 +123,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR ** case 'C':
case 'F':
if (!g_Settings.bStripFormat && !streamData->bStripFormat) {
- mir_sntprintf(szTemp, SIZEOF(szTemp), _T("%%%c"), *line);
+ mir_sntprintf(szTemp, _T("%%%c"), *line);
}
break;
case 'b':
@@ -134,7 +134,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR ** case 'I':
case 'r':
if (!streamData->bStripFormat) {
- mir_sntprintf(szTemp, SIZEOF(szTemp), _T("%%%c"), *line);
+ mir_sntprintf(szTemp, _T("%%%c"), *line);
}
break;
}
@@ -542,7 +542,7 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData) _tcsncpy_s(szTemp2, szTemp, _TRUNCATE);
if (streamData->lin->ptszUserInfo && streamData->lin->iType != GC_EVENT_TOPIC)
- mir_sntprintf(szTemp, SIZEOF(szTemp), _T("%s (%s)"), szTemp2, streamData->lin->ptszUserInfo);
+ mir_sntprintf(szTemp, _T("%s (%s)"), szTemp2, streamData->lin->ptszUserInfo);
else
_tcsncpy_s(szTemp, szTemp2, _TRUNCATE);
pszNick = szTemp;
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 46c67ba0a1..8fcecf9662 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -37,7 +37,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, _T("default"), 6)) {
if ((pContainer = FindMatchingContainer(_T("default"))) == NULL) {
TCHAR szName[CONTAINER_NAMELEN + 1];
- mir_sntprintf(szName, SIZEOF(szName), _T("default"));
+ mir_sntprintf(szName, _T("default"));
if ((pContainer = CreateContainer(szName, CNT_CREATEFLAG_CLONED, hContact)) == NULL)
return 0;
}
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp index 6bb9e78f08..c0aea1f488 100644 --- a/plugins/TabSRMM/src/chat/tools.cpp +++ b/plugins/TabSRMM/src/chat/tools.cpp @@ -545,7 +545,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO else if (iIndex == 0) {
TCHAR szTemp[50];
if (pszWordText)
- mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("&Message %s"), pszWordText);
+ mir_sntprintf(szTemp, TranslateT("&Message %s"), pszWordText);
else
_tcsncpy_s(szTemp, TranslateT("&Message"), _TRUNCATE);
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index ae45ebdf77..c062388cb6 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -1901,19 +1901,19 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar switch (si->iType) { case GCW_CHATROOM: hIcon = LoadSkinnedProtoIcon(si->pszModule, (dat->wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : dat->wStatus); - mir_sntprintf(szTemp, SIZEOF(szTemp), + mir_sntprintf(szTemp, (si->nUsersInNicklist == 1) ? TranslateT("%s: chat room (%u user%s)") : TranslateT("%s: chat room (%u users%s)"), szNick, si->nUsersInNicklist, si->bFilterEnabled ? TranslateT(", event filter active") : _T("")); break; case GCW_PRIVMESS: hIcon = LoadSkinnedProtoIcon(si->pszModule, (dat->wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : dat->wStatus); if (si->nUsersInNicklist == 1) - mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("%s: message session"), szNick); + mir_sntprintf(szTemp, TranslateT("%s: message session"), szNick); else - mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("%s: message session (%u users)"), szNick, si->nUsersInNicklist); + mir_sntprintf(szTemp, TranslateT("%s: message session (%u users)"), szNick, si->nUsersInNicklist); break; case GCW_SERVER: - mir_sntprintf(szTemp, SIZEOF(szTemp), _T("%s: Server"), szNick); + mir_sntprintf(szTemp, _T("%s: Server"), szNick); hIcon = LoadIconEx("window"); break; } diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index f7d9d81686..f9a9bdf5bb 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -468,13 +468,13 @@ static TCHAR* GetPreviewT(WORD eventType, DBEVENTINFO* dbe) if (szDescr && Utils::safe_strlen(szDescr, dbe->cbBlob - sizeof(DWORD) - namelength - 1) > 0) {
ptrT tszDescr(DbGetEventStringT(dbe, szDescr));
if (tszFileName && tszDescr) {
- mir_sntprintf(buf, SIZEOF(buf), _T("%s: %s (%s)"), TranslateT("Incoming file"), tszFileName, tszDescr);
+ mir_sntprintf(buf, _T("%s: %s (%s)"), TranslateT("Incoming file"), tszFileName, tszDescr);
return mir_tstrdup(buf);
}
}
if (tszFileName) {
- mir_sntprintf(buf, SIZEOF(buf), _T("%s: %s (%s)"), TranslateT("Incoming file"), tszFileName, TranslateT("No description given"));
+ mir_sntprintf(buf, _T("%s: %s (%s)"), TranslateT("Incoming file"), tszFileName, TranslateT("No description given"));
return mir_tstrdup(buf);
}
}
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 9bd323e24e..18c6d9607c 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -44,7 +44,7 @@ void TSAPI DM_SaveLogAsRTF(const TWindowData *dat) } else if (dat) { TCHAR szFilter[MAX_PATH], szFilename[MAX_PATH]; - mir_sntprintf(szFilter, SIZEOF(szFilter), _T("%s%c*.rtf%c%c"), TranslateT("Rich Edit file"), 0, 0, 0); + mir_sntprintf(szFilter, _T("%s%c*.rtf%c%c"), TranslateT("Rich Edit file"), 0, 0, 0); mir_sntprintf(szFilename, SIZEOF(szFilename), _T("%s.rtf"), dat->cache->getNick()); Utils::sanitizeFilename(szFilename); @@ -1094,10 +1094,10 @@ LRESULT TSAPI DM_WMCopyHandler(HWND hwnd, WNDPROC oldWndProc, UINT msg, WPARAM w { LRESULT result = mir_callNextSubclass(hwnd, oldWndProc, msg, wParam, lParam); - ptrA szFromStream(Message_GetFromStream(hwnd, SF_TEXT | SFF_SELECTION));
- if (szFromStream != NULL) {
- ptrW converted(mir_utf8decodeW(szFromStream));
- if (converted != NULL) {
+ ptrA szFromStream(Message_GetFromStream(hwnd, SF_TEXT | SFF_SELECTION)); + if (szFromStream != NULL) { + ptrW converted(mir_utf8decodeW(szFromStream)); + if (converted != NULL) { Utils::FilterEventMarkers(converted); Utils::CopyToClipBoard(converted, hwnd); } diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index caa644f02b..0ed4a9ff53 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -504,9 +504,9 @@ void CInfoPanel::RenderIPUIN(const HDC hdc, RECT& rcItem) TCHAR temp[256];
ptrT szVersion(db_get_tsa(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer"));
if (szVersion)
- mir_sntprintf(temp, SIZEOF(temp), TranslateT(" Client: %s"), szVersion);
+ mir_sntprintf(temp, TranslateT(" Client: %s"), szVersion);
else
- mir_sntprintf(temp, SIZEOF(temp), TranslateT(" Client not cached yet"));
+ mir_sntprintf(temp, TranslateT(" Client not cached yet"));
_tcscat_s(szBuf, 256, temp);
}
@@ -1507,7 +1507,7 @@ INT_PTR CALLBACK CTip::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam LONG cy = rc.bottom;
HANDLE hTheme = 0;
- mir_sntprintf(szTitle, SIZEOF(szTitle), m_szTitle ? _T("%s (%s)") : _T("%s%s"), c->getNick(), m_szTitle ? m_szTitle : _T(""));
+ mir_sntprintf(szTitle, m_szTitle ? _T("%s (%s)") : _T("%s%s"), c->getNick(), m_szTitle ? m_szTitle : _T(""));
if (m_panel) {
HDC hdcMem = ::CreateCompatibleDC(hdc);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index a91e8b592d..bdfd094f3d 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -589,9 +589,9 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar if ((int)mir_strlen((char*)hClip) > mwdat->nMax) {
TCHAR szBuffer[512];
if (M.GetByte("autosplit", 0))
- mir_sntprintf(szBuffer, SIZEOF(szBuffer), TranslateT("WARNING: The message you are trying to paste exceeds the message size limit for the active protocol. It will be sent in chunks of max %d characters"), mwdat->nMax - 10);
+ mir_sntprintf(szBuffer, TranslateT("WARNING: The message you are trying to paste exceeds the message size limit for the active protocol. It will be sent in chunks of max %d characters"), mwdat->nMax - 10);
else
- mir_sntprintf(szBuffer, SIZEOF(szBuffer), TranslateT("The message you are trying to paste exceeds the message size limit for the active protocol. Only the first %d characters will be sent."), mwdat->nMax);
+ mir_sntprintf(szBuffer, TranslateT("The message you are trying to paste exceeds the message size limit for the active protocol. Only the first %d characters will be sent."), mwdat->nMax);
SendMessage(hwndParent, DM_ACTIVATETOOLTIP, IDC_MESSAGE, (LPARAM)szBuffer);
}
}
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 96159f7743..739af6ae0b 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -450,7 +450,7 @@ void TSAPI UpdateReadChars(const TWindowData *dat) if (dat->fInsertMode || fCaps || fNum)
mir_tstrcat(szBuf, _T(" | "));
- mir_sntprintf(buf, SIZEOF(buf), _T("%s%s %d/%d"), szBuf, dat->lcID, dat->iOpenJobs, len);
+ mir_sntprintf(buf, _T("%s%s %d/%d"), szBuf, dat->lcID, dat->iOpenJobs, len);
SendMessage(dat->pContainer->hwndStatus, SB_SETTEXT, 1, (LPARAM)buf);
if (PluginConfig.m_visualMessageSizeIndicator)
InvalidateRect(dat->pContainer->hwndStatus, NULL, FALSE);
@@ -930,7 +930,7 @@ BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors else if (!_tcsncmp(p, _T("\\highlight"), 10)) { //background color
TCHAR szTemp[20];
int iCol = _ttoi(p + 10);
- mir_sntprintf(szTemp, SIZEOF(szTemp), _T("%d"), iCol);
+ mir_sntprintf(szTemp, _T("%d"), iCol);
}
else if (!_tcsncmp(p, _T("\\line"), 5)) { // soft line break;
res.AppendChar('\n');
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index cf6d077f18..620feae359 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -832,7 +832,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact, ptrT tszDescr(DbGetEventStringT(&dbei, szDescr));
TCHAR buf[1000];
- mir_sntprintf(buf, SIZEOF(buf), _T("%s (%s)"), tszFileName, tszDescr);
+ mir_sntprintf(buf, _T("%s (%s)"), tszFileName, tszDescr);
AppendUnicodeToBuffer(str, buf, 0);
}
else AppendUnicodeToBuffer(str, tszFileName, 0);
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index bc36b138cb..948e471350 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -453,14 +453,10 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, }
// if we have a max # of tabs/container set and want to open something in the default container...
- if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, _T("default"), 6)) {
- if ((pContainer = FindMatchingContainer(_T("default"))) == NULL) {
- TCHAR szName[CONTAINER_NAMELEN + 1];
- mir_sntprintf(szName, SIZEOF(szName), _T("default"));
- if ((pContainer = CreateContainer(szName, CNT_CREATEFLAG_CLONED, hContact)) == NULL)
+ if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, _T("default"), 6))
+ if ((pContainer = FindMatchingContainer(_T("default"))) == NULL)
+ if ((pContainer = CreateContainer(_T("default"), CNT_CREATEFLAG_CLONED, hContact)) == NULL)
return 0;
- }
- }
TNewWindowData newData = { 0 };
newData.hContact = hContact;
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp index c98b28c076..dc4c16ab31 100644 --- a/plugins/TabSRMM/src/srmm.cpp +++ b/plugins/TabSRMM/src/srmm.cpp @@ -156,7 +156,7 @@ int _DebugPopup(MCONTACT hContact, const TCHAR *fmt, ...) if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) { MIRANDASYSTRAYNOTIFY tn; TCHAR szTitle[128]; - mir_sntprintf(szTitle, SIZEOF(szTitle), TranslateT("TabSRMM message (%s)"), + mir_sntprintf(szTitle, TranslateT("TabSRMM message (%s)"), (hContact != 0) ? pcli->pfnGetContactDisplayName(hContact, 0) : TranslateT("Global")); tn.szProto = NULL; diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index 1342aff813..fb63069d01 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -875,7 +875,7 @@ void CThumbMUC::renderContent() if (mi) {
if (m_dat->dwUnread) {
- mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("%d unread"), m_dat->dwUnread);
+ mir_sntprintf(szTemp, TranslateT("%d unread"), m_dat->dwUnread);
CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
m_rcIcon.top += m_sz.cy;
}
@@ -887,18 +887,18 @@ void CThumbMUC::renderContent() _p++;
wchar_t _t = *_p;
*_p = 0;
- mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("Chat room %s"), m_dat->si->ptszStatusbarText);
+ mir_sntprintf(szTemp, TranslateT("Chat room %s"), m_dat->si->ptszStatusbarText);
*_p = _t;
}
else
- mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("Chat room %s"), L"");
+ mir_sntprintf(szTemp, TranslateT("Chat room %s"), L"");
CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
m_rcIcon.top += m_sz.cy;
- mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("%d user(s)"), m_dat->si->nUsersInNicklist);
+ mir_sntprintf(szTemp, TranslateT("%d user(s)"), m_dat->si->nUsersInNicklist);
CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
}
else {
- mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("Server window"));
+ mir_sntprintf(szTemp, TranslateT("Server window"));
CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
if (mi->tszIdleMsg[0] && mir_tstrlen(mi->tszIdleMsg) > 2) {
m_rcIcon.top += m_sz.cy;
@@ -917,7 +917,7 @@ void CThumbMUC::renderContent() szStatusMsg = TranslateT("no topic set.");
}
else if (mi) {
- mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("%s on %s%s"), m_dat->szMyNickname, mi->ptszModDispName, L"");
+ mir_sntprintf(szTemp, TranslateT("%s on %s%s"), m_dat->szMyNickname, mi->ptszModDispName, L"");
szStatusMsg = szTemp;
}
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index a0825801b6..e69da7e766 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -1677,9 +1677,9 @@ void CSkin::setupAeroSkins() // load unknown avatar..
if (0 == PluginConfig.g_hbmUnknown) {
- mir_sntprintf(tszFilename, SIZEOF(tszFilename), _T("%scustom_unknown.png"), tszBasePath);
+ mir_sntprintf(tszFilename, _T("%scustom_unknown.png"), tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, SIZEOF(tszFilename), _T("%sunknown.png"), tszBasePath);
+ mir_sntprintf(tszFilename, _T("%sunknown.png"), tszBasePath);
PluginConfig.g_hbmUnknown = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR);
if (PluginConfig.g_hbmUnknown == 0) {
HDC dc = GetDC(0);
@@ -1688,9 +1688,9 @@ void CSkin::setupAeroSkins() }
}
- mir_sntprintf(tszFilename, SIZEOF(tszFilename), _T("%scustom_tabskin_aero.png"), tszBasePath);
+ mir_sntprintf(tszFilename, _T("%scustom_tabskin_aero.png"), tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, SIZEOF(tszFilename), _T("%stabskin_aero.png"), tszBasePath);
+ mir_sntprintf(tszFilename, _T("%stabskin_aero.png"), tszBasePath);
BOOL isOpaque = false;
if (CMimAPI::m_pfnDwmGetColorizationColor && M.isAero())
@@ -1775,9 +1775,9 @@ void CSkin::setupAeroSkins() m_tabBottom->setMetrics(bm.bmWidth, bm.bmHeight);
- mir_sntprintf(tszFilename, SIZEOF(tszFilename), _T("%scustom_tabskin_aero_glow.png"), tszBasePath);
+ mir_sntprintf(tszFilename, _T("%scustom_tabskin_aero_glow.png"), tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, SIZEOF(tszFilename), _T("%stabskin_aero_glow.png"), tszBasePath);
+ mir_sntprintf(tszFilename, _T("%stabskin_aero_glow.png"), tszBasePath);
fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR | IMGL_RETURNDIB);
@@ -1808,9 +1808,9 @@ void CSkin::setupAeroSkins() m_tabGlowBottom->setMetrics(bm.bmWidth, bm.bmHeight);
// background item for the button switch bar
- mir_sntprintf(tszFilename, SIZEOF(tszFilename), _T("%scustom_tabskin_aero_button.png"), tszBasePath);
+ mir_sntprintf(tszFilename, _T("%scustom_tabskin_aero_button.png"), tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, SIZEOF(tszFilename), _T("%stabskin_aero_button.png"), tszBasePath);
+ mir_sntprintf(tszFilename, _T("%stabskin_aero_button.png"), tszBasePath);
hbm = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR);
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index efc5854703..ced9ac7c04 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -417,7 +417,7 @@ INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LP GetClientRect(hwndDlg, &rcClient);
TCHAR szBuffer[180];
- mir_sntprintf(szBuffer, SIZEOF(szBuffer), TranslateT("Set messaging options for %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_sntprintf(szBuffer, TranslateT("Set messaging options for %s"), pcli->pfnGetContactDisplayName(hContact, 0));
SetWindowText(hwndDlg, szBuffer);
memset(&tci, 0, sizeof(tci));
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 54faf0ff79..f69a4c8c2b 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -146,7 +146,7 @@ const TCHAR* Utils::FormatRaw(TWindowData *dat, const TCHAR *msg, int flags, BOO TCHAR szTemp[5];
message.insert(beginmark, _T("cxxx "));
- mir_sntprintf(szTemp, SIZEOF(szTemp), _T("%02d"), MSGDLGFONTCOUNT + 13 + ii);
+ mir_sntprintf(szTemp, _T("%02d"), MSGDLGFONTCOUNT + 13 + ii);
message[beginmark + 3] = szTemp[0];
message[beginmark + 4] = szTemp[1];
clr_found = true;
@@ -1277,7 +1277,7 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP ::SendDlgItemMessage(hwnd, IDC_WARNTEXT, EM_AUTOURLDETECT, TRUE, 0);
::SendDlgItemMessage(hwnd, IDC_WARNTEXT, EM_SETEVENTMASK, 0, ENM_LINK);
- mir_sntprintf(temp, SIZEOF(temp), RTF_DEFAULT_HEADER, 0, 0, 0, 30 * 15);
+ mir_sntprintf(temp, RTF_DEFAULT_HEADER, 0, 0, 0, 30 * 15);
tstring *str = new tstring(temp);
str->append(m_szText);
|