summaryrefslogtreecommitdiff
path: root/plugins/ContextHelp/src/helppack.cpp
diff options
context:
space:
mode:
authorGoraf <goraf@miranda-ng.org>2016-02-07 18:01:06 +0000
committerGoraf <goraf@miranda-ng.org>2016-02-07 18:01:06 +0000
commit1a5efa05af37e5e5eda82d0bf12e1354c9e9deec (patch)
tree4a2424c8576d0298c096d6a418d0e8a3b487cb4a /plugins/ContextHelp/src/helppack.cpp
parent5d631fbe39475e5ef90a7639c8309690c6787c71 (diff)
ContextHelp: x64 fixes (patch by Wishmaster)
git-svn-id: http://svn.miranda-ng.org/main/trunk@16241 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ContextHelp/src/helppack.cpp')
-rw-r--r--plugins/ContextHelp/src/helppack.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/ContextHelp/src/helppack.cpp b/plugins/ContextHelp/src/helppack.cpp
index b5897cbe0d..3592cf6a3f 100644
--- a/plugins/ContextHelp/src/helppack.cpp
+++ b/plugins/ContextHelp/src/helppack.cpp
@@ -157,7 +157,6 @@ static void CleanupLastModifiedUsing(char *szLastModifiedUsing, int nSize)
// pack->szFileName needs to be filled in before call
static BOOL LoadPackData(HELPPACK_INFO *pack, BOOL fEnabledPacks, const char *pszFileVersionHeader)
{
- FILE *fp;
TCHAR szFileName[MAX_PATH];
char line[4096], *pszColon, *buf;
char szLanguageA[64]; /* same size as pack->szLanguage */
@@ -175,7 +174,7 @@ static BOOL LoadPackData(HELPPACK_INFO *pack, BOOL fEnabledPacks, const char *ps
*/
if (!GetPackPath(szFileName, sizeof(szFileName), fEnabledPacks, pack->szFileName))
return FALSE;
- fp = _tfopen(szFileName, _T("rt"));
+ FILE *fp = _tfopen(szFileName, _T("rt"));
if (fp == NULL)
return FALSE;
fgets(line, sizeof(line), fp);
@@ -376,8 +375,6 @@ BOOL IsPluginIncluded(const HELPPACK_INFO *pack, char *pszFileBaseName)
else
p += lstrlenA(pszFileBaseName) + 1;
}
-
- return FALSE;
}
/**************************** SWITCH PACKS ************************/
@@ -424,8 +421,6 @@ void CorrectPacks(const TCHAR *pszFilePattern, const TCHAR *pszDefaultFile, BOOL
{
TCHAR szFrom[MAX_PATH], szDest[MAX_PATH], szDir[MAX_PATH], *pszFile;
BOOL fDirCreated = FALSE, fOneEnabled = FALSE;
- HANDLE hFind;
- WIN32_FIND_DATA wfd;
/* main path */
if (!GetModuleFileName(NULL, szDir, sizeof(szDir)))
@@ -436,7 +431,8 @@ void CorrectPacks(const TCHAR *pszFilePattern, const TCHAR *pszDefaultFile, BOOL
/* move wrongly placed packs from 'Plugins' to 'Language' */
mir_sntprintf(szFrom, sizeof(szFrom), _T("%s\\Plugins\\%s"), szDir, pszFilePattern);
- hFind = FindFirstFile(szFrom, &wfd);
+ WIN32_FIND_DATA wfd;
+ HANDLE hFind = FindFirstFile(szFrom, &wfd);
if (hFind != INVALID_HANDLE_VALUE) {
do {
if (wfd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)