From d49739f87dd347d6a560dd834788b74cf520b931 Mon Sep 17 00:00:00 2001 From: Goraf Date: Tue, 9 Feb 2016 16:00:09 +0000 Subject: ContextHelp: revert of accidentally lowercased SIZEOF() git-svn-id: http://svn.miranda-ng.org/main/trunk@16251 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ContextHelp/src/streaminout.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/ContextHelp/src/streaminout.cpp') diff --git a/plugins/ContextHelp/src/streaminout.cpp b/plugins/ContextHelp/src/streaminout.cpp index 6962dce293..bf692c54ac 100644 --- a/plugins/ContextHelp/src/streaminout.cpp +++ b/plugins/ContextHelp/src/streaminout.cpp @@ -194,13 +194,13 @@ void StreamInHtml(HWND hwndEdit, const char *szHtml, UINT codepage, COLORREF clr CopyMemory(szTagName, pszHtml + 1, min(sizeof(szTagName), iNameEnd)); szTagName[min(sizeof(szTagName), iNameEnd) - 1] = '\0'; - for (i = 0; i < sizeof(simpleHtmlRtfConversions); i++) { + for (i = 0; i < _countof(simpleHtmlRtfConversions); i++) { if (!lstrcmpiA(szTagName, simpleHtmlRtfConversions[i].szHtml)) { AppendToCharBuffer(&body, "\\%s ", simpleHtmlRtfConversions[i].szRtf); break; } } - if (i == sizeof(simpleHtmlRtfConversions)) { + if (i == _countof(simpleHtmlRtfConversions)) { if (!lstrcmpiA(szTagName, "br")) { AppendToCharBuffer(&body, "\\par "); charCount++; // linebreaks are characters @@ -251,7 +251,7 @@ void StreamInHtml(HWND hwndEdit, const char *szHtml, UINT codepage, COLORREF clr if (szColour != NULL) { int i, freeColour = 1; if (szColour[0] != '#' || lstrlenA(szColour) != 7) { - for (i = 0; i < sizeof(htmlColourNames); i++) { + for (i = 0; i < _countof(htmlColourNames); i++) { if (!lstrcmpiA(szColour, htmlColourNames[i].szName)) { mir_free(szColour); szColour = (char*)htmlColourNames[i].szClr; @@ -303,7 +303,7 @@ void StreamInHtml(HWND hwndEdit, const char *szHtml, UINT codepage, COLORREF clr pszTagEnd = strchr(pszHtml + 1, ';'); if (pszTagEnd == NULL) break; - CopyMemory(szTag, pszHtml + 1, min(sizeof(szTag), pszTagEnd - pszHtml)); + CopyMemory(szTag, pszHtml + 1, min(_countof(szTag), pszTagEnd - pszHtml)); szTag[min(sizeof(szTag), pszTagEnd - pszHtml) - 1] = '\0'; if (szTag[0] == '#') { int ch; @@ -317,7 +317,7 @@ void StreamInHtml(HWND hwndEdit, const char *szHtml, UINT codepage, COLORREF clr AppendToCharBuffer(&body, "\\'%02x ", ch); } else { - for (i = 0; i < sizeof(htmlSymbolChars); i++) { + for (i = 0; i < _countof(htmlSymbolChars); i++) { if (!lstrcmpiA(szTag, htmlSymbolChars[i].szSym)) { AppendCharToCharBuffer(&body, htmlSymbolChars[i].ch); charCount++; @@ -610,13 +610,13 @@ char *StreamOutHtml(HWND hwndEdit) int i; char szColour[7]; wsprintfA(szColour, "%02x%02x%02x", GetRValue(colourTbl[param]), GetGValue(colourTbl[param]), GetBValue(colourTbl[param])); - for (i = 0; i < sizeof(htmlColourNames); i++) { + for (i = 0; i < _countof(htmlColourNames); i++) { if (!lstrcmpiA(szColour, htmlColourNames[i].szClr)) { AppendToCharBuffer(output, "", htmlColourNames[i].szName); break; } } - if (i == sizeof(htmlColourNames)) + if (i == _countof(htmlColourNames)) AppendToCharBuffer(output, "", szColour); inFontTag = 1; groupStack[groupLevel].colour = param; @@ -734,13 +734,13 @@ char *StreamOutHtml(HWND hwndEdit) if (*pszRtf == ' ') AppendCharToCharBuffer(output, *pszRtf); else { - for (i = 0; i < sizeof(htmlSymbolChars); i++) { + for (i = 0; i < _countof(htmlSymbolChars); i++) { if (*pszRtf == htmlSymbolChars[i].ch) { AppendToCharBuffer(output, "&%s;", htmlSymbolChars[i].szSym); break; } } - if (i == sizeof(htmlSymbolChars)) + if (i == _countof(htmlSymbolChars)) AppendCharToCharBuffer(output, *pszRtf); } } -- cgit v1.2.3