if (nPos < 0)
nPos = 0;
- int nIndex = 0, nPrevIndex = 0;
+ int nIndex = 0;
int nCurPos = 0;
int n = 0;
int i = 0;
if (n > nPos && i == nSubLineOffset)
break;
- nPrevIndex = nIndex;
-
nIndex = pIterChar->next();
}
int nLastBreakPos = 0;
int nLastCharBreakPos = 0;
bool bBreakable = false;
- TCHAR ch;
WORD wCharType;
// m_iterChar.setText(reinterpret_cast<const UChar *>(szLine), nLineLength);
// for( int i = 0; i < nLineLength; i = m_iterChar.next())
for( int i = 0; i < nLineLength; i += U16_IS_SURROGATE(szLine[i]) ? 2 : 1)
{
- ch = szLine[i];
+ TCHAR ch = szLine[i];
// remember position of whitespace for wrap
if( bBreakable )
{
ptrdiff_t
get_coding (LPCTSTR name, type_codes *codes, int *coding)
{
- size_t pos;
-
for (int i = 0; i < codes_count; i++)
- if ((pos = str_pos (name, codes[i].name)) >= 0)
+ if (size_t pos; (pos = str_pos (name, codes[i].name)) >= 0)
{
*coding = i;
return pos;
int
iconvert (LPTSTR string, int source_coding, int destination_coding, bool alphabet_only)
{
- ptrdiff_t posit = -2;
LPCTSTR source_chars, destination_chars, cod_pos = nullptr;
TCHAR ch;
LPTSTR s = string;
return -1;
if (source_coding < 0)
{
- posit = fget_coding (string, &source_coding);
+ ptrdiff_t posit = fget_coding (string, &source_coding);
if (posit != 0)
cod_pos = string + posit;
}
// This just checks if the value exists, LoadValueFromReg() below actually
// loads the value.
DWORD type = 0;
- BYTE dataBuf[MAX_PATH_FULL] = {0};
DWORD size = MAX_PATH_FULL;
LONG retValReg;
if (hKey)
+ {
+ BYTE dataBuf[MAX_PATH_FULL] = {0};
retValReg = RegQueryValueEx(hKey, strValueName.c_str(),
0, &type, dataBuf, &size);
+ }
else
retValReg = ERROR_FILE_NOT_FOUND;