summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/chat
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/chat')
-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
8 files changed, 37 insertions, 37 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) {