Changeset 52406a84c3ae…
Parent efb98170ad2d…
by
Changes to one file · Browse files at 52406a84c3ae Showing diff from parent efb98170ad2d Diff from another changeset...
|
|
@@ -117,7 +117,7 @@ return 0;
}
- CString iconpath = thgdir + "\\icons\\" + strIconName;
+ CString strIconPath = thgdir + "\\icons\\" + strIconName;
const CIconCache::CPair* p = iconcache.Lookup(strIconName);
if (p != NULL)
@@ -129,20 +129,20 @@ return 0;
}
- HICON h = (HICON)::LoadImage(0, iconpath, IMAGE_ICON,
+ HICON hIcon = (HICON)::LoadImage(0, strIconPath, IMAGE_ICON,
16, 16, LR_LOADFROMFILE);
- if (!h)
+ if (!hIcon)
{
- ATLTRACE("GetTortoiseIcon: can't find '%s'\n", (LPCTSTR)iconpath);
+ ATLTRACE("GetTortoiseIcon: can't find '%s'\n", (LPCTSTR)strIconPath);
return 0;
}
- iconcache[iconpath] = h;
+ iconcache[strIconPath] = hIcon;
ATLTRACE("GetTortoiseIcon: added '%s' to iconcache_ (%d icons in cache)\n",
- (LPCTSTR)iconpath, iconcache.GetCount());
+ (LPCTSTR)strIconPath, iconcache.GetCount());
- return h;
+ return hIcon;
}
@@ -150,30 +150,30 @@{
ATLTRACE("GetHgRepoRoot('%s')\n", lpszPath);
- CString p = (::PathIsUNCServerShare(lpszPath) || ::PathIsDirectory(lpszPath)) ?
+ CString strPath = (::PathIsUNCServerShare(lpszPath) || ::PathIsDirectory(lpszPath)) ?
lpszPath : DirName(lpszPath);
for (;;)
{
- CString tdir = p + "\\.hg";
- if (::PathIsUNCServerShare(tdir))
+ CString strHgDir = strPath + "\\.hg";
+ if (::PathIsUNCServerShare(strHgDir))
{
- ATLTRACE("GetHgRepoRoot: tdir is UNC share '%s'\n", (LPCTSTR)tdir);
- p.Empty();
+ ATLTRACE("GetHgRepoRoot: tdir is UNC share '%s'\n", (LPCTSTR)strHgDir);
+ strPath.Empty();
break;
}
- else if (::PathIsDirectory(tdir))
+ else if (::PathIsDirectory(strHgDir))
break;
- CString oldp = p;
- p = DirName(p);
- if (p == oldp)
+ CString strOldPath = strPath;
+ strPath = DirName(strPath);
+ if (strPath == strOldPath)
{
- p.Empty();
+ strPath.Empty();
break;
}
}
- ATLTRACE("GetHgRepoRoot: returning '%s'\n", (LPCTSTR)p);
- return p;
+ ATLTRACE("GetHgRepoRoot: returning '%s'\n", (LPCTSTR)strPath);
+ return strPath;
}
@@ -187,32 +187,32 @@// processes while we have it open
FILE* fopenReadRenameAllowed(LPCTSTR lpszPath)
{
- HANDLE fh = ::CreateFile(lpszPath, GENERIC_READ,
+ HANDLE hFile = ::CreateFile(lpszPath, GENERIC_READ,
FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
0, OPEN_EXISTING, 0, 0);
- if (fh == INVALID_HANDLE_VALUE)
+ if (hFile == INVALID_HANDLE_VALUE)
return 0;
// get C runtime file descriptor from file handle
- int fd = _open_osfhandle((intptr_t)fh, _O_RDONLY);
+ int fd = _open_osfhandle((intptr_t)hFile, _O_RDONLY);
if (fd == -1)
{
ATLTRACE("fopenReadRenameAllowed: _open_osfhandle failed\n");
- ::CloseHandle(fh);
+ ::CloseHandle(hFile);
return 0;
}
// get C runtime FILE from file descriptor
- FILE* f = _fdopen(fd, "r");
- if (f == 0)
+ FILE* pFile = _fdopen(fd, "r");
+ if (pFile == 0)
{
ATLTRACE("fopenReadRenameAllowed: _fdopen failed\n");
_close(fd);
return 0;
}
- return f;
+ return pFile;
}
@@ -226,10 +226,10 @@
DWORD cbData = 600;
LPWSTR lpszData = strRes.GetBuffer(cbData);
- LONG rv = ::RegQueryValueExW(hKey, lpszName, 0, 0, (LPBYTE)lpszData, &cbData);
+ LONG lRes = ::RegQueryValueExW(hKey, lpszName, 0, 0, (LPBYTE)lpszData, &cbData);
strRes.ReleaseBuffer(cbData);
- if (rv == ERROR_SUCCESS)
+ if (lRes == ERROR_SUCCESS)
return 1;
ATLTRACE(L"GetRegSZValueW('%s') failed\n", lpszName);
@@ -259,12 +259,12 @@
void Tokenize(CString str, CAtlList<CString>& rTokens, LPCTSTR lpszDelimiters)
{
- int pos = 0;
- CString strToken = str.Tokenize(lpszDelimiters, pos);
+ int nPos = 0;
+ CString strToken = str.Tokenize(lpszDelimiters, nPos);
while (!strToken.IsEmpty())
{
rTokens.AddTail(strToken);
- strToken = str.Tokenize(lpszDelimiters, pos);
+ strToken = str.Tokenize(lpszDelimiters, nPos);
}
}
|
Loading...