summaryrefslogtreecommitdiff
path: root/plugins/WhenWasIt/src/services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/WhenWasIt/src/services.cpp')
-rw-r--r--plugins/WhenWasIt/src/services.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp
index 3e392520c9..2130782dec 100644
--- a/plugins/WhenWasIt/src/services.cpp
+++ b/plugins/WhenWasIt/src/services.cpp
@@ -220,16 +220,16 @@ INT_PTR ImportBirthdaysService(WPARAM wParam, LPARAM lParam)
of.lStructSize = sizeof(OPENFILENAME);
//of.hInstance = hInstance;
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, SIZEOF(filter), _T("%s (*") _T(BIRTHDAY_EXTENSION) _T(")%c*") _T(BIRTHDAY_EXTENSION) _T("%c"), TranslateT("Birthdays files"), 0, 0);
+ mir_sntprintf(filter, _countof(filter), _T("%s (*") _T(BIRTHDAY_EXTENSION) _T(")%c*") _T(BIRTHDAY_EXTENSION) _T("%c"), TranslateT("Birthdays files"), 0, 0);
of.lpstrFilter = filter;
of.lpstrFile = fileName;
- of.nMaxFile = SIZEOF(fileName);
+ of.nMaxFile = _countof(fileName);
of.lpstrTitle = TranslateT("Please select a file to import birthdays from...");
of.Flags = OFN_FILEMUSTEXIST;
if (GetOpenFileName(&of)) {
TCHAR buffer[2048];
- mir_sntprintf(buffer, SIZEOF(buffer), TranslateT("Importing birthdays from file: %s"), fileName);
+ mir_sntprintf(buffer, _countof(buffer), TranslateT("Importing birthdays from file: %s"), fileName);
ShowPopupMessage(TranslateT("WhenWasIt"), buffer, hImportBirthdays);
DoImport(fileName);
ShowPopupMessage(TranslateT("WhenWasIt"), TranslateT("Done importing birthdays"), hImportBirthdays);
@@ -245,10 +245,10 @@ INT_PTR ExportBirthdaysService(WPARAM wParam, LPARAM lParam)
of.lStructSize = sizeof(OPENFILENAME);
//of.hInstance = hInstance;
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, SIZEOF(filter), _T("%s (*") _T(BIRTHDAY_EXTENSION) _T(")%c*") _T(BIRTHDAY_EXTENSION) _T("%c%s (*.*)%c*.*%c"), TranslateT("Birthdays files"), 0, 0, TranslateT("All Files"), 0, 0);
+ mir_sntprintf(filter, _countof(filter), _T("%s (*") _T(BIRTHDAY_EXTENSION) _T(")%c*") _T(BIRTHDAY_EXTENSION) _T("%c%s (*.*)%c*.*%c"), TranslateT("Birthdays files"), 0, 0, TranslateT("All Files"), 0, 0);
of.lpstrFilter = filter;
of.lpstrFile = fileName;
- of.nMaxFile = SIZEOF(fileName);
+ of.nMaxFile = _countof(fileName);
of.lpstrTitle = TranslateT("Please select a file to export birthdays to...");
if (GetSaveFileName(&of)) {
@@ -257,7 +257,7 @@ INT_PTR ExportBirthdaysService(WPARAM wParam, LPARAM lParam)
if (!_tcschr(fn, _T('.')))
mir_tstrcat(fileName, _T(BIRTHDAY_EXTENSION));
- mir_sntprintf(buffer, SIZEOF(buffer), TranslateT("Exporting birthdays to file: %s"), fileName);
+ mir_sntprintf(buffer, _countof(buffer), TranslateT("Exporting birthdays to file: %s"), fileName);
ShowPopupMessage(TranslateT("WhenWasIt"), buffer, hExportBirthdays);
DoExport(fileName);
ShowPopupMessage(TranslateT("WhenWasIt"), TranslateT("Done exporting birthdays"), hExportBirthdays);
@@ -278,7 +278,7 @@ int DoImport(TCHAR *fileName)
while (!feof(fin)) {
TCHAR buffer[4096];
- _fgetts(buffer, SIZEOF(buffer), fin);
+ _fgetts(buffer, _countof(buffer), fin);
if (buffer[0] == _T(COMMENT_CHAR))
continue;
@@ -304,7 +304,7 @@ int DoImport(TCHAR *fileName)
}
else {
TCHAR tmp[2048];
- mir_sntprintf(tmp, SIZEOF(tmp), TranslateT(NOTFOUND_FORMAT), szHandle, szProto);
+ mir_sntprintf(tmp, _countof(tmp), TranslateT(NOTFOUND_FORMAT), szHandle, szProto);
ShowPopupMessage(TranslateT("Warning"), tmp, hImportBirthdays);
}
}