{
bezerocount++;
if (data[i + 1] == 0x0a || data[i + 1] == 0x0d)
- lecrorlf++;
+ becrorlf++;
}
else if (data[i + 1] == 0)
{
DISPPARAMS dispparams;
UINT nArgErr = (UINT)-1;
EXCEPINFO excepInfo = {0};
- int i;
dispparams.cArgs = LOBYTE((UINT_PTR)op);
dispparams.cNamedArgs = 0;
if (wFlags & (DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF))
VARIANT varParams[12];
VARIANT varData[12];
- for (i = 0; i < (int)dispparams.cArgs; i++)
+ for (int i = 0; i < (int)dispparams.cArgs; i++)
{
if (V_ISBYREF(&argv[i]))
{
if (bNeedToConv)
{
- for (i = 0; i < (int)dispparams.cArgs; i++)
+ for (int i = 0; i < (int)dispparams.cArgs; i++)
{
VariantInit(&varData[i]);
VariantCopyInd(&varData[i], &argv[i]);
{
if (bNeedToConv)
{
- for (i = 0; i < (int)dispparams.cArgs; i++)
+ for (int i = 0; i < (int)dispparams.cArgs; i++)
{
if (V_ISBYREF(&argv[i]))
{
size_t diff12i = 0;
size_t diff3i = 0;
- size_t diff10itmp;
- size_t diff12itmp;
-
- bool lastDiffBlockIsDiff12;
bool firstDiffBlockIsDiff12;
- Element dr3, dr10, dr12, dr10first, dr10last, dr12first, dr12last;
+ Element dr3, dr10, dr12, dr10first, dr10last, dr12first, dr12last;
int linelast0 = 0;
int linelast1 = 0;
else
firstDiffBlockIsDiff12 = false;
}
- lastDiffBlockIsDiff12 = firstDiffBlockIsDiff12;
+ bool lastDiffBlockIsDiff12 = firstDiffBlockIsDiff12;
- diff10itmp = diff10i;
- diff12itmp = diff12i;
+ size_t diff10itmp = diff10i;
+ size_t diff12itmp = diff12i;
for (;;)
{
if (diff10itmp >= diff10count || diff12itmp >= diff12count)
// Use binary search to search for a diff.
int left = 0; // Left limit
- int middle = 0; // Compared item
int right = nDiffCount - 1; // Right limit
while (left <= right)
{
- middle = (left + right) / 2;
+ int middle = (left + right) / 2; // Compared item
int result = LineRelDiff(nLine, middle);
switch (result)
{
// binary search to find correct (or nearest block)
int blo = 0;
int bhi = size - 1;
- int i;
while (blo <= bhi)
{
- i = (blo + bhi) / 2;
+ int i = (blo + bhi) / 2;
const RealityBlock &block = m_RealityBlocks[i];
if (nApparentLine < block.nStartApparent)
bhi = i - 1;
// binary search to find correct (or nearest block)
int blo = 0;
int bhi = size - 1;
- int i;
while (blo <= bhi)
{
- i = (blo + bhi) / 2;
+ int i = (blo + bhi) / 2;
const RealityBlock & block = m_RealityBlocks[i];
if (nRealLine < block.nStartReal)
bhi = i - 1;
// binary search to find correct (or nearest block)
int blo = 0;
int bhi = size - 1;
- int i;
while (blo <= bhi)
{
- i = (blo + bhi) / 2;
+ int i = (blo + bhi) / 2;
const RealityBlock & block = m_RealityBlocks[i];
if (nApparentLine < block.nStartApparent)
bhi = i - 1;
{
const TCHAR sep[] = _T("\r\n");
TCHAR *p_filters = (TCHAR *)&filters[0];
- TCHAR *token;
if (!filters.empty())
{
// find each regular expression and add to list
- token = _tcstok(p_filters, sep);
+ TCHAR *token = _tcstok(p_filters, sep);
while (token)
{
AddFilter(token, true);
find_hunk (struct change *start)
{
struct change *prev;
- int top0, top1;
+ int top0;
int thresh;
do
{
/* Compute number of first line in each file beyond this changed. */
top0 = start->line0 + start->deleted;
- top1 = start->line1 + start->inserted;
+ int top1 = start->line1 + start->inserted;
prev = start;
start = start->link;
/* Threshold distance is 2*CONTEXT between two non-ignorable changes,
output_1_escapedhtml(const char *text, const char *limit)
{
FILE *out = outfile;
- unsigned char c;
const char *t = text;
int column = 0;
int spcolumn = -2;
while (t < limit)
- switch ((c = *t++))
+ switch (unsigned char c = *t++)
{
case '&':
fprintf (out, "&");
{
String spath, sname;
paths_SplitFilename(strDestinationPath, &spath, &sname, 0);
- int code;
std::vector<std::string> args;
std::string sname_utf8;
try
{
ProcessHandle hVss(Process::launch(vssPath, args));
- code = Process::wait(hVss);
+ int code = Process::wait(hVss);
if (code != 0)
{
if (LangMessageBox(IDS_VSS_CHECKINERROR, MB_ICONWARNING | MB_YESNO) == IDYES)
bool VSSHelper::ReLinkVCProj(const String& strSavePath, String& sError)
{
const UINT nBufferSize = 1024;
- TCHAR buffer[nBufferSize] = {0};
- bool bVCPROJ = false;
String tempFile = env_GetTempFileName(env_GetTempPath(), _T("_LT"));
if (tempFile.empty())
String strExt = string_makelower(ext);
if (strExt == _T("vcproj") || strExt == _T("sln"))
{
+ bool bVCPROJ = false;
GetFullVSSPath(strSavePath, bVCPROJ);
HANDLE hfile;
}
static TCHAR charset[] = _T(" \t\n\r=");
+ TCHAR buffer[nBufferSize] = {0};
DWORD numwritten = 0;
bool succeed = true;
bool VSSHelper::GetSLNProjName(HANDLE hFile, HANDLE tFile, TCHAR * buf) const
{
- TCHAR buffer[1024] = {0};
DWORD dwNumWritten = 0;
assert(hFile != NULL && hFile != INVALID_HANDLE_VALUE &&
String capp;
if (*buf != '\\' && !_tcsstr(buf, _T(".")))
{
+ TCHAR buffer[1024] = {0};
+
//write out \\u0020s for every space in buffer2
for (TCHAR * pc = buf; *pc; pc++)
{
{
const char *p = first;
const char *q = first;
- unsigned char c;
if (q < ahead && (p = ++q) < ahead)
{
if (*q == '!' && (*++q == '-' || *q == '['))
}
else
{
+ unsigned char c;
while (q < ahead && !isspace(c = *q) && c != '[' && c != '>' && c != '"' && c != '\'' && c != '=' && c != '/')
{
++q;