summaryrefslogtreecommitdiff
path: root/plugins/SplashScreen/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SplashScreen/src/main.cpp')
-rw-r--r--plugins/SplashScreen/src/main.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp
index e08d070729..1633baeccc 100644
--- a/plugins/SplashScreen/src/main.cpp
+++ b/plugins/SplashScreen/src/main.cpp
@@ -66,11 +66,11 @@ void SplashMain()
{
// Retrive path to exe of current running Miranda is located
szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
- mir_sntprintf(szhAdvaimgPath, SIZEOF(szhAdvaimgPath), _T("%s\\plugins\\advaimg.dll"), szMirDir);
+ mir_sntprintf(szhAdvaimgPath, _countof(szhAdvaimgPath), _T("%s\\plugins\\advaimg.dll"), szMirDir);
CallService(MS_SYSTEM_GETVERSIONTEXT, MAX_PATH, (LPARAM)szVersion);
#ifdef _DEBUG
- mir_sntprintf(szLogFile, SIZEOF(szLogFile), _T("%s\\%s.log"), szMirDir, _T(__PLUGIN_NAME));
+ mir_sntprintf(szLogFile, _countof(szLogFile), _T("%s\\%s.log"), szMirDir, _T(__PLUGIN_NAME));
initLog();
TCHAR *mirandaVerString = mir_a2t(szVersion);
logMessage(_T("Miranda version"), mirandaVerString);
@@ -102,13 +102,13 @@ void SplashMain()
mir_tstrcpy(inBuf, _T("splash\\splash.png"));
TCHAR szExpandedSplashFile[MAX_PATH];
- ExpandEnvironmentStrings(inBuf, szExpandedSplashFile, SIZEOF(szExpandedSplashFile));
+ ExpandEnvironmentStrings(inBuf, szExpandedSplashFile, _countof(szExpandedSplashFile));
mir_tstrcpy(inBuf, szExpandedSplashFile);
TCHAR *pos3 = 0;
pos3 = _tcsrchr(inBuf, _T(':'));
if (pos3 == NULL)
- mir_sntprintf(szSplashFile, SIZEOF(szSplashFile), _T("%s\\%s"), szMirDir, inBuf);
+ mir_sntprintf(szSplashFile, _countof(szSplashFile), _T("%s\\%s"), szMirDir, inBuf);
else
mir_tstrcpy(szSplashFile, inBuf);
@@ -121,13 +121,13 @@ void SplashMain()
mir_tstrcpy(inBuf, _T("sounds\\startup.wav"));
TCHAR szExpandedSoundFile[MAX_PATH];
- ExpandEnvironmentStrings(inBuf, szExpandedSoundFile, SIZEOF(szExpandedSoundFile));
+ ExpandEnvironmentStrings(inBuf, szExpandedSoundFile, _countof(szExpandedSoundFile));
mir_tstrcpy(inBuf, szExpandedSoundFile);
TCHAR *pos2;
pos2 = _tcschr(inBuf, _T(':'));
if (pos2 == NULL)
- mir_sntprintf(szSoundFile, SIZEOF(szSoundFile), _T("%s\\%s"), szMirDir, inBuf);
+ mir_sntprintf(szSoundFile, _countof(szSoundFile), _T("%s\\%s"), szMirDir, inBuf);
else
mir_tstrcpy(szSoundFile, inBuf);
@@ -150,7 +150,7 @@ void SplashMain()
p = _tcsrchr(szSplashDir, _T('\\'));
if (p) *p = 0;
// create the search filter
- mir_sntprintf(szSearch, SIZEOF(szSearch), _T("%s\\*.*"), szSplashDir);
+ mir_sntprintf(szSearch, _countof(szSearch), _T("%s\\*.*"), szSplashDir);
// FFFN will return filenames
HANDLE hFind = INVALID_HANDLE_VALUE;
WIN32_FIND_DATA ffd;
@@ -187,7 +187,7 @@ void SplashMain()
int r = 0;
if (filescount) r = (rand() % filescount) + 1;
- mir_sntprintf(szSplashFile, SIZEOF(szSplashFile), _T("%s\\%s"), szSplashDir, files[r - 1]);
+ mir_sntprintf(szSplashFile, _countof(szSplashFile), _T("%s\\%s"), szSplashDir, files[r - 1]);
#ifdef _DEBUG
logMessage(_T("final file"), szSplashFile);