diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-28 16:22:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-28 16:22:41 +0000 |
commit | c370af60855db957c5b200914bf0bde743845528 (patch) | |
tree | 0bd2ef127097c9e937c2650e8b202c3f09453323 /plugins/WhenWasIt | |
parent | 7f082bd5d4865c30b313661b7a02f048b4b137be (diff) |
mir_sntprintf / mir_snprintf: obsoleted second parameter removed wherever possible
git-svn-id: http://svn.miranda-ng.org/main/trunk@15064 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WhenWasIt')
-rw-r--r-- | plugins/WhenWasIt/src/dlg_handlers.cpp | 26 | ||||
-rw-r--r-- | plugins/WhenWasIt/src/icons.cpp | 4 | ||||
-rw-r--r-- | plugins/WhenWasIt/src/services.cpp | 8 | ||||
-rw-r--r-- | plugins/WhenWasIt/src/utils.cpp | 6 |
4 files changed, 22 insertions, 22 deletions
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index 932ba2a47f..34b2f11524 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -195,7 +195,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara SetDlgItemText(hWnd, IDC_DAYS_IN_ADVANCE, buffer);
_itot(commonData.checkInterval, buffer, 10);
SetDlgItemText(hWnd, IDC_CHECK_INTERVAL, buffer);
- mir_sntprintf(buffer, _countof(buffer), _T("%d|%d"), commonData.popupTimeout, commonData.popupTimeoutToday);
+ mir_sntprintf(buffer, _T("%d|%d"), commonData.popupTimeout, commonData.popupTimeoutToday);
SetDlgItemText(hWnd, IDC_POPUP_TIMEOUT, buffer);
_itot(commonData.cSoundNearDays, buffer, 10);
SetDlgItemText(hWnd, IDC_SOUND_NEAR_DAYS_EDIT, buffer);
@@ -417,7 +417,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l char *szProto = GetContactProto(hContact);
TCHAR buffer[2048];
- mir_sntprintf(buffer, _countof(buffer), TranslateT("Set birthday for %s:"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_sntprintf(buffer, TranslateT("Set birthday for %s:"), pcli->pfnGetContactDisplayName(hContact, 0));
SetWindowText(hWnd, buffer);
HWND hDate = GetDlgItem(hWnd, IDC_DATE);
@@ -441,7 +441,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l case DOB_PROTOCOL:
DateTime_SetMonthCalColor(hDate, MCSC_TITLEBK, COLOR_PROTOCOL);
- mir_sntprintf(buffer, _countof(buffer), TranslateT("%S protocol"), szProto);
+ mir_sntprintf(buffer, TranslateT("%S protocol"), szProto);
szCurrentModuleTooltip = buffer;
break;
@@ -609,22 +609,22 @@ int UpdateBirthdayEntry(HWND hList, MCONTACT hContact, int entry, int bShowAll, TCHAR buffer[2048];
if ((dtb <= 366) && (dtb >= 0))
- mir_sntprintf(buffer, _countof(buffer), _T("%d"), dtb);
+ mir_sntprintf(buffer, _T("%d"), dtb);
else
- mir_sntprintf(buffer, _countof(buffer), NA);
+ mir_sntprintf(buffer, NA);
ListView_SetItemText(hList, entry, 2, buffer);
if ((month != 0) && (day != 0))
- mir_sntprintf(buffer, _countof(buffer), _T("%04d-%02d-%02d"), year, month, day);
+ mir_sntprintf(buffer, _T("%04d-%02d-%02d"), year, month, day);
else
- mir_sntprintf(buffer, _countof(buffer), NA);
+ mir_sntprintf(buffer, NA);
ListView_SetItemText(hList, entry, 3, buffer);
if (age < 400 && age > 0) //hopefully noone lives longer than this :)
- mir_sntprintf(buffer, _countof(buffer), _T("%d"), age);
+ mir_sntprintf(buffer, _T("%d"), age);
else
- mir_sntprintf(buffer, _countof(buffer), NA);
+ mir_sntprintf(buffer, NA);
ListView_SetItemText(hList, entry, 4, buffer);
ListView_SetItemText(hList, entry, 5, GetBirthdayModule(module, hContact));
@@ -694,7 +694,7 @@ void SetBirthdaysCount(HWND hWnd) {
int count = ListView_GetItemCount((GetDlgItem(hWnd, IDC_BIRTHDAYS_LIST)));
TCHAR title[512];
- mir_sntprintf(title, _countof(title), TranslateT("Birthday list (%d)"), count);
+ mir_sntprintf(title, TranslateT("Birthday list (%d)"), count);
SetWindowText(hWnd, title);
}
@@ -881,7 +881,7 @@ INT_PTR CALLBACK DlgProcUpcoming(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar const int MAX_SIZE = 512;
TCHAR buffer[MAX_SIZE];
timeout--;
- mir_sntprintf(buffer, _countof(buffer), (timeout != 2) ? TranslateT("Closing in %d seconds") : TranslateT("Closing in %d second"), timeout);
+ mir_sntprintf(buffer, (timeout != 2) ? TranslateT("Closing in %d seconds") : TranslateT("Closing in %d second"), timeout);
SetDlgItemText(hWnd, IDC_CLOSE, buffer);
if (timeout <= 0)
@@ -914,9 +914,9 @@ INT_PTR CALLBACK DlgProcUpcoming(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar ListView_InsertItem(hList, &item);
TCHAR buffer[512];
- mir_sntprintf(buffer, _countof(buffer), _T("%d"), data->age);
+ mir_sntprintf(buffer, _T("%d"), data->age);
ListView_SetItemText(hList, index, 1, buffer);
- mir_sntprintf(buffer, _countof(buffer), _T("%d"), data->dtb);
+ mir_sntprintf(buffer, _T("%d"), data->dtb);
ListView_SetItemText(hList, index, 2, buffer);
BirthdaysSortParams params = { 0 };
diff --git a/plugins/WhenWasIt/src/icons.cpp b/plugins/WhenWasIt/src/icons.cpp index 13a2e17350..131d97ed06 100644 --- a/plugins/WhenWasIt/src/icons.cpp +++ b/plugins/WhenWasIt/src/icons.cpp @@ -60,10 +60,10 @@ int AddIcons() hDTB[1] = AddIcon("DTB1", LPGEN("1 day to birthday"), tszPath, IDI_DTB1);
for (int i = 2; i < cDTB; i++) {
mir_snprintf(name, "DTB%d", i);
- mir_snprintf(description, _countof(description), Translate("%d days to birthday"), i);
+ mir_snprintf(description, Translate("%d days to birthday"), i);
hDTB[i] = AddIcon(name, description, tszPath, IDI_DTB0 + i);
}
- mir_snprintf(description, _countof(description), Translate("More than %d days to birthday"), cDTB - 1);
+ mir_snprintf(description, Translate("More than %d days to birthday"), cDTB - 1);
hDTBMore = AddIcon("DTBMore", description, tszPath, IDI_DTBMORE);
hWWIExtraIcons = ExtraIcon_RegisterIcolib("WhenWasIt", LPGEN("WhenWasIt birthday reminder"), "MenuCheck");
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp index 793364088e..e541836bbf 100644 --- a/plugins/WhenWasIt/src/services.cpp +++ b/plugins/WhenWasIt/src/services.cpp @@ -215,7 +215,7 @@ INT_PTR ImportBirthdaysService(WPARAM, LPARAM) of.lStructSize = sizeof(OPENFILENAME);
//of.hInstance = hInstance;
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _countof(filter), _T("%s (*") _T(BIRTHDAY_EXTENSION) _T(")%c*") _T(BIRTHDAY_EXTENSION) _T("%c"), TranslateT("Birthdays files"), 0, 0);
+ mir_sntprintf(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 = _countof(fileName);
@@ -224,7 +224,7 @@ INT_PTR ImportBirthdaysService(WPARAM, LPARAM) if (GetOpenFileName(&of)) {
TCHAR buffer[2048];
- mir_sntprintf(buffer, _countof(buffer), TranslateT("Importing birthdays from file: %s"), fileName);
+ mir_sntprintf(buffer, TranslateT("Importing birthdays from file: %s"), fileName);
ShowPopupMessage(TranslateT("WhenWasIt"), buffer, hImportBirthdays);
DoImport(fileName);
ShowPopupMessage(TranslateT("WhenWasIt"), TranslateT("Done importing birthdays"), hImportBirthdays);
@@ -240,7 +240,7 @@ INT_PTR ExportBirthdaysService(WPARAM, LPARAM) of.lStructSize = sizeof(OPENFILENAME);
//of.hInstance = hInstance;
TCHAR filter[MAX_PATH];
- 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);
+ mir_sntprintf(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 = _countof(fileName);
@@ -252,7 +252,7 @@ INT_PTR ExportBirthdaysService(WPARAM, LPARAM) if (!_tcschr(fn, _T('.')))
mir_tstrcat(fileName, _T(BIRTHDAY_EXTENSION));
- mir_sntprintf(buffer, _countof(buffer), TranslateT("Exporting birthdays to file: %s"), fileName);
+ mir_sntprintf(buffer, TranslateT("Exporting birthdays to file: %s"), fileName);
ShowPopupMessage(TranslateT("WhenWasIt"), buffer, hExportBirthdays);
DoExport(fileName);
ShowPopupMessage(TranslateT("WhenWasIt"), TranslateT("Done exporting birthdays"), hExportBirthdays);
diff --git a/plugins/WhenWasIt/src/utils.cpp b/plugins/WhenWasIt/src/utils.cpp index 245394f1ef..8018101d68 100644 --- a/plugins/WhenWasIt/src/utils.cpp +++ b/plugins/WhenWasIt/src/utils.cpp @@ -155,17 +155,17 @@ TCHAR* GetContactID(MCONTACT hContact, char *szProto) TCHAR tmp[16];
switch (ctInfo.type) {
case CNFT_BYTE:
- mir_sntprintf(tmp, _countof(tmp), _T("%d"), ctInfo.bVal);
+ mir_sntprintf(tmp, _T("%d"), ctInfo.bVal);
buffer = _tcsdup(tmp);
break;
case CNFT_WORD:
- mir_sntprintf(tmp, _countof(tmp), _T("%d"), ctInfo.wVal);
+ mir_sntprintf(tmp, _T("%d"), ctInfo.wVal);
buffer = _tcsdup(tmp);
break;
case CNFT_DWORD:
- mir_sntprintf(tmp, _countof(tmp), _T("%ld"), ctInfo.dVal);
+ mir_sntprintf(tmp, _T("%ld"), ctInfo.dVal);
buffer = _tcsdup(tmp);
break;
|