diff options
author | Goraf <goraf@miranda-ng.org> | 2016-02-09 16:00:09 +0000 |
---|---|---|
committer | Goraf <goraf@miranda-ng.org> | 2016-02-09 16:00:09 +0000 |
commit | d49739f87dd347d6a560dd834788b74cf520b931 (patch) | |
tree | 02d0f5c6f6846f7a48234ed26bc65e421e407d80 /plugins/ContextHelp/src/datastore.cpp | |
parent | fd8fdaa7ade16132fd3f23db5b0727e3615038ad (diff) |
ContextHelp: revert of accidentally lowercased SIZEOF()
git-svn-id: http://svn.miranda-ng.org/main/trunk@16251 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ContextHelp/src/datastore.cpp')
-rw-r--r-- | plugins/ContextHelp/src/datastore.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/ContextHelp/src/datastore.cpp b/plugins/ContextHelp/src/datastore.cpp index ca04665acf..40df51eb08 100644 --- a/plugins/ContextHelp/src/datastore.cpp +++ b/plugins/ContextHelp/src/datastore.cpp @@ -68,7 +68,7 @@ void InitDialogCache(void) hServiceFileChange = CreateServiceFunction("Help/HelpPackChanged", ServiceFileChanged);
hFileChange = INVALID_HANDLE_VALUE;
- if (GetModuleFileName(NULL, szFilePath, sizeof(szFilePath))) {
+ if (GetModuleFileName(NULL, szFilePath, _countof(szFilePath))) {
p = _tcsrchr(szFilePath, _T('\\'));
if (p != NULL)
*(p + 1) = _T('\0');
@@ -135,7 +135,7 @@ static void LoaderThread(void *arg) void *buf;
ZeroMemory(&dialog, sizeof(dialog));
- if (GetModuleFileName(NULL, szDir, sizeof(szDir))) {
+ if (GetModuleFileName(NULL, szDir, _countof(szDir))) {
p = _tcsrchr(szDir, _T('\\'));
if (p)
*p = _T('\0');
@@ -146,7 +146,7 @@ static void LoaderThread(void *arg) do {
if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
continue;
- if (lstrlen(wfd.cFileName)<4 || wfd.cFileName[lstrlen(wfd.cFileName) - 4] != _T('.'))
+ if (lstrlen(wfd.cFileName) < 4 || wfd.cFileName[lstrlen(wfd.cFileName) - 4] != _T('.'))
continue;
mir_sntprintf(szSearch, _T("%s\\%s"), szDir, wfd.cFileName);
success = 1;
@@ -167,7 +167,7 @@ static void LoaderThread(void *arg) PostMessage(hwndHelpDlg, M_HELPLOADFAILED, 0, (LPARAM)dtsp->hwndCtl);
return;
}
- fgets(line, sizeof(line), fp);
+ fgets(line, _countof(line), fp);
TrimString(line);
if (lstrcmpA(line, "Miranda Help Pack Version 1")) {
fclose(fp);
@@ -181,7 +181,7 @@ static void LoaderThread(void *arg) dialog.defaultCodePage = CP_ACP;
while (!feof(fp)) {
startOfLine = ftell(fp);
- if (fgets(line, sizeof(line), fp) == NULL)
+ if (fgets(line, _countof(line), fp) == NULL)
break;
TrimString(line);
if (IsEmpty(line) || line[0] == ';' || line[0] == '\0')
@@ -230,7 +230,7 @@ static void LoaderThread(void *arg) success = 1;
control = NULL;
while (!feof(fp)) {
- if (fgets(line, sizeof(line), fp) == NULL)
+ if (fgets(line, _countof(line), fp) == NULL)
break;
if (IsEmpty(line) || line[0] == ';' || line[0] == '\0')
continue;
@@ -372,8 +372,8 @@ char *CreateControlIdentifier(const char *pszDlgId, const char *pszModule, int c int size;
char *szId;
TCHAR szDefCtlText[128];
- GetControlTitle(hwndCtl, szDefCtlText, sizeof(szDefCtlText));
- size = lstrlenA(pszModule) + lstrlenA(pszDlgId) + sizeof(szDefCtlText) + 22;
+ GetControlTitle(hwndCtl, szDefCtlText, _countof(szDefCtlText));
+ size = lstrlenA(pszModule) + lstrlenA(pszDlgId) + _countof(szDefCtlText) + 22;
szId = (char*)mir_alloc(size);
mir_snprintf(szId, size, "[%s:%i@%s]\r\n%S%s", pszModule, ctrlId, pszDlgId, szDefCtlText, szDefCtlText[0] ? "=" : "");
|