summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-09-26 08:06:35 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-09-26 08:06:35 +0000
commitd3540ad7bf4de7d1bae2569db357ad91656feb76 (patch)
treecc56d3cd37825db9fdecec884457b5069d2a075c /plugins
parent13f917ea44a40282e9dd55777cdb0a5bd46e06f4 (diff)
- fix for mishmash in "Add contact" button's tooltip
- code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@1661 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/chat/log.cpp14
-rw-r--r--plugins/TabSRMM/chat/main.cpp2
-rw-r--r--plugins/TabSRMM/chat/manager.cpp2
-rw-r--r--plugins/TabSRMM/chat/message.cpp6
-rw-r--r--plugins/TabSRMM/chat/muchighlight.cpp2
-rw-r--r--plugins/TabSRMM/chat/options.cpp18
-rw-r--r--plugins/TabSRMM/chat/tools.cpp16
-rw-r--r--plugins/TabSRMM/chat/window.cpp14
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp56
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp4
-rw-r--r--plugins/TabSRMM/src/container.cpp24
-rw-r--r--plugins/TabSRMM/src/containeroptions.cpp4
-rw-r--r--plugins/TabSRMM/src/controls.cpp2
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp4
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp8
-rw-r--r--plugins/TabSRMM/src/globals.cpp6
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp55
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp4
-rw-r--r--plugins/TabSRMM/src/msglog.cpp14
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp8
-rw-r--r--plugins/TabSRMM/src/msgs.cpp4
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp8
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp4
-rw-r--r--plugins/TabSRMM/src/templates.cpp8
-rw-r--r--plugins/TabSRMM/src/themeio.cpp28
-rw-r--r--plugins/TabSRMM/src/themes.cpp6
-rw-r--r--plugins/TabSRMM/src/trayicon.cpp6
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp12
-rw-r--r--plugins/TabSRMM/src/userprefs.cpp6
-rw-r--r--plugins/TabSRMM/src/utils.cpp12
32 files changed, 179 insertions, 182 deletions
diff --git a/plugins/TabSRMM/chat/log.cpp b/plugins/TabSRMM/chat/log.cpp
index 45024ea25f..72768a3a1d 100644
--- a/plugins/TabSRMM/chat/log.cpp
+++ b/plugins/TabSRMM/chat/log.cpp
@@ -1199,19 +1199,19 @@ char * Log_CreateRtfHeader(MODULEINFO * mi)
// font table
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "{\\rtf1\\ansi\\deff0{\\fonttbl");
- for (i = 0; i < OPTIONS_FONTCOUNT ; i++)
+ for (i=0; i < OPTIONS_FONTCOUNT ; i++)
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "{\\f%u\\fnil\\fcharset%u" TCHAR_STR_PARAM ";}", i, aFonts[i].lf.lfCharSet, aFonts[i].lf.lfFaceName);
// colour table
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "}{\\colortbl ;");
- for (i = 0; i < OPTIONS_FONTCOUNT; i++)
+ for (i=0; i < OPTIONS_FONTCOUNT; i++)
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\red%u\\green%u\\blue%u;", GetRValue(aFonts[i].color), GetGValue(aFonts[i].color), GetBValue(aFonts[i].color));
- for (i = 0; i < mi->nColorCount; i++)
+ for (i=0; i < mi->nColorCount; i++)
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\red%u\\green%u\\blue%u;", GetRValue(mi->crColors[i]), GetGValue(mi->crColors[i]), GetBValue(mi->crColors[i]));
- for (i = 0; i < 5; i++)
+ for (i=0; i < 5; i++)
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\red%u\\green%u\\blue%u;", GetRValue(g_Settings.nickColors[i]), GetGValue(g_Settings.nickColors[i]), GetBValue(g_Settings.nickColors[i]));
// new paragraph
@@ -1290,7 +1290,7 @@ void LoadMsgLogBitmaps(void)
hBmp = CreateCompatibleBitmap(hdc, bih.biWidth, bih.biHeight);
hdcMem = CreateCompatibleDC(hdc);
pBmpBits = (PBYTE) mir_alloc(widthBytes * bih.biHeight);
- for (i = 0; i < SIZEOF(pLogIconBmpBits); i++) {
+ for (i=0; i < SIZEOF(pLogIconBmpBits); i++) {
hIcon = hIcons[i];
pLogIconBmpBits[i] = (PBYTE) mir_alloc(RTFPICTHEADERMAXSIZE + (bih.biSize + widthBytes * bih.biHeight) * 2);
rtfHeaderSize = sprintf((char *)pLogIconBmpBits[i], "{\\pict\\dibitmap0\\wbmbitspixel%u\\wbmplanes1\\wbmwidthbytes%u\\picw%u\\pich%u ", bih.biBitCount, widthBytes, bih.biWidth, bih.biHeight);
@@ -1327,7 +1327,7 @@ void LoadMsgLogBitmaps(void)
ReleaseDC(NULL, hdc);
}
- for (i = 0; i < OPTIONS_FONTCOUNT; i++)
+ for (i=0; i < OPTIONS_FONTCOUNT; i++)
mir_snprintf(CHAT_rtfFontsGlobal[i], RTFCACHELINESIZE, "\\f%u\\cf%u\\ul0\\highlight0\\b%d\\i%d\\ul%d\\fs%u", i, i + 1, aFonts[i].lf.lfWeight >= FW_BOLD ? 1 : 0, aFonts[i].lf.lfItalic,aFonts[i].lf.lfUnderline ,2 * abs(aFonts[i].lf.lfHeight) * 74 / logPixelSY);
CHAT_rtffonts = &(CHAT_rtfFontsGlobal[0][0]);
}
@@ -1335,6 +1335,6 @@ void LoadMsgLogBitmaps(void)
void FreeMsgLogBitmaps(void)
{
int i;
- for (i = 0; i < SIZEOF(pLogIconBmpBits); i++)
+ for (i=0; i < SIZEOF(pLogIconBmpBits); i++)
mir_free(pLogIconBmpBits[i]);
}
diff --git a/plugins/TabSRMM/chat/main.cpp b/plugins/TabSRMM/chat/main.cpp
index b54d6ff45b..be283ae24a 100644
--- a/plugins/TabSRMM/chat/main.cpp
+++ b/plugins/TabSRMM/chat/main.cpp
@@ -126,7 +126,7 @@ void LoadIcons(void)
{
int i;
- for (i = 0; i < 20; i++)
+ for (i=0; i < 20; i++)
hIcons[i] = NULL;
LoadLogIcons();
diff --git a/plugins/TabSRMM/chat/manager.cpp b/plugins/TabSRMM/chat/manager.cpp
index 7e0c82aa0b..3d13a9b714 100644
--- a/plugins/TabSRMM/chat/manager.cpp
+++ b/plugins/TabSRMM/chat/manager.cpp
@@ -1191,7 +1191,7 @@ static int UM_CompareItem(USERINFO * u1, const TCHAR* pszNick, WORD wStatus)
WORD dw1 = u1->Status;
WORD dw2 = wStatus;
- for (i = 0; i < 8; i++) {
+ for (i=0; i < 8; i++) {
if ((dw1 & 1) && !(dw2 & 1))
return -1;
if ((dw2 & 1) && !(dw1 & 1))
diff --git a/plugins/TabSRMM/chat/message.cpp b/plugins/TabSRMM/chat/message.cpp
index f82bf1c860..ef00408bb1 100644
--- a/plugins/TabSRMM/chat/message.cpp
+++ b/plugins/TabSRMM/chat/message.cpp
@@ -31,7 +31,7 @@ static int RTFColorToIndex(int *pIndex, int iCol, SESSION_INFO* si)
int i;
MODULEINFO * pMod = MM_FindModule(si->pszModule);
- for (i = 0; i < pMod->nColorCount ; i++)
+ for (i=0; i < pMod->nColorCount ; i++)
if (pIndex[i] == iCol)
return i;
@@ -57,7 +57,7 @@ static void CreateColorMap(char* Text, int *pIndex, SESSION_INFO* si)
if (sscanf(p2, lpszFmt, &szRed, &szGreen, &szBlue) > 0) {
int i;
MODULEINFO * pMod = MM_FindModule(si->pszModule);
- for (i = 0; i < pMod->nColorCount ; i ++)
+ for (i=0; i < pMod->nColorCount ; i ++)
if (pMod->crColors[i] == RGB(atoi(szRed), atoi(szGreen), atoi(szBlue)))
pIndex[i] = iIndex;
}
@@ -99,7 +99,7 @@ TCHAR* Chat_DoRtfToTags(char* pszText, SESSION_INFO* si)
// create an index of colors in the module and map them to
// corresponding colors in the RTF color table
pIndex = (int *)mir_alloc(sizeof(int) * MM_FindModule(si->pszModule)->nColorCount);
- for (i = 0; i < MM_FindModule(si->pszModule)->nColorCount ; i++)
+ for (i=0; i < MM_FindModule(si->pszModule)->nColorCount ; i++)
pIndex[i] = -1;
CreateColorMap(pszText, pIndex, si);
diff --git a/plugins/TabSRMM/chat/muchighlight.cpp b/plugins/TabSRMM/chat/muchighlight.cpp
index d14951bf96..d3006fe5f4 100644
--- a/plugins/TabSRMM/chat/muchighlight.cpp
+++ b/plugins/TabSRMM/chat/muchighlight.cpp
@@ -172,7 +172,7 @@ int CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dwF
else
p1 = 0;
- for (i = 0; i < m_iTextPatterns && !result; i++)
+ for (i=0; i < m_iTextPatterns && !result; i++)
result = wildmatch(m_TextPatterns[i], p) ? MATCH_TEXT : 0;
if (p1) {
diff --git a/plugins/TabSRMM/chat/options.cpp b/plugins/TabSRMM/chat/options.cpp
index b9c7c133d5..5eb31e6913 100644
--- a/plugins/TabSRMM/chat/options.cpp
+++ b/plugins/TabSRMM/chat/options.cpp
@@ -317,7 +317,7 @@ static void FillBranch(HWND hwndTree, HTREEITEM hParent, struct branch_t *branch
tvis.hParent = hParent;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT | TVIF_STATE;
- for (i = 0;i < nValues;i++) {
+ for (i=0;i < nValues;i++) {
tvis.item.pszText = TranslateTS(branch[i].szDescr);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
if (branch[i].iMode)
@@ -337,7 +337,7 @@ static void SaveBranch(HWND hwndTree, struct branch_t *branch, int nValues)
int iState = 0;
tvi.mask = TVIF_HANDLE | TVIF_STATE;
- for (i = 0;i < nValues;i++) {
+ for (i=0;i < nValues;i++) {
tvi.hItem = branch[i].hItem;
TreeView_GetItem(hwndTree, &tvi);
bChecked = ((tvi.state & TVIS_STATEIMAGEMASK) >> 12 == 2) ? 0 : 1;
@@ -422,7 +422,7 @@ static void LoadLogFonts(void)
{
int i;
- for (i = 0; i < OPTIONS_FONTCOUNT; i++)
+ for (i=0; i < OPTIONS_FONTCOUNT; i++)
LoadMsgDlgFont(FONTSECTION_CHAT, i, &aFonts[i].lf, &aFonts[i].color, CHAT_FONTMODULE);
}
@@ -703,7 +703,7 @@ void RegisterFontServiceFonts() {
strncpy(fid.dbSettingsGroup, FONTMODULE, SIZEOF(fid.dbSettingsGroup));
- for (i = 0; i < SIZEOF(IM_fontOptionsList); i++) {
+ for (i=0; i < SIZEOF(IM_fontOptionsList); i++) {
fid.flags = FIDF_DEFAULTVALID|FIDF_ALLOWEFFECTS;
LoadMsgDlgFont(FONTSECTION_IM, i , &lf, &fontOptionsList[i].colour, FONTMODULE);
mir_snprintf(szTemp, SIZEOF(szTemp), "Font%d", i);
@@ -794,7 +794,7 @@ void RegisterFontServiceFonts() {
fid.flags&=~FIDF_SAVEPOINTSIZE;
_tcsncpy(fid.group, _T("TabSRMM/Group Chats"), SIZEOF(fid.group));
strncpy(fid.dbSettingsGroup, CHAT_FONTMODULE, SIZEOF(fid.dbSettingsGroup));
- for (i = 0; i < msgDlgFontCount; i++) {
+ for (i=0; i < msgDlgFontCount; i++) {
LoadMsgDlgFont(FONTSECTION_CHAT, i , &lf, &fontOptionsList[i].colour, CHAT_FONTMODULE);
mir_snprintf(szTemp, SIZEOF(szTemp), "Font%d", i);
strncpy(fid.prefix, szTemp, SIZEOF(fid.prefix));
@@ -815,7 +815,7 @@ void RegisterFontServiceFonts() {
_tcsncpy(cid.group, _T("TabSRMM/Group Chats"), SIZEOF(cid.group));
strncpy(cid.dbSettingsGroup, "Chat", SIZEOF(cid.dbSettingsGroup));
- for (i = 0; i <= 7; i++) {
+ for (i=0; i <= 7; i++) {
mir_snprintf(szTemp, SIZEOF(szTemp), "NickColor%d", i);
_tcsncpy(cid.name, chatcolorsnames[i], SIZEOF(cid.name));
cid.order=i+1;
@@ -845,7 +845,7 @@ void RegisterFontServiceFonts() {
strncpy(fid.dbSettingsGroup, FONTMODULE, SIZEOF(fid.dbSettingsGroup));
strncpy(cid.dbSettingsGroup, FONTMODULE, SIZEOF(fid.dbSettingsGroup));
- for (i = 0; i < (sizeof(_clrs) / sizeof(_clrs[0])); i++) {
+ for (i=0; i < (sizeof(_clrs) / sizeof(_clrs[0])); i++) {
cid.order = _clrs[i].order;
_tcsncpy(cid.group, _clrs[i].tszGroup, SIZEOF(fid.group));
_tcsncpy(cid.name, _clrs[i].tszName, SIZEOF(cid.name));
@@ -862,7 +862,7 @@ void RegisterFontServiceFonts() {
/*
* text and background colors for tabs
*/
- for (i = 0; i < (sizeof(_tabclrs) / sizeof(_tabclrs[0])); i++) {
+ for (i=0; i < (sizeof(_tabclrs) / sizeof(_tabclrs[0])); i++) {
cid.order = _tabclrs[i].order;
_tcsncpy(cid.group, _tabclrs[i].tszGroup, SIZEOF(fid.group));
_tcsncpy(cid.name, _tabclrs[i].tszName, SIZEOF(cid.name));
@@ -1409,7 +1409,7 @@ void LoadGlobalSettings(void)
ih2 = GetTextPixelSize(_T("AQGglo"), g_Settings.UserListHeadingsFont, FALSE);
g_Settings.iNickListFontHeight = max(M->GetByte("Chat", "NicklistRowDist", 12), (ih > ih2 ? ih : ih2));
- for (i = 0; i < 7; i++) {
+ for (i=0; i < 7; i++) {
mir_snprintf(szBuf, 20, "NickColor%d", i);
g_Settings.nickColors[i] = M->GetDword("Chat", szBuf, g_Settings.crUserListColor);
}
diff --git a/plugins/TabSRMM/chat/tools.cpp b/plugins/TabSRMM/chat/tools.cpp
index 032195d8c8..c344cc3906 100644
--- a/plugins/TabSRMM/chat/tools.cpp
+++ b/plugins/TabSRMM/chat/tools.cpp
@@ -704,7 +704,7 @@ int Chat_GetColorIndex(const char* pszModule, COLORREF cr)
if (!pMod || pMod->nColorCount == 0)
return -1;
- for (i = 0; i < pMod->nColorCount; i++)
+ for (i=0; i < pMod->nColorCount; i++)
if (pMod->crColors[i] == cr)
return i;
@@ -728,7 +728,7 @@ void CheckColorsInModule(const char* pszModule)
if (!pMod)
return;
- for (i = 0; i < pMod->nColorCount; i++) {
+ for (i=0; i < pMod->nColorCount; i++) {
if (pMod->crColors[i] == crFG || pMod->crColors[i] == crBG) {
if (pMod->crColors[i] == RGB(255, 255, 255))
pMod->crColors[i]--;
@@ -743,7 +743,7 @@ TCHAR* my_strstri(const TCHAR* s1, const TCHAR* s2)
int i, j, k;
_tsetlocale(LC_ALL, _T(""));
- for (i = 0;s1[i];i++)
+ for (i=0;s1[i];i++)
for (j = i, k = 0; _totlower(s1[j]) == _totlower(s2[k]);j++, k++)
if (!s2[k+1])
return (TCHAR*)(s1 + i);
@@ -986,7 +986,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO
if (gcmi.nItems > 0)
AppendMenu(*hMenu, MF_SEPARATOR, 0, 0);
- for (i = 0; i < gcmi.nItems; i++) {
+ for (i=0; i < gcmi.nItems; i++) {
TCHAR* ptszDescr = a2tf(gcmi.Item[i].pszDesc, si->dwFlags);
TCHAR* ptszText = TranslateTS(ptszDescr);
DWORD dwState = gcmi.Item[i].bDisabled ? MF_GRAYED : 0;
@@ -1028,7 +1028,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO
InsertMenu(PluginConfig.g_hMenuEncoding, 1, MF_BYPOSITION | MF_STRING, (UINT_PTR)CP_UTF8, TranslateT("UTF-8"));
pos = GetMenuItemCount(*hMenu);
InsertMenu(*hMenu, pos, MF_BYPOSITION | MF_POPUP, (UINT_PTR) PluginConfig.g_hMenuEncoding, TranslateT("Character Encoding"));
- for (i = 0; i < GetMenuItemCount(PluginConfig.g_hMenuEncoding); i++)
+ for (i=0; i < GetMenuItemCount(PluginConfig.g_hMenuEncoding); i++)
CheckMenuItem(PluginConfig.g_hMenuEncoding, i, MF_BYPOSITION | MF_UNCHECKED);
if (codepage == CP_ACP)
CheckMenuItem(PluginConfig.g_hMenuEncoding, 0, MF_BYPOSITION | MF_CHECKED);
@@ -1231,7 +1231,7 @@ void Chat_SetFilters(SESSION_INFO *si)
dwMask = M->GetDword(si->hContact, "Chat", "FilterMask", 0);
si->iLogFilterFlags = dwFlags_default;
- for (i = 0; i < 32; i++) {
+ for (i=0; i < 32; i++) {
if (dwMask & (1 << i))
si->iLogFilterFlags = (dwFlags_local & (1 << i) ? si->iLogFilterFlags | (1 << i) : si->iLogFilterFlags & ~(1 << i));
}
@@ -1241,7 +1241,7 @@ void Chat_SetFilters(SESSION_INFO *si)
dwMask = M->GetDword(si->hContact, "Chat", "PopupMask", 0);
si->iLogPopupFlags = dwFlags_default;
- for (i = 0; i < 32; i++) {
+ for (i=0; i < 32; i++) {
if (dwMask & (1 << i))
si->iLogPopupFlags = (dwFlags_local & (1 << i) ? si->iLogPopupFlags | (1 << i) : si->iLogPopupFlags & ~(1 << i));
}
@@ -1251,7 +1251,7 @@ void Chat_SetFilters(SESSION_INFO *si)
dwMask = M->GetDword(si->hContact, "Chat", "TrayIconMask", 0);
si->iLogTrayFlags = dwFlags_default;
- for (i = 0; i < 32; i++) {
+ for (i=0; i < 32; i++) {
if (dwMask & (1 << i))
si->iLogTrayFlags = (dwFlags_local & (1 << i) ? si->iLogTrayFlags | (1 << i) : si->iLogTrayFlags & ~(1 << i));
}
diff --git a/plugins/TabSRMM/chat/window.cpp b/plugins/TabSRMM/chat/window.cpp
index c1256dc59a..da3085ebe4 100644
--- a/plugins/TabSRMM/chat/window.cpp
+++ b/plugins/TabSRMM/chat/window.cpp
@@ -729,7 +729,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
_tcsncat(toInsert, PluginConfig.m_MathModStartDelimiter, 30);
SendMessage(hwnd, EM_REPLACESEL, TRUE, (LPARAM)toInsert);
SetKeyboardState(keyState);
- for (i = 0; i < iLen; i++)
+ for (i=0; i < iLen; i++)
SendMessage(hwnd, WM_KEYDOWN, mwdat->dwFlags & MWF_LOG_RTL ? VK_RIGHT : VK_LEFT, 0);
return 0;
}
@@ -1224,7 +1224,7 @@ static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
UINT result;
DWORD dwMask = 0, dwFlags = 0;
- for (i = 0; _eventorder[i]; i++) {
+ for (i=0; _eventorder[i]; i++) {
result = IsDlgButtonChecked(hwndDlg, IDC_1 + i);
dwMask |= (result != BST_INDETERMINATE ? _eventorder[i] : 0);
iFlags |= (result == BST_CHECKED ? _eventorder[i] : 0);
@@ -1245,7 +1245,7 @@ static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
dwMask = iFlags = 0;
- for (i = 0; _eventorder[i]; i++) {
+ for (i=0; _eventorder[i]; i++) {
result = IsDlgButtonChecked(hwndDlg, IDC_P1 + i);
dwMask |= (result != BST_INDETERMINATE ? _eventorder[i] : 0);
iFlags |= (result == BST_CHECKED ? _eventorder[i] : 0);
@@ -1266,7 +1266,7 @@ static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
dwMask = iFlags = 0;
- for (i = 0; _eventorder[i]; i++) {
+ for (i=0; _eventorder[i]; i++) {
result = IsDlgButtonChecked(hwndDlg, IDC_T1 + i);
dwMask |= (result != BST_INDETERMINATE ? _eventorder[i] : 0);
iFlags |= (result == BST_CHECKED ? _eventorder[i] : 0);
@@ -1664,7 +1664,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
* string we have
*/
- for (i = 0; i < iItems; i++) {
+ for (i=0; i < iItems; i++) {
ui = UM_FindUserFromIndex(si->pUsers, i);
if (ui) {
if (!_tcsnicmp(ui->pszNick, si->szSearch, lstrlen(si->szSearch))) {
@@ -1788,7 +1788,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
USERINFO *ui1 = NULL;
int i;
- for (i = 0; i < iSelectedItems; i++) {
+ for (i=0; i < iSelectedItems; i++) {
ui1 = SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, pItems[i]);
if (ui1)
DoEventHookAsync(hwndParent, parentdat->ptszID, parentdat->pszModule, GC_USER_NICKLISTMENU, ui1->pszUID, NULL, (LPARAM)uID);
@@ -3409,7 +3409,7 @@ LABEL_SHOWWINDOW:
if (CSkin::m_skinEnabled && !fAero) {
CSkin::SkinDrawBG(hwndDlg, dat->pContainer->hwnd, dat->pContainer, &rcClient, hdcMem);
- for (i = 0; i < 3; i++) {
+ for (i=0; i < 3; i++) {
item = &SkinItems[item_ids[i]];
if (!item->IGNORED) {
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index 56120e9336..0782165d39 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -40,7 +40,7 @@ static void li_ListDestruct(SortedList *pList, ItemDestuctor pItemDestructor)
{
int i = 0;
if (!pList) return;
- for (i = 0; i < pList->realCount; i++) pItemDestructor(pList->items[i]);
+ for (i=0; i < pList->realCount; i++) pItemDestructor(pList->items[i]);
List_Destroy(pList);
mir_free(pList);
}
@@ -65,7 +65,7 @@ static void li_SortList(SortedList *pList, FSortFunc pSortFunct)
int i;
if (!pSortFunct) pSortFunct = pOldSort;
pList->sortFunc = NULL;
- for (i = 0; i < pList->realCount - 1; i++)
+ for (i=0; i < pList->realCount - 1; i++)
if (pOldSort(pList->items[i], pList->items[i+1]) < 0) {
void * temp = pList->items[i];
pList->items[i] = pList->items[i+1];
@@ -121,7 +121,7 @@ static int Hlp_RemoveDatabaseSettings(HANDLE hContact, char *szModule, char *szP
}
count = 0;
if (rs.szSettings != NULL) {
- for (i = 0; i < rs.count; i++) {
+ for (i=0; i < rs.count; i++) {
if (rs.szSettings[i] != NULL) {
if (!DBDeleteContactSetting(hContact, szModule, rs.szSettings[i])) {
count += 1;
@@ -172,7 +172,7 @@ void CB_DestroyAllButtons(HWND hwndDlg, struct TWindowData *dat)
{
int i;
HWND hwndBtn = NULL;
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)LButtonsList->items[i];
{
hwndBtn = GetDlgItem(hwndDlg, cbd->dwButtonCID);
@@ -180,7 +180,7 @@ void CB_DestroyAllButtons(HWND hwndDlg, struct TWindowData *dat)
}
}
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)RButtonsList->items[i];
{
hwndBtn = GetDlgItem(hwndDlg, cbd->dwButtonCID);
@@ -221,7 +221,7 @@ void CB_ReInitCustomButtons()
{
int i;
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)LButtonsList->items[i];
//GetButtonSettings(NULL,cbd);
if (cbd->opFlags&BBSF_NTBSWAPED || cbd->opFlags&BBSF_NTBDESTRUCT) {
@@ -235,7 +235,7 @@ void CB_ReInitCustomButtons()
}
}
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)RButtonsList->items[i];
if (cbd->opFlags&BBSF_NTBSWAPED || cbd->opFlags&BBSF_NTBDESTRUCT) {
cbd->opFlags ^= BBSF_NTBSWAPED;
@@ -336,7 +336,7 @@ static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam)
BOOL realbutton = 0;
BBButton * bbdi = (BBButton *)lParam;
bbdi->bbbFlags = 0;
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)LButtonsList->items[i];
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
realbutton = 1;
@@ -344,7 +344,7 @@ static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam)
}
}
if (!realbutton)
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)RButtonsList->items[i];
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
realbutton = 1;
@@ -365,7 +365,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam)
BOOL realbutton = 0;
DWORD tempCID = 0;
BBButton * bbdi = (BBButton *)lParam;
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)LButtonsList->items[i];
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
realbutton = 1;
@@ -373,7 +373,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam)
}
}
if (!realbutton)
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)RButtonsList->items[i];
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
realbutton = 1;
@@ -410,7 +410,7 @@ static INT_PTR CB_RemoveButton(WPARAM wParam, LPARAM lParam)
BBButton * bbdi = (BBButton *)lParam;
EnterCriticalSection(&ToolBarCS);
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)LButtonsList->items[i];
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
tempCID = cbd->dwButtonCID;
@@ -422,7 +422,7 @@ static INT_PTR CB_RemoveButton(WPARAM wParam, LPARAM lParam)
if (tempCID) qsort(LButtonsList->items, LButtonsList->realCount, sizeof(CustomButtonData *), sstSortButtons);
if (!tempCID) {
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)RButtonsList->items[i];
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
tempCID = cbd->dwButtonCID;
@@ -448,7 +448,7 @@ static INT_PTR CB_ModifyButton(WPARAM wParam, LPARAM lParam)
BBButton * bbdi = (BBButton *)lParam;
EnterCriticalSection(&ToolBarCS);
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
cbd = (CustomButtonData *)LButtonsList->items[i];
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
bFound = 1;
@@ -458,7 +458,7 @@ static INT_PTR CB_ModifyButton(WPARAM wParam, LPARAM lParam)
if (!bFound) {
cbd = NULL;
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
cbd = (CustomButtonData *)RButtonsList->items[i];
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
bFound = 1;
@@ -498,7 +498,7 @@ void BB_UpdateIcons(HWND hdlg, struct TWindowData *dat)
HWND hwndBtn = NULL;
qsort(LButtonsList->items, LButtonsList->realCount, sizeof(CustomButtonData *), sstSortButtons);
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)LButtonsList->items[i];
if (cbd) {
if (!cbd->bDummy)
@@ -511,7 +511,7 @@ void BB_UpdateIcons(HWND hdlg, struct TWindowData *dat)
hwndBtn = NULL;
qsort(RButtonsList->items, RButtonsList->realCount, sizeof(CustomButtonData *), sstSortButtons);
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)RButtonsList->items[i];
if (cbd) {
if (!cbd->bDummy)
@@ -556,7 +556,7 @@ void TSAPI BB_InitDlgButtons(TWindowData *dat)
hwndBtn = NULL;
qsort(RButtonsList->items, RButtonsList->realCount, sizeof(CustomButtonData *), sstSortButtons);
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)RButtonsList->items[i];
if (((dat->bType == SESSIONTYPE_IM && cbd->bIMButton)
|| (dat->bType == SESSIONTYPE_CHAT && cbd->bChatButton))) {
@@ -593,7 +593,7 @@ void TSAPI BB_InitDlgButtons(TWindowData *dat)
hwndBtn = NULL;
qsort(LButtonsList->items, LButtonsList->realCount, sizeof(CustomButtonData *), sstSortButtons);
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)LButtonsList->items[i];
if (((dat->bType == SESSIONTYPE_IM && cbd->bIMButton)
|| (dat->bType == SESSIONTYPE_CHAT && cbd->bChatButton))) {
@@ -638,7 +638,7 @@ void TSAPI BB_RedrawButtons(TWindowData *dat)
CustomButtonData* cbd;
HWND hwnd;
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
cbd = reinterpret_cast<CustomButtonData *>(LButtonsList->items[i]);
if (cbd) {
hwnd = GetDlgItem(dat->hwnd, cbd->dwButtonCID);
@@ -646,7 +646,7 @@ void TSAPI BB_RedrawButtons(TWindowData *dat)
InvalidateRect(hwnd, 0, TRUE);
}
}
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
cbd = reinterpret_cast<CustomButtonData *>(RButtonsList->items[i]);
if (cbd) {
hwnd = GetDlgItem(dat->hwnd, cbd->dwButtonCID);
@@ -712,7 +712,7 @@ BOOL TSAPI BB_SetButtonsPos(TWindowData *dat)
tempL -= 10;
}
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)LButtonsList->items[i];
if (((dat->bType == SESSIONTYPE_IM) && cbd->bIMButton)
|| ((dat->bType == SESSIONTYPE_CHAT) && cbd->bChatButton)) {
@@ -765,7 +765,7 @@ BOOL TSAPI BB_SetButtonsPos(TWindowData *dat)
tempR -= 12;
}
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)RButtonsList->items[i];
if (((dat->bType == SESSIONTYPE_IM) && cbd->bIMButton)
|| ((dat->bType == SESSIONTYPE_CHAT) && cbd->bChatButton)) {
@@ -823,7 +823,7 @@ void TSAPI BB_CustomButtonClick(struct TWindowData *dat, DWORD idFrom, HWND hwnd
cbcd.pt.x = rc.left;
cbcd.pt.y = rc.bottom;
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)LButtonsList->items[i];
if (cbd->dwButtonCID == idFrom) {
cbcd.pszModule = cbd->pszModuleName;
@@ -836,7 +836,7 @@ void TSAPI BB_CustomButtonClick(struct TWindowData *dat, DWORD idFrom, HWND hwnd
}
if (!cbcd.pszModule)
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)RButtonsList->items[i];
if (cbd->dwButtonCID == idFrom) {
cbcd.pszModule = cbd->pszModuleName;
@@ -918,11 +918,11 @@ void BB_RefreshTheme(const TWindowData *dat)
{
int i;
- for (i = 0; i < RButtonsList->realCount; i++) {
+ for (i=0; i < RButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)RButtonsList->items[i];
SendMessage(GetDlgItem(dat->hwnd, cbd->dwButtonCID), WM_THEMECHANGED, 0, 0);
}
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData* cbd = (CustomButtonData *)LButtonsList->items[i];
SendMessage(GetDlgItem(dat->hwnd, cbd->dwButtonCID), WM_THEMECHANGED, 0, 0);
}
@@ -1231,7 +1231,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree)
EnterCriticalSection(&ToolBarCS);
qsort(LButtonsList->items, LButtonsList->realCount, sizeof(CustomButtonData *), sstSortButtons);
- for (i = 0; i < LButtonsList->realCount; i++) {
+ for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData * cbd = (CustomButtonData *)LButtonsList->items[i];
tvis.item.lParam = (LPARAM)cbd;
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 8645954e7b..28f51fe54b 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -438,7 +438,7 @@ void CContactCache::releaseAlloced()
}
if (m_history) {
- for (i = 0; i <= m_iHistorySize; i++) {
+ for (i=0; i <= m_iHistorySize; i++) {
if (m_history[i].szText != 0) {
free(m_history[i].szText);
}
@@ -573,7 +573,7 @@ TCHAR* CContactCache::getNormalizedStatusMsg(const TCHAR *src, bool fStripAll)
tstring dest;
- for (i = 0; i < _tcslen(src); i++) {
+ for (i=0; i < _tcslen(src); i++) {
if (src[i] == 0x0d || src[i] == '\t')
continue;
if (i && src[i] == (TCHAR)0x0a) {
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 87ceed06c3..a359a1379e 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -300,7 +300,7 @@ static BOOL CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
item_hot = &SkinItems[ID_EXTBKTITLEBUTTONMOUSEOVER];
item_pressed = &SkinItems[ID_EXTBKTITLEBUTTONPRESSED];
- for (i = 0; i < 3; i++) {
+ for (i=0; i < 3; i++) {
RECT *rc = 0;
HICON hIcon;
@@ -425,7 +425,7 @@ static BOOL CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
else if (isClose)
PostMessage(hwndDlg, WM_SYSCOMMAND, SC_CLOSE, 0);
}
- for (i = 0; i < 3; i++) {
+ for (i=0; i < 3; i++) {
if (pContainer->buttons[i].isHot != pContainer->oldbuttons[i].isHot) {
RECT *rc = 0;
HICON hIcon;
@@ -828,7 +828,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam,
*/
int nCount = TabCtrl_GetItemCount(hwndTab);
- for (i = 0; i < nCount; i++) {
+ for (i=0; i < nCount; i++) {
item.mask = TCIF_PARAM;
TabCtrl_GetItem(hwndTab, i, &item);
if ((HWND)item.lParam == pContainer->hwndActive) {
@@ -1400,11 +1400,11 @@ buttons_done:
if ((dwTimeout = PluginConfig.m_TabAutoClose) > 0) {
int clients = TabCtrl_GetItemCount(GetDlgItem(hwndDlg, IDC_MSGTABS));
HWND *hwndClients = (HWND *)mir_alloc(sizeof(HWND) * (clients + 1));
- for (i = 0; i < clients; i++) {
+ for (i=0; i < clients; i++) {
TabCtrl_GetItem(hwndTab, i, &item);
hwndClients[i] = (HWND)item.lParam;
}
- for (i = 0; i < clients; i++) {
+ for (i=0; i < clients; i++) {
if (IsWindow(hwndClients[i])) {
if ((HWND)hwndClients[i] != pContainer->hwndActive)
pContainer->bDontSmartClose = TRUE;
@@ -1868,7 +1868,7 @@ buttons_done:
ri->dwFirst = ri->dwMostRecent = 0;
ri->hwndFirst = ri->hwndMostRecent = 0;
- for (i = 0; i < iItems; i++) {
+ for (i=0; i < iItems; i++) {
item.mask = TCIF_PARAM;
TabCtrl_GetItem(hwndTab, i, &item);
SendMessage((HWND) item.lParam, DM_QUERYLASTUNREAD, 0, (LPARAM)&dwTimestamp);
@@ -2089,7 +2089,7 @@ buttons_done:
int iOpenJobs = 0;
item.mask = TCIF_PARAM;
- for (i = 0; i < clients; i++) {
+ for (i=0; i < clients; i++) {
TabCtrl_GetItem(hwndTab, i, &item);
if (item.lParam && IsWindow((HWND)item.lParam)) {
SendMessage((HWND)item.lParam, DM_CHECKQUEUEFORCLOSE, 0, (LPARAM)&iOpenJobs);
@@ -2126,7 +2126,7 @@ buttons_done:
SendMessage((HWND)item.lParam, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
M->WriteByte(hContact, SRMSGMOD_T, "splitmax", (BYTE)((wp.showCmd==SW_SHOWMAXIMIZED)?1:0));
- for (i = 0; i < TabCtrl_GetItemCount(hwndTab); i++) {
+ for (i=0; i < TabCtrl_GetItemCount(hwndTab); i++) {
if (TabCtrl_GetItem(hwndTab, i, &item)) {
SendMessage((HWND)item.lParam, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
M->WriteDword(hContact, SRMSGMOD_T, "splitx", wp.rcNormalPosition.left);
@@ -2159,7 +2159,7 @@ buttons_done:
item.mask = TCIF_PARAM;
pContainer->dwFlags &= ~(CNT_DEFERREDCONFIGURE | CNT_CREATE_MINIMIZED | CNT_DEFERREDSIZEREQUEST | CNT_CREATE_CLONED);
- for (i = 0; i < TabCtrl_GetItemCount(hwndTab); i++) {
+ for (i=0; i < TabCtrl_GetItemCount(hwndTab); i++) {
if (TabCtrl_GetItem(hwndTab, i, &item)) {
SendMessage((HWND)item.lParam, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
//Utils::WriteContainerSettingsToDB(hContact, pContainer->settings);
@@ -2216,7 +2216,7 @@ int TSAPI GetTabIndexFromHWND(HWND hwndTab, HWND hwnd)
ZeroMemory((void *)&item, sizeof(item));
item.mask = TCIF_PARAM;
- for (i = 0; i < iItems; i++) {
+ for (i=0; i < iItems; i++) {
TabCtrl_GetItem(hwndTab, i, &item);
if ((HWND)item.lParam == hwnd) {
return i;
@@ -2609,7 +2609,7 @@ HMENU TSAPI BuildMCProtocolMenu(HWND hwndDlg) {
szProtoMostOnline = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContactMostOnline, 0);
isForced = M->GetDword(dat->hContact, "tabSRMM_forced", -1);
- for (i = 0; i < iNumProtos; i++) {
+ for (i=0; i < iNumProtos; i++) {
mir_snprintf(szTemp, sizeof(szTemp), "Protocol%d", i);
if (DBGetContactSettingString(dat->hContact, PluginConfig.szMetaName, szTemp, &dbv))
continue;
@@ -2719,7 +2719,7 @@ void TSAPI BroadCastContainer(const TContainerData *pContainer, UINT message, WP
item.mask = TCIF_PARAM;
int nCount = TabCtrl_GetItemCount(hwndTab);
- for (i = 0; i < nCount; i++) {
+ for (i=0; i < nCount; i++) {
TabCtrl_GetItem(hwndTab, i, &item);
if (IsWindow((HWND)item.lParam)) {
if (bType == SESSIONTYPE_ANY)
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp
index 8084771b43..5282537202 100644
--- a/plugins/TabSRMM/src/containeroptions.cpp
+++ b/plugins/TabSRMM/src/containeroptions.cpp
@@ -200,7 +200,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_OWNAVATARMODE, CB_INSERTSTRING, -1,
(LPARAM)TranslateT("Don't show them"));
- for (i = 0; i < nr_layouts; i++)
+ for (i=0; i < nr_layouts; i++)
SendDlgItemMessage(hwndDlg, IDC_SBARLAYOUT, CB_INSERTSTRING, -1, (LPARAM)TranslateTS(sblayouts[i].szName));
/* bits 24 - 31 of dwFlagsEx hold the side bar layout id */
@@ -211,7 +211,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_TITLEFORMAT, EM_LIMITTEXT, TITLE_FORMATLEN - 1, 0);
SetDlgItemText(hwndDlg, IDC_TITLEFORMAT, pContainer->settings->szTitleFormat);
SetDlgItemText(hwndDlg, IDC_THEME, pContainer->szRelThemeFile);
- for (i = 0; i < NR_O_PAGES; i++) {
+ for (i=0; i < NR_O_PAGES; i++) {
tvis.hParent = NULL;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT | TVIF_PARAM;
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index 15928b4b4c..100a83fb9d 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -815,7 +815,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
CSkin::m_switchBarItem->Render(hdcMem, &rcFrame, true);
}
}
- for (i = 0; i < (int)nParts; i++) {
+ for (i=0; i < (int)nParts; i++) {
SendMessage(hWnd, SB_GETRECT, (WPARAM)i, (LPARAM)&itemRect);
if (!item->IGNORED && !fAero && pContainer && CSkin::m_skinEnabled)
CSkin::DrawItem(hdcMem, &itemRect, item);
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index ee6fb57d43..c8eb8ce044 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -431,7 +431,7 @@ static int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATAT* pdata)
if (mask & MASK_OPEN) {
int i;
- for (i = 0; i < pdata->nrMerged; i++) {
+ for (i=0; i < pdata->nrMerged; i++) {
if (pdata->eventData[i].hEvent != 0) {
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_HANDLECLISTEVENT, (WPARAM)pdata->hContact, (LPARAM)pdata->eventData[i].hEvent);
pdata->eventData[i].hEvent = 0;
@@ -441,7 +441,7 @@ static int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATAT* pdata)
if (mask & MASK_REMOVE) {
int i;
- for (i = 0; i < pdata->nrMerged; i++) {
+ for (i=0; i < pdata->nrMerged; i++) {
if (pdata->eventData[i].hEvent != 0) {
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_REMOVECLISTEVENT, (WPARAM)pdata->hContact, (LPARAM)pdata->eventData[i].hEvent);
pdata->eventData[i].hEvent = 0;
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index de660d51d7..32d65a8671 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -282,14 +282,14 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer,
if (iSelection == ID_FONT_DEFAULTCOLOR) {
int i = 0;
cf.crTextColor = M->GetDword(FONTMODULE, "Font16Col", 0);
- for (i = 0; i < Utils::rtf_ctable_size; i++) {
+ for (i=0; i < Utils::rtf_ctable_size; i++) {
if (Utils::rtf_ctable[i].clr == cf.crTextColor)
cf.crTextColor = RGB(GetRValue(cf.crTextColor), GetGValue(cf.crTextColor), GetBValue(cf.crTextColor) == 0 ? GetBValue(cf.crTextColor) + 1 : GetBValue(cf.crTextColor) - 1);
}
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
break;
}
- for (i = 0; i < RTF_CTABLE_DEFSIZE; i++) {
+ for (i=0; i < RTF_CTABLE_DEFSIZE; i++) {
if (Utils::rtf_ctable[i].menuid == iSelection) {
cf.crTextColor = Utils::rtf_ctable[i].clr;
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
@@ -828,7 +828,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
* correct the input area text color to avoid a color from the table of usable bbcode colors
*/
if (!fIsChat) {
- for (i = 0; i < Utils::rtf_ctable_size; i++) {
+ for (i=0; i < Utils::rtf_ctable_size; i++) {
if (Utils::rtf_ctable[i].clr == inputcharcolor)
inputcharcolor = RGB(GetRValue(inputcharcolor), GetGValue(inputcharcolor), GetBValue(inputcharcolor) == 0 ? GetBValue(inputcharcolor) + 1 : GetBValue(inputcharcolor) - 1);
}
@@ -2411,7 +2411,7 @@ int SI_DeinitStatusIcons()
{
int i;
DestroyHookableEvent(hHookIconPressedEvt);
- for (i = 0; i < 3; i++)
+ for (i=0; i < 3; i++)
DestroyServiceFunction(SI_hServiceIcon[i]);
SI_RemoveAllStatusIcons();
return 0;
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index e226222a68..07c5819064 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -381,7 +381,7 @@ int CGlobals::ModulesLoaded(WPARAM wParam, LPARAM lParam)
Skin->Init(true);
CSkin::initAeroEffect();
- for (i = 0; i < NR_BUTTONBARICONS; i++)
+ for (i=0; i < NR_BUTTONBARICONS; i++)
PluginConfig.g_buttonBarIcons[i] = 0;
::LoadIconTheme();
::CreateImageList(TRUE);
@@ -390,7 +390,7 @@ int CGlobals::ModulesLoaded(WPARAM wParam, LPARAM lParam)
mii.fMask = MIIM_BITMAP;
mii.hbmpItem = HBMMENU_CALLBACK;
submenu = GetSubMenu(PluginConfig.g_hMenuContext, 7);
- for (i = 0; i <= 8; i++)
+ for (i=0; i <= 8; i++)
SetMenuItemInfoA(submenu, (UINT_PTR)i, TRUE, &mii);
PluginConfig.reloadSystemModulesChanged();
@@ -618,7 +618,7 @@ int CGlobals::PreshutdownSendRecv(WPARAM wParam, LPARAM lParam)
hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
}
- for (i = 0; i < SERVICE_LAST; i++) {
+ for (i=0; i < SERVICE_LAST; i++) {
if (PluginConfig.hSvc[i])
DestroyServiceFunction(PluginConfig.hSvc[i]);
}
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 50f049a717..7e66d12bea 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -165,7 +165,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case WM_CREATE:
int i;
- for (i = 0; i < safe_sizeof(_hotkeydescs); i++) {
+ for (i=0; i < safe_sizeof(_hotkeydescs); i++) {
_hotkeydescs[i].cbSize = sizeof(HOTKEYDESC);
Hotkey_Register(&_hotkeydescs[i]);
}
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index c2b45d2e31..c5739bebc1 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -51,23 +51,25 @@ static const UINT addControls[] = { IDC_ADD, IDC_CANCELADD };
static const UINT errorControls[] = { IDC_STATICERRORICON, IDC_STATICTEXT, IDC_RETRY, IDC_CANCELSEND, IDC_MSGSENDLATER};
-static struct _tooltips {
+static struct {
int id;
const TCHAR* text;
-} tooltips[] = {
- IDC_ADD, _T("Add this contact permanently to your contact list"),
- IDC_CANCELADD, _T("Do not add this contact permanently"),
- IDC_TOGGLESIDEBAR, _T("Expand or collapse the side bar")
- -1, NULL
+}
+tooltips[] =
+{
+ { IDC_ADD, _T("Add this contact permanently to your contact list") },
+ { IDC_CANCELADD, _T("Do not add this contact permanently") },
+ { IDC_TOGGLESIDEBAR, _T("Expand or collapse the side bar") }
};
-static struct _buttonicons {
+static struct {
int id;
HICON *pIcon;
-} buttonicons[] = {
- IDC_ADD, &PluginConfig.g_buttonBarIcons[ICON_BUTTON_ADD],
- IDC_CANCELADD, &PluginConfig.g_buttonBarIcons[ICON_BUTTON_CANCEL],
- -1, NULL
+}
+buttonicons[] =
+{
+ { IDC_ADD, &PluginConfig.g_buttonBarIcons[ICON_BUTTON_ADD] },
+ { IDC_CANCELADD, &PluginConfig.g_buttonBarIcons[ICON_BUTTON_CANCEL] }
};
static void _clrMsgFilter(LPARAM lParam)
@@ -151,7 +153,7 @@ static void ShowPopupMenu(TWindowData *dat, int idFrom, HWND hwndFrom, POINT pt)
//MAD: quote mod
InsertMenuA(hSubMenu, 6/*5*/, MF_BYPOSITION | MF_SEPARATOR, 0, 0);
InsertMenu(hSubMenu, 7/*6*/, MF_BYPOSITION | MF_POPUP, (UINT_PTR) PluginConfig.g_hMenuEncoding, TranslateT("Character Encoding"));
- for (i = 0; i < GetMenuItemCount(PluginConfig.g_hMenuEncoding); i++)
+ for (i=0; i < GetMenuItemCount(PluginConfig.g_hMenuEncoding); i++)
CheckMenuItem(PluginConfig.g_hMenuEncoding, i, MF_BYPOSITION | MF_UNCHECKED);
if (dat->codePage == CP_ACP)
CheckMenuItem(PluginConfig.g_hMenuEncoding, 0, MF_BYPOSITION | MF_CHECKED);
@@ -465,7 +467,7 @@ static void MsgWindowUpdateState(TWindowData *dat, UINT msg)
void TSAPI ShowMultipleControls(HWND hwndDlg, const UINT *controls, int cControls, int state)
{
int i;
- for (i = 0; i < cControls; i++)
+ for (i=0; i < cControls; i++)
Utils::showDlgControl(hwndDlg, controls[i], state);
}
@@ -672,7 +674,7 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
_tcsncat(toInsert, PluginConfig.m_MathModStartDelimiter, 30);
SendMessage(hwnd, EM_REPLACESEL, TRUE, (LPARAM)toInsert);
SetKeyboardState(keyState);
- for (i = 0; i < iLen; i++)
+ for (i=0; i < iLen; i++)
SendMessage(hwnd, WM_KEYDOWN, mwdat->dwFlags & MWF_LOG_RTL ? VK_RIGHT : VK_LEFT, 0);
return 0;
}
@@ -1470,11 +1472,9 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
TABSRMM_FireEvent(dat->hContact, hwndDlg, MSG_WINDOW_EVT_OPENING, 0);
- for (i = 0;;i++) {
- if (tooltips[i].id == -1)
- break;
+ for (i=0; i < SIZEOF(tooltips); i++)
SendDlgItemMessage(hwndDlg, tooltips[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(tooltips[i].text), 0);
- }
+
SetDlgItemText(hwndDlg, IDC_LOGFROZENTEXT, dat->bNotOnList ? TranslateT("Contact not on list. You may add it...") :
TranslateT("Autoscrolling is disabled (press F12 to enable it)"));
@@ -1485,7 +1485,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
{
UINT _ctrls[] = {IDC_RETRY, IDC_CANCELSEND, IDC_MSGSENDLATER};
- for (i = 0; i < 3; i++) {
+ for (i=0; i < 3; i++) {
SendDlgItemMessage(hwndDlg, _ctrls[i], BUTTONSETASPUSHBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, _ctrls[i], BUTTONSETASFLATBTN, FALSE, 0);
SendDlgItemMessage(hwndDlg, _ctrls[i], BUTTONSETASTHEMEDBTN, TRUE, 0);
@@ -1700,7 +1700,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
CSkin::SkinDrawBG(hwndDlg, hwndContainer, m_pContainer, &rcClient, hdcMem);
- for (i = 0; i < 2; i++) {
+ for (i=0; i < 2; i++) {
item = &SkinItems[item_ids[i]];
if (!item->IGNORED) {
@@ -2421,10 +2421,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
}
return 0;
case DM_LOADBUTTONBARICONS: {
- int i;
- for (i = 0;;i++) {
- if (buttonicons[i].id == -1)
- break;
+ for (int i=0; i < SIZEOF(buttonicons); i++) {
SendDlgItemMessage(hwndDlg, buttonicons[i].id, BM_SETIMAGE, IMAGE_ICON, (LPARAM)*buttonicons[i].pIcon);
SendDlgItemMessage(hwndDlg, buttonicons[i].id, BUTTONSETCONTAINER, (LPARAM)m_pContainer, 0);
}
@@ -2610,7 +2607,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case DM_REPLAYQUEUE: {
int i;
- for (i = 0; i < dat->iNextQueuedEvent; i++) {
+ for (i=0; i < dat->iNextQueuedEvent; i++) {
if (dat->hQueuedEvents[i] != 0)
StreamInEvents(hwndDlg, dat->hQueuedEvents[i], 1, 1, NULL);
}
@@ -3072,7 +3069,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
ZeroMemory((void *)&tci, sizeof(tci));
tci.mask = TCIF_PARAM;
- for (i = 0; i < tabCount; i++) {
+ for (i=0; i < tabCount; i++) {
TabCtrl_GetItem(hwndTab, i, &tci);
// get the contact from the tabs lparam which hopefully is the tabs hwnd so we can get its userdata.... hopefully
contacthwnd = (HWND)tci.lParam;
@@ -3537,7 +3534,7 @@ quote_from_last:
HDROP hDrop = (HDROP)wParam;
int fileCount = DragQueryFile(hDrop, -1, NULL, 0), totalCount = 0, i;
TCHAR** ppFiles = NULL;
- for (i = 0; i < fileCount; i++) {
+ for (i=0; i < fileCount; i++) {
DragQueryFile(hDrop, i, szFilename, SIZEOF(szFilename));
Utils::AddToFileList(&ppFiles, &totalCount, szFilename);
}
@@ -3556,7 +3553,7 @@ quote_from_last:
SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
}
}
- for (i = 0;ppFiles[i];i++)
+ for (i=0;ppFiles[i];i++)
mir_free(ppFiles[i]);
mir_free(ppFiles);
}
@@ -3725,7 +3722,7 @@ quote_from_last:
*/
SendJob *jobs = sendQueue->getJobByIndex(0);
- for (i = 0; i < SendQueue::NR_SENDJOBS; i++) {
+ for (i=0; i < SendQueue::NR_SENDJOBS; i++) {
if (jobs[i].hOwner == dat->hContact) {
if (jobs[i].iStatus > (unsigned)SendQueue::SQ_INPROGRESS)
sendQueue->clearJob(i);
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index cc227195bc..ef1eecb705 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -72,7 +72,7 @@ BOOL TSAPI IsStatusEvent(int eventType)
if (g_status_events_size == 0)
g_status_events_size = MAX_REGS(g_status_events);
- for (i = 0; i < g_status_events_size; i++) {
+ for (i=0; i < g_status_events_size; i++) {
if (eventType == g_status_events[i])
return TRUE;
}
@@ -1579,7 +1579,7 @@ void TSAPI GetSendFormat(TWindowData *dat, int mode)
else if (dat->SendFormat == 0)
dat->SendFormat = PluginConfig.m_SendFormat ? 1 : 0;
}
- for (i = 0; i < 5; i++)
+ for (i=0; i < 5; i++)
Utils::enableDlgControl(dat->hwnd, controls[i], dat->SendFormat != 0 ? TRUE : FALSE);
return;
}
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 875f1f7006..d79de1318d 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -145,7 +145,7 @@ void TSAPI CacheLogFonts()
ReleaseDC(NULL, hdc);
ZeroMemory((void *)logfonts, sizeof(LOGFONTA) * MSGDLGFONTCOUNT + 2);
- for (i = 0; i < MSGDLGFONTCOUNT; i++) {
+ for (i=0; i < MSGDLGFONTCOUNT; i++) {
LoadLogfont(i, &logfonts[i], &fontcolors[i], FONTMODULE);
wsprintfA(rtfFontsGlobal[i], "\\f%u\\cf%u\\b%d\\i%d\\ul%d\\fs%u", i, i, logfonts[i].lfWeight >= FW_BOLD ? 1 : 0, logfonts[i].lfItalic,logfonts[i].lfUnderline, 2 * abs(logfonts[i].lfHeight) * 74 / logPixelSY);
}
@@ -162,7 +162,7 @@ void TSAPI CacheLogFonts()
COLORREF clr;
LOGFONTA lf;
- for (i = 0; i < IPFONTCOUNT; i++) {
+ for (i=0; i < IPFONTCOUNT; i++) {
if (CInfoPanel::m_ipConfig.hFonts[i])
DeleteObject(CInfoPanel::m_ipConfig.hFonts[i]);
LoadLogfont(i + 100, &lf, &clr, FONTMODULE);
@@ -198,7 +198,7 @@ void FreeLogFonts()
{
int i;
- for (i = 0; i < IPFONTCOUNT; i++)
+ for (i=0; i < IPFONTCOUNT; i++)
if (CInfoPanel::m_ipConfig.hFonts[i])
DeleteObject(CInfoPanel::m_ipConfig.hFonts[i]);
@@ -454,12 +454,12 @@ static void Build_RTF_Header(char **buffer, int *bufferEnd, int *bufferAlloced,
else
AppendToBuffer(buffer, bufferEnd, bufferAlloced, "{\\rtf1\\ansi\\deff0{\\fonttbl");
- for (i = 0; i < MSGDLGFONTCOUNT; i++)
+ for (i=0; i < MSGDLGFONTCOUNT; i++)
AppendToBuffer(buffer, bufferEnd, bufferAlloced, "{\\f%u\\fnil\\fcharset%u %s;}", i, logFonts[i].lfCharSet, logFonts[i].lfFaceName);
AppendToBuffer(buffer, bufferEnd, bufferAlloced, "{\\f%u\\fnil\\fcharset%u %s;}", MSGDLGFONTCOUNT, logFonts[i].lfCharSet, "Arial");
AppendToBuffer(buffer, bufferEnd, bufferAlloced, "}{\\colortbl ");
- for (i = 0; i < MSGDLGFONTCOUNT; i++)
+ for (i=0; i < MSGDLGFONTCOUNT; i++)
AppendToBuffer(buffer, bufferEnd, bufferAlloced, "\\red%u\\green%u\\blue%u;", GetRValue(fontColors[i]), GetGValue(fontColors[i]), GetBValue(fontColors[i]));
if (GetSysColorBrush(COLOR_HOTLIGHT) == NULL)
colour = RGB(0, 0, 255);
@@ -495,7 +495,7 @@ static void Build_RTF_Header(char **buffer, int *bufferEnd, int *bufferAlloced,
// bbcode colors...
- for (i = 0; i < Utils::rtf_ctable_size; i++)
+ for (i=0; i < Utils::rtf_ctable_size; i++)
AppendToBuffer(buffer, bufferEnd, bufferAlloced, "\\red%u\\green%u\\blue%u;", GetRValue(Utils::rtf_ctable[i].clr), GetGValue(Utils::rtf_ctable[i].clr), GetBValue(Utils::rtf_ctable[i].clr));
/*
@@ -1586,7 +1586,7 @@ static BOOL CALLBACK LangAddCallback(LPTSTR str)
cp = _ttoi(str);
count = sizeof(cpTable) / sizeof(cpTable[0]);
- for (i = 0; i < count && cpTable[i].cpId != cp; i++);
+ for (i=0; i < count && cpTable[i].cpId != cp; i++);
if (i < count)
AppendMenu(PluginConfig.g_hMenuEncoding, MF_STRING, cp, TranslateTS(cpTable[i].cpName));
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 7bd5ad868c..8617a138d7 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -689,7 +689,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
LRESULT r = SendDlgItemMessage(hwndDlg, IDC_MSGLOGDIDSPLAY, CB_GETCURSEL, 0, 0);
Utils::showDlgControl(hwndDlg, IDC_EXPLAINMSGLOGSETTINGS, r == 0 ? SW_HIDE : SW_SHOW);
Utils::showDlgControl(hwndDlg, IDC_LOGOPTIONS, r == 0 ? SW_SHOW : SW_HIDE);
- for (i = 0; i < safe_sizeof(__ctrls); i++)
+ for (i=0; i < safe_sizeof(__ctrls); i++)
Utils::enableDlgControl(hwndDlg, __ctrls[i], r == 0 ? TRUE : FALSE);
return 0;
}
@@ -850,7 +850,7 @@ static void ResetCList(HWND hwndDlg)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKBITMAP, 0, (LPARAM)(HBITMAP) NULL);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETINDENT, 10, 0);
- for (i = 0; i <= FONTID_MAX; i++)
+ for (i=0; i <= FONTID_MAX; i++)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
@@ -1512,7 +1512,7 @@ static INT_PTR CALLBACK DlgProcTabSrmmModernOptions(HWND hwndDlg, UINT msg, WPAR
TranslateDialogDefault(hwndDlg);
- for (i = 0; i < SIZEOF(opts); ++i)
+ for (i=0; i < SIZEOF(opts); ++i)
OptCheckBox_Load(hwndDlg, opts+i);
// Always on!
@@ -1605,7 +1605,7 @@ static INT_PTR CALLBACK DlgProcTabSrmmModernOptions(HWND hwndDlg, UINT msg, WPAR
case PSN_APPLY:
{
int i;
- for (i = 0; i < SIZEOF(opts); ++i)
+ for (i=0; i < SIZEOF(opts); ++i)
OptCheckBox_Save(hwndDlg, opts+i);
if (IsDlgButtonChecked(hwndDlg, IDC_LOADCOUNT))
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 8df0d1aac6..8fe693fcd8 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -550,7 +550,7 @@ static void TSAPI InitAPI()
ZeroMemory(PluginConfig.hSvc, sizeof(HANDLE) * CGlobals::SERVICE_LAST);
- for (i = 0; i < safe_sizeof(SERVICES); i++)
+ for (i=0; i < safe_sizeof(SERVICES); i++)
*(SERVICES[i].h) = CreateServiceFunction(SERVICES[i].szName, SERVICES[i].pfnService);
*(SERVICES[CGlobals::H_MS_MSG_SENDMESSAGEW].h) = CreateServiceFunction(MS_MSG_SENDMESSAGE "W", SendMessageCommand_W);
@@ -1169,7 +1169,7 @@ static void UnloadIcons()
}
if (PluginConfig.g_hbmUnknown)
DeleteObject(PluginConfig.g_hbmUnknown);
- for (i = 0; i < 4; i++) {
+ for (i=0; i < 4; i++) {
if (PluginConfig.m_AnimTrayIcons[i])
DestroyIcon(PluginConfig.m_AnimTrayIcons[i]);
}
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index 060dc1dae8..a347d0b06d 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -756,7 +756,7 @@ void CSendLater::qMgrSaveColumns()
LVCOLUMN col = {0};
col.mask = LVCF_WIDTH;
- for (i = 0; i < QMGR_LIST_NRCOLUMNS; i++) {
+ for (i=0; i < QMGR_LIST_NRCOLUMNS; i++) {
::SendMessage(m_hwndList, LVM_GETCOLUMN, i, reinterpret_cast<LPARAM>(&col));
nWidths[i] = max(col.cx, 10);
}
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 610eda2f4f..8dffa1f622 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -82,7 +82,7 @@ int SendQueue::findNextFailed(const TWindowData *dat) const
if (dat) {
int i;
- for (i = 0; i < NR_SENDJOBS; i++) {
+ for (i=0; i < NR_SENDJOBS; i++) {
if (m_jobs[i].hOwner == dat->hContact && m_jobs[i].iStatus == SQ_ERROR)
return i;
}
@@ -119,7 +119,7 @@ int SendQueue::addTo(TWindowData *dat, const int iLen, int dwFlags)
/*
* find a free entry in the send queue...
*/
- for (i = 0; i < NR_SENDJOBS; i++) {
+ for (i=0; i < NR_SENDJOBS; i++) {
if (m_jobs[i].hOwner != 0 || m_jobs[i].iStatus != 0) {
// this entry is used, check if it's orphaned and can be removed...
if (m_jobs[i].hwndOwner && IsWindow(m_jobs[i].hwndOwner)) // window exists, do not reuse it
@@ -630,7 +630,7 @@ void SendQueue::showErrorControls(TWindowData *dat, const int showCmd) const
dat->hTabIcon = dat->hTabStatusIcon;
}
- for (i = 0; i < 5; i++) {
+ for (i=0; i < 5; i++) {
if (IsWindow(GetDlgItem(hwndDlg, myerrorControls[i])))
Utils::showDlgControl(hwndDlg, myerrorControls[i], showCmd ? SW_SHOW : SW_HIDE);
}
@@ -738,7 +738,7 @@ int SendQueue::RTL_Detect(const WCHAR *pszwText)
GetStringTypeW(CT_CTYPE2, pszwText, iLen, infoTypeC2);
- for (i = 0; i < iLen; i++) {
+ for (i=0; i < iLen; i++) {
if (infoTypeC2[i] == C2_RIGHTTOLEFT)
n++;
}
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index ecc6213d4a..44aaaa4f83 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -138,7 +138,7 @@ static UINT FindLeftDownItem(HWND hwnd)
UINT nItem = 0;
int i;
- for (i = 0;i < nCount;i++) {
+ for (i=0;i < nCount;i++) {
TabCtrl_GetItemRect(hwnd, i, &rctCur);
if (rctCur.left > 0 && rctCur.left <= rctLeft.left) {
if (rctCur.bottom > rctLeft.bottom) {
@@ -1270,7 +1270,7 @@ page_done:
ScreenToClient(hwnd, &hti.pt);
hti.flags = 0;
hotItem = TabCtrl_HitTest(hwnd, &hti);
- for (i = 0; i < nCount; i++) {
+ for (i=0; i < nCount; i++) {
TWindowData* dat = 0;
if (i != iActive) {
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp
index 087ba6506c..8924f58013 100644
--- a/plugins/TabSRMM/src/templates.cpp
+++ b/plugins/TabSRMM/src/templates.cpp
@@ -89,7 +89,7 @@ static void LoadTemplatesFrom(TTemplateSet *tSet, HANDLE hContact, int rtl)
DBVARIANT dbv = {0};
int i;
- for (i = 0; i <= TMPL_ERRMSG; i++) {
+ for (i=0; i <= TMPL_ERRMSG; i++) {
if (M->GetTString(hContact, rtl ? RTLTEMPLATES_MODULE : TEMPLATES_MODULE, TemplateNames[i], &dbv))
continue;
if (dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_WCHAR)
@@ -106,12 +106,12 @@ void LoadDefaultTemplates()
RTL_Active = RTL_Default;
if (M->GetByte(RTLTEMPLATES_MODULE, "setup", 0) < 2) {
- for (i = 0; i <= TMPL_ERRMSG; i++)
+ for (i=0; i <= TMPL_ERRMSG; i++)
M->WriteTString(NULL, RTLTEMPLATES_MODULE, TemplateNames[i], RTL_Default.szTemplates[i]);
M->WriteByte(RTLTEMPLATES_MODULE, "setup", 2);
}
if (M->GetByte(TEMPLATES_MODULE, "setup", 0) < 2) {
- for (i = 0; i <= TMPL_ERRMSG; i++)
+ for (i=0; i <= TMPL_ERRMSG; i++)
M->WriteTString(NULL, TEMPLATES_MODULE, TemplateNames[i], LTR_Default.szTemplates[i]);
M->WriteByte(TEMPLATES_MODULE, "setup", 2);
}
@@ -184,7 +184,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
Utils::enableDlgControl(hwndDlg, IDC_SAVETEMPLATE, FALSE);
Utils::enableDlgControl(hwndDlg, IDC_REVERT, FALSE);
Utils::enableDlgControl(hwndDlg, IDC_FORGET, FALSE);
- for (i = 0; i <= TMPL_ERRMSG; i++) {
+ for (i=0; i <= TMPL_ERRMSG; i++) {
SendDlgItemMessageA(hwndDlg, IDC_TEMPLATELIST, LB_ADDSTRING, 0, (LPARAM)Translate(TemplateNames[i]));
SendDlgItemMessage(hwndDlg, IDC_TEMPLATELIST, LB_SETITEMDATA, i, (LPARAM)i);
}
diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp
index 4e1edde78e..b54801461e 100644
--- a/plugins/TabSRMM/src/themeio.cpp
+++ b/plugins/TabSRMM/src/themeio.cpp
@@ -198,7 +198,7 @@ void TSAPI WriteThemeToINI(const TCHAR *szIniFilenameT, struct TWindowData *dat)
int firstIndex = fontBlocks[n].iFirst;
char *szModule = fontBlocks[n].szModule;
WritePrivateProfileStringA(fontBlocks[n].szBLockname, "Valid", "1", szIniFilename);
- for (i = 0; i < fontBlocks[n].iCount; i++) {
+ for (i=0; i < fontBlocks[n].iCount; i++) {
sprintf(szTemp, "Font%d", firstIndex + i);
sprintf(szAppname, fontBlocks[n].szIniTemp, firstIndex + i);
if (!DBGetContactSettingString(NULL, szModule, szTemp, &dbv)) {
@@ -218,12 +218,12 @@ void TSAPI WriteThemeToINI(const TCHAR *szIniFilenameT, struct TWindowData *dat)
}
def = SRMSGDEFSET_BKGCOLOUR;
- for (i = 0; i < safe_sizeof(_extSettings); i++) {
+ for (i=0; i < safe_sizeof(_extSettings); i++) {
WritePrivateProfileStringA(_extSettings[i].szIniSection, _extSettings[i].szIniName,
_itoa(M->GetDword(_extSettings[i].szDbModule, _extSettings[i].szDbSetting, _extSettings[i].dwDef), szBuf, 10), szIniFilename);
}
- for (i = 0; i < safe_sizeof(_extSettings_v5); i++) {
+ for (i=0; i < safe_sizeof(_extSettings_v5); i++) {
WritePrivateProfileStringA(_extSettings_v5[i].szIniSection, _extSettings_v5[i].szIniName,
_itoa(M->GetDword(_extSettings_v5[i].szDbModule, _extSettings_v5[i].szDbSetting, _extSettings_v5[i].dwDef), szBuf, 10), szIniFilename);
}
@@ -231,7 +231,7 @@ void TSAPI WriteThemeToINI(const TCHAR *szIniFilenameT, struct TWindowData *dat)
WritePrivateProfileStringA("Message Log", "VGrid", _itoa(M->GetByte("wantvgrid", 0), szBuf, 10), szIniFilename);
WritePrivateProfileStringA("Message Log", "ExtraMicroLF", _itoa(M->GetByte("extramicrolf", 0), szBuf, 10), szIniFilename);
- for (i = 0; i <= TMPL_ERRMSG; i++) {
+ for (i=0; i <= TMPL_ERRMSG; i++) {
char *encoded;
if (dat == 0)
encoded = mir_utf8encodeT(LTR_Active.szTemplates[i]);
@@ -246,14 +246,14 @@ void TSAPI WriteThemeToINI(const TCHAR *szIniFilenameT, struct TWindowData *dat)
WritePrivateProfileStringA("RTLTemplates", TemplateNames[i], encoded, szIniFilename);
mir_free(encoded);
}
- for (i = 0; i < CUSTOM_COLORS; i++) {
+ for (i=0; i < CUSTOM_COLORS; i++) {
sprintf(szTemp, "cc%d", i + 1);
if (dat == 0)
WritePrivateProfileStringA("Custom Colors", szTemp, _itoa(M->GetDword(szTemp, 0), szBuf, 10), szIniFilename);
else
WritePrivateProfileStringA("Custom Colors", szTemp, _itoa(dat->pContainer->theme.custom_colors[i], szBuf, 10), szIniFilename);
}
- for (i = 0; i <= 7; i++)
+ for (i=0; i <= 7; i++)
WritePrivateProfileStringA("Nick Colors", _itoa(i, szBuf, 10), _itoa(g_Settings.nickColors[i], szTemp, 10), szIniFilename);
mir_free(szIniFilename);
@@ -289,7 +289,7 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in
n++;
continue;
}
- for (i = 0; i < fontBlocks[n].iCount; i++) {
+ for (i=0; i < fontBlocks[n].iCount; i++) {
sprintf(szTemp, "Font%d", firstIndex + i);
sprintf(szAppname, fontBlocks[n].szIniTemp, firstIndex + i);
if (GetPrivateProfileStringA(szAppname, "Face", "Verdana", szBuf, sizeof(szBuf), szIniFilename) != 0) {
@@ -324,13 +324,13 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in
if (dwFlags & THEME_READ_FONTS) {
COLORREF defclr;
- for (i = 0; i < safe_sizeof(_extSettings); i++) {
+ for (i=0; i < safe_sizeof(_extSettings); i++) {
M->WriteDword(_extSettings[i].szDbModule, _extSettings[i].szDbSetting,
GetPrivateProfileIntA(_extSettings[i].szIniSection, _extSettings[i].szIniName, _extSettings[i].dwDef, szIniFilename));
}
if (version >= 5) {
- for (i = 0; i < safe_sizeof(_extSettings_v5); i++) {
+ for (i=0; i < safe_sizeof(_extSettings_v5); i++) {
M->WriteDword(_extSettings_v5[i].szDbModule, _extSettings_v5[i].szDbSetting,
GetPrivateProfileIntA(_extSettings_v5[i].szIniSection, _extSettings_v5[i].szIniName, _extSettings_v5[i].dwDef, szIniFilename));
}
@@ -339,14 +339,14 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in
M->WriteByte(SRMSGMOD_T, "wantvgrid", (BYTE)(GetPrivateProfileIntA("Message Log", "VGrid", 0, szIniFilename)));
M->WriteByte(SRMSGMOD_T, "extramicrolf", (BYTE)(GetPrivateProfileIntA("Message Log", "ExtraMicroLF", 0, szIniFilename)));
- for (i = 0; i < CUSTOM_COLORS; i++) {
+ for (i=0; i < CUSTOM_COLORS; i++) {
sprintf(szTemp, "cc%d", i + 1);
if (dat == 0)
M->WriteDword(SRMSGMOD_T, szTemp, GetPrivateProfileIntA("Custom Colors", szTemp, RGB(224, 224, 224), szIniFilename));
else
dat->theme.custom_colors[i] = GetPrivateProfileIntA("Custom Colors", szTemp, RGB(224, 224, 224), szIniFilename);
}
- for (i = 0; i <= 7; i++) {
+ for (i=0; i <= 7; i++) {
if (i == 5)
defclr = GetSysColor(COLOR_HIGHLIGHT);
else if (i == 6)
@@ -363,7 +363,7 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in
int SY = GetDeviceCaps(hdc, LOGPIXELSY);
ReleaseDC(NULL, hdc);
if (!noAdvanced) {
- for (i = 0; i < MSGDLGFONTCOUNT; i++) {
+ for (i=0; i < MSGDLGFONTCOUNT; i++) {
_snprintf(szTemp, 20, "Font%d", i);
LoadLogfontFromINI(i, szTemp, &dat->theme.logFonts[i], &dat->theme.fontColors[i], szIniFilename);
wsprintfA(dat->theme.rtfFonts + (i * RTFCACHELINESIZE), "\\f%u\\cf%u\\b%d\\i%d\\ul%d\\fs%u", i, i, dat->theme.logFonts[i].lfWeight >= FW_BOLD ? 1 : 0, dat->theme.logFonts[i].lfItalic, dat->theme.logFonts[i].lfUnderline, 2 * abs(dat->theme.logFonts[i].lfHeight) * 74 / SY);
@@ -387,7 +387,7 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in
dat->theme.left_indent = GetPrivateProfileIntA("Message Log", "LeftIndent", 0, szIniFilename);
dat->theme.right_indent = GetPrivateProfileIntA("Message Log", "RightIndent", 0, szIniFilename);
- for (i = 0; i < CUSTOM_COLORS; i++) {
+ for (i=0; i < CUSTOM_COLORS; i++) {
sprintf(szTemp, "cc%d", i + 1);
if (dat == 0)
M->WriteDword(SRMSGMOD_T, szTemp, GetPrivateProfileIntA("Custom Colors", szTemp, RGB(224, 224, 224), szIniFilename));
@@ -398,7 +398,7 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in
if (version >= 3) {
if (!noAdvanced && dwFlags & THEME_READ_TEMPLATES) {
- for (i = 0; i <= TMPL_ERRMSG; i++) {
+ for (i=0; i <= TMPL_ERRMSG; i++) {
wchar_t *decoded = 0;
GetPrivateProfileStringA("Templates", TemplateNames[i], "[undef]", szTemplateBuffer, TEMPLATE_LENGTH * 3, szIniFilename);
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index e65a6e61f8..6e786e0eea 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -1204,7 +1204,7 @@ void CSkin::Unload()
m_SkinDarkShadowPen = 0;
if (m_SkinItems) {
- for (i = 0; i < ID_EXTBK_LAST; i++) {
+ for (i=0; i < ID_EXTBK_LAST; i++) {
m_SkinItems[i].IGNORED = 1;
m_SkinItems[i].imageItem = 0;
}
@@ -1237,7 +1237,7 @@ void CSkin::Unload()
m_closeIcon = m_maxIcon = m_minIcon = 0;
- for (i = 0; i < m_nrSkinIcons; i++) {
+ for (i=0; i < m_nrSkinIcons; i++) {
if (m_skinIcons[i].phIcon )
::DestroyIcon(*(m_skinIcons[i].phIcon));
}
@@ -1693,7 +1693,7 @@ void CSkin::Load(void)
p += (lstrlen(p) + 1);
continue;
}
- for (i = 0; i <= ID_EXTBK_LAST; i++) {
+ for (i=0; i <= ID_EXTBK_LAST; i++) {
if (!_tcsicmp(&p[1], SkinItems[i].szName[0] == '{' ? &SkinItems[i].szName[3] : SkinItems[i].szName)) {
ReadItem(i, p);
break;
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp
index d5c27a849c..b7a7aa4dc4 100644
--- a/plugins/TabSRMM/src/trayicon.cpp
+++ b/plugins/TabSRMM/src/trayicon.cpp
@@ -296,7 +296,7 @@ void TSAPI AddContactToFavorites(HANDLE hContact, const TCHAR *szNickname, const
if (c == 0)
InsertMenu(PluginConfig.g_hMenuFavorites, 0, MF_BYPOSITION, (UINT_PTR)hContact, szMenuEntry);
else {
- for (i = 0; i <= c; i++) {
+ for (i=0; i <= c; i++) {
mii2.cch = 0;
mii2.dwTypeData = NULL;
GetMenuItemInfo(PluginConfig.g_hMenuFavorites, i, TRUE, &mii2);
@@ -356,7 +356,7 @@ void TSAPI LoadFavoritesAndRecent()
return;
}
- for (i = 0; i < iIndex - 1; i++) {
+ for (i=0; i < iIndex - 1; i++) {
for (j = 0; j < iIndex - 1; j++) {
if (recentEntries[j].dwTimestamp > recentEntries[j+1].dwTimestamp) {
rceTemp = recentEntries[j];
@@ -365,7 +365,7 @@ void TSAPI LoadFavoritesAndRecent()
}
}
}
- for (i = 0; i < iIndex; i++)
+ for (i=0; i < iIndex; i++)
AddContactToFavorites(recentEntries[i].hContact, NULL, NULL, NULL, 0, 0, 1, PluginConfig.g_hMenuRecent);
delete[] recentEntries;
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index f57b381e3b..1d2fcd573e 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -180,7 +180,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
CheckDlgButton(hwndDlg, IDC_USEPOPUPCOLORS, BST_CHECKED);
}
- for (i = 0; i < sizeof(colorPicker) / sizeof(colorPicker[0]); i++) {
+ for (i=0; i < sizeof(colorPicker) / sizeof(colorPicker[0]); i++) {
SendDlgItemMessage(hwndDlg, colorPicker[i].res, CPM_SETCOLOUR, 0, colorPicker[i].color);
Utils::enableDlgControl(hwndDlg, colorPicker[i].res, (ColorMode == COLOR_OWN));
}
@@ -239,7 +239,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
bEnableOthers = TRUE;
}
- for (i = 0; i < sizeof(colorPicker) / sizeof(colorPicker[0]); i++)
+ for (i=0; i < sizeof(colorPicker) / sizeof(colorPicker[0]); i++)
Utils::enableDlgControl(hwndDlg, colorPicker[i].res, bEnableOthers);
Utils::enableDlgControl(hwndDlg, IDC_USEPOPUPCOLORS, bEnableOthers);
@@ -260,7 +260,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
bEnableOthers = TRUE;
}
- for (i = 0; i < sizeof(colorPicker) / sizeof(colorPicker[0]); i++)
+ for (i=0; i < sizeof(colorPicker) / sizeof(colorPicker[0]); i++)
Utils::enableDlgControl(hwndDlg, colorPicker[i].res, bEnableOthers);
Utils::enableDlgControl(hwndDlg, IDC_USEWINCOLORS, bEnableOthers);
@@ -295,7 +295,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
}
- for (i = 0; i < 2; i++) {
+ for (i=0; i < 2; i++) {
switch (i) {
case PROTOTYPE_CONTACTTYPING_OFF:
@@ -455,7 +455,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case 0:
switch (((LPNMHDR) lParam)->code) {
case PSN_APPLY:
- for (i = 0; i < sizeof(colorPicker) / sizeof(colorPicker[0]); i++) {
+ for (i=0; i < sizeof(colorPicker) / sizeof(colorPicker[0]); i++) {
colorPicker[i].color = SendDlgItemMessage(hwndDlg, colorPicker[i].res, CPM_GETCOLOUR, 0, 0);
M->WriteDword(Module, colorPicker[i].desc, colorPicker[i].color);
}
@@ -534,7 +534,7 @@ int TN_ModuleInit()
Timeout2 = M->GetByte(Module,SET_TIMEOUT2,DEF_TIMEOUT2);
if (!(M->GetDword(Module, colorPicker[0].desc, 1) && !M->GetDword(Module, colorPicker[0].desc, 0)))
- for (i = 0; i < sizeof(colorPicker) / sizeof(colorPicker[0]); i++)
+ for (i=0; i < sizeof(colorPicker) / sizeof(colorPicker[0]); i++)
colorPicker[i].color = M->GetDword(Module,colorPicker[i].desc,0);
mir_sntprintf(szStart, sizeof(szStart), TranslateT("...is typing a message."));
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp
index b1ad7cf796..7148724917 100644
--- a/plugins/TabSRMM/src/userprefs.cpp
+++ b/plugins/TabSRMM/src/userprefs.cpp
@@ -56,7 +56,7 @@ static BOOL CALLBACK FillCpCombo(LPCTSTR str)
UINT cp;
cp = _ttoi(str);
- for (i = 0; cpTable[i].cpName != NULL && cpTable[i].cpId != cp; i++);
+ for (i=0; cpTable[i].cpName != NULL && cpTable[i].cpId != cp; i++);
if (cpTable[i].cpName != NULL) {
LRESULT iIndex = SendMessage(hCpCombo, CB_ADDSTRING, -1, (LPARAM) TranslateTS(cpTable[i].cpName));
SendMessage(hCpCombo, CB_SETITEMDATA, (WPARAM)iIndex, cpTable[i].cpId);
@@ -162,7 +162,7 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam,
if (sCodePage == 0)
SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_SETCURSEL, (WPARAM)0, 0);
else {
- for (i = 0; i < SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_GETCOUNT, 0, 0); i++) {
+ for (i=0; i < SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_GETCOUNT, 0, 0); i++) {
if (SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_GETITEMDATA, (WPARAM)i, 0) == (LRESULT)sCodePage)
SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_SETCURSEL, (WPARAM)i, 0);
}
@@ -545,7 +545,7 @@ INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LP
tci.mask = TCIF_PARAM;
count = TabCtrl_GetItemCount(GetDlgItem(hwndDlg, IDC_OPTIONSTAB));
- for (i = 0;i < count;i++) {
+ for (i=0;i < count;i++) {
TabCtrl_GetItem(GetDlgItem(hwndDlg, IDC_OPTIONSTAB), i, &tci);
SendMessage((HWND)tci.lParam, WM_COMMAND, WM_USER + 100, (LPARAM)&dwActionToTake);
}
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 846cb5bf56..c21245f6fb 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -177,7 +177,7 @@ const TCHAR* Utils::FormatRaw(TWindowData *dat, const TCHAR *msg, int flags, BOO
}
beginmark = 0;
while (TRUE) {
- for (i = 0; i < NR_CODES; i++) {
+ for (i=0; i < NR_CODES; i++) {
if ((tempmark = message.find(w_bbcodes_begin[i], 0)) != message.npos)
break;
}
@@ -590,7 +590,7 @@ int Utils::FindRTLLocale(TWindowData *dat)
if (dat->iHaveRTLLang == 0) {
ZeroMemory(layouts, 20 * sizeof(HKL));
GetKeyboardLayoutList(20, layouts);
- for (i = 0; i < 20 && layouts[i]; i++) {
+ for (i=0; i < 20 && layouts[i]; i++) {
lcid = MAKELCID(LOWORD(layouts[i]), 0);
GetStringTypeA(lcid, CT_CTYPE2, "���", 3, wCtype2);
if (wCtype2[0] == C2_RIGHTTOLEFT || wCtype2[1] == C2_RIGHTTOLEFT || wCtype2[2] == C2_RIGHTTOLEFT)
@@ -656,7 +656,7 @@ void Utils::CreateColorMap(TCHAR *Text)
p2 = _tcsstr(p1, _T("\\red"));
- for (i = 0; i < RTF_CTABLE_DEFSIZE; i++)
+ for (i=0; i < RTF_CTABLE_DEFSIZE; i++)
rtf_ctable[i].index = 0;
default_color = (COLORREF)M->GetDword(FONTMODULE, "Font16Col", 0);
@@ -664,7 +664,7 @@ void Utils::CreateColorMap(TCHAR *Text)
while (p2 && p2 < pEnd) {
if (_stscanf(p2, lpszFmt, &szRed, &szGreen, &szBlue) > 0) {
int i;
- for (i = 0; i < RTF_CTABLE_DEFSIZE; i++) {
+ for (i=0; i < RTF_CTABLE_DEFSIZE; i++) {
if (rtf_ctable[i].clr == RGB(_ttoi(szRed), _ttoi(szGreen), _ttoi(szBlue)))
rtf_ctable[i].index = iIndex;
}
@@ -681,7 +681,7 @@ void Utils::CreateColorMap(TCHAR *Text)
int Utils::RTFColorToIndex(int iCol)
{
int i = 0;
- for (i = 0; i < RTF_CTABLE_DEFSIZE; i++) {
+ for (i=0; i < RTF_CTABLE_DEFSIZE; i++) {
if (rtf_ctable[i].index == iCol)
return i + 1;
}
@@ -1117,7 +1117,7 @@ void Utils::sanitizeFilename(wchar_t* tszFilename)
static wchar_t *forbiddenCharacters = L"%/\\':|\"<>?";
int i;
- for (i = 0; i < lstrlenW(forbiddenCharacters); i++) {
+ for (i=0; i < lstrlenW(forbiddenCharacters); i++) {
wchar_t* szFound = 0;
while ((szFound = wcschr(tszFilename, (int)forbiddenCharacters[i])) != NULL)