static bool
IsUser1Keyword (LPCTSTR pszChars, int nLength)
{
- const int bufsiz = 13;
- TCHAR buffer[bufsiz];
-
if (nLength < 4 || pszChars[nLength - 4] != '.')
{
return ISXKEYWORDI(s_apszUser1KeywordList, pszChars, (size_t)nLength);
}
else
{
+ const int bufsiz = 13;
+ TCHAR buffer[bufsiz];
for (int L = 0; L < sizeof(s_apszUser1KeywordList)/sizeof(TCHAR *); L++)
{
_tcscpy_s (buffer, bufsiz, s_apszUser1KeywordList[L]);
int nInsertedLines = 0;
int nCurrentLine = nLine;
- size_t nTextPos;
for (;;)
{
int haseol = 0;
- nTextPos = 0;
+ size_t nTextPos = 0;
// advance to end of line
while (nTextPos < cchText && !LineInfo::IsEol(pszText[nTextPos]))
nTextPos++;
};
CString strStyles;
- int nColorIndex, nBgColorIndex;
- int f, b;
- for (f = 0; f < sizeof(arColorIndices)/sizeof(int); f++)
+ for (int f = 0; f < sizeof(arColorIndices)/sizeof(int); f++)
{
- nColorIndex = arColorIndices[f];
- for (b = 0; b < sizeof(arBgColorIndices)/sizeof(int); b++)
+ int nColorIndex = arColorIndices[f];
+ for (int b = 0; b < sizeof(arBgColorIndices)/sizeof(int); b++)
{
- nBgColorIndex = arBgColorIndices[b];
+ int nBgColorIndex = arBgColorIndices[b];
COLORREF clr;
strStyles += Fmt (_T(".sf%db%d {"), nColorIndex, nBgColorIndex);
{
while (ptCurrentPos.y <= ptBlockEnd.y)
{
- int nLineLength, nLines;
+ int nLineLength;
CString line;
if (dwFlags & FIND_REGEXP)
{
- nLines = m_pTextBuffer->GetLineCount ();
+ int nLines = m_pTextBuffer->GetLineCount ();
for (int i = 0; i <= nEolns && ptCurrentPos.y + i < nLines; i++)
{
CString item;
return 0;
const CString sString = pszString;
int posit = sString.GetLength ();
- TCHAR test;
do
{
+ TCHAR test;
#ifdef _UNICODE
if ((test = sString.GetAt (--posit)) == _T ('\\') || test == _T (':'))
#else
static int
fpattern_submatch (LPCTSTR pat, LPCTSTR fname)
{
- TCHAR fch;
- TCHAR pch;
int i;
bool yes, match;
TCHAR lo, hi;
/* Attempt to match subpattern against subfilename */
while (*pat != _T('\0'))
{
- fch = *fname;
- pch = *pat;
+ TCHAR fch = *fname;
+ TCHAR pch = *pat;
pat++;
switch (pch)
{
TCHAR **base = (TCHAR **)pszKeywordList;
size_t lim;
- int cmp;
- TCHAR **p;
for (lim = nKeywordListCount; lim != 0; lim >>= 1) {
- p = base + (lim >> 1) ;
- cmp = (*compare)(pszKey, *p, nKeyLen);
+ TCHAR **p = base + (lim >> 1) ;
+ int cmp = (*compare)(pszKey, *p, nKeyLen);
if (cmp == 0 && (*p)[nKeyLen] == 0)
return true;
if (cmp > 0) { /* key > p: move right */
/* auxiliary function for binary search in interval table */
static int bisearch(wchar_t ucs, const struct interval *table, int max) {
int min = 0;
- int mid;
if (ucs < table[0].first || ucs > table[max].last)
return 0;
while (max >= min) {
- mid = (min + max) / 2;
+ int mid = (min + max) / 2;
if (ucs > table[mid].last)
min = mid + 1;
else if (ucs < table[mid].first)
wchar_t buf[1024];
std::wstring *ps = nullptr;
std::wstring msgid;
- unsigned uid = 0;
bool found_uid = false;
FILE *f;
if (_tfopen_s(&f, strPath.c_str(), _T("r,ccs=UTF-8")) != 0)
{
if (wchar_t *q = wcschr(p0, ':'))
{
- uid = wcstoul(q + 1, &q, 16);
found_uid = true;
}
}