diff options
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r-- | plugins/UserInfoEx/src/ctrl_annivedit.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ctrl_contact.cpp | 8 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/psp_contact.cpp | 4 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/svc_reminder.cpp | 8 |
5 files changed, 12 insertions, 12 deletions
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp index 28ff8c010c..63cf3c74a4 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp +++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp @@ -404,7 +404,7 @@ INT_PTR CAnnivEditCtrl::SetCurSel(WORD wIndex) }
else {
TCHAR szText[MAX_DESC];
- mir_sntprintf(szText, MAX_DESC, _T("'%s'"), TranslateT("Unspecified"));
+ mir_sntprintf(szText, SIZEOF(szText), _T("'%s'"), TranslateT("Unspecified"));
DateTime_SetSystemtime(_hwndDate, GDT_NONE, NULL);
DateTime_SetFormat(_hwndDate, szText);
}
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index 438c37dd4e..5be6d0aec0 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -327,7 +327,7 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam GetDlgItemText(hDlg, EDIT_AREA, szArea, SIZEOF(szArea));
GetDlgItemText(hDlg, EDIT_NUMBER, szData, SIZEOF(szData));
- mir_sntprintf(szPhone, MAXDATASIZE, _T("+%u (%s) %s"), nCountry, szArea, szData);
+ mir_sntprintf(szPhone, SIZEOF(szPhone), _T("+%u (%s) %s"), nCountry, szArea, szData);
noRecursion = 1;
SetDlgItemText(hDlg, EDIT_PHONE, szPhone);
noRecursion = 0;
@@ -777,7 +777,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L !cbex->pItems ||
cbex->iSelectedItem < 0 ||
cbex->iSelectedItem >= cbex->numItems ||
- FAILED(mir_sntprintf(szMsg, MAXDATASIZE, TranslateT("Do you really want to delete the current selected item?\n\t%s\n\t%s"),
+ FAILED(mir_sntprintf(szMsg, SIZEOF(szMsg), TranslateT("Do you really want to delete the current selected item?\n\t%s\n\t%s"),
cbex->pItems[cbex->iSelectedItem].szCat, cbex->pItems[cbex->iSelectedItem].pszVal))
)
{
@@ -943,7 +943,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L // set category string
if (!pItem->pszCat || !pItem->pszCat[0] || !mir_tstrncpy(cbex->pItems[cbex->numItems].szCat, pItem->pszCat, MAX_CAT)) {
- mir_sntprintf(cbex->pItems[cbex->numItems].szCat, MAX_CAT, _T("%s %d"), TranslateT("Other"), ++cbex->numOther);
+ mir_sntprintf(cbex->pItems[cbex->numItems].szCat, SIZEOF(cbex->pItems[cbex->numItems].szCat), _T("%s %d"), TranslateT("Other"), ++cbex->numOther);
}
// set value string
@@ -983,7 +983,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (pItem->wMask & CBEXIM_CAT) {
// set category string
if (!pItem->pszCat || !pItem->pszCat[0] || !mir_tstrncpy(cbex->pItems[pItem->iItem].szCat, pItem->pszCat, SIZEOF(cbex->pItems[pItem->iItem].szCat)))
- mir_sntprintf(cbex->pItems[pItem->iItem].szCat, MAX_CAT, _T("%s %d\0"), TranslateT("Other"), ++cbex->numOther);
+ mir_sntprintf(cbex->pItems[pItem->iItem].szCat, SIZEOF(cbex->pItems[pItem->iItem].szCat), _T("%s %d\0"), TranslateT("Other"), ++cbex->numOther);
if (pItem->iItem == cbex->iSelectedItem)
SetWindowText(cbex->hBtnEdit, cbex->pItems[pItem->iItem].szCat);
}
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp index a5346841d4..a2617a0db1 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp @@ -226,7 +226,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar }
TranslateDialogDefault(hDlg); //to translate oldTitle
GetWindowText(hDlg, oldTitle, SIZEOF(oldTitle));
- mir_sntprintf(newTitle, MAXDATASIZE - 1, _T("%s - %s"), name, oldTitle);
+ mir_sntprintf(newTitle, SIZEOF(newTitle), _T("%s - %s"), name, oldTitle);
SetWindowText(hDlg, newTitle);
}
diff --git a/plugins/UserInfoEx/src/psp_contact.cpp b/plugins/UserInfoEx/src/psp_contact.cpp index 467e0dc03c..265a8ce014 100644 --- a/plugins/UserInfoEx/src/psp_contact.cpp +++ b/plugins/UserInfoEx/src/psp_contact.cpp @@ -47,7 +47,7 @@ INT_PTR CALLBACK PSPProcContactHome(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM PSGetBoldFont(hDlg, hBoldFont);
SendDlgItemMessage(hDlg, IDC_PAGETITLE, WM_SETFONT, (WPARAM)hBoldFont, 0);
- mir_sntprintf(szAddr, MAX_PATH, _T("%s (%s)"), TranslateT("Address"), TranslateT("home"));
+ mir_sntprintf(szAddr, SIZEOF(szAddr), _T("%s (%s)"), TranslateT("Address"), TranslateT("home"));
SetDlgItemText(hDlg, IDC_PAGETITLE, szAddr);
SendDlgItemMessage(hDlg, BTN_GOTO, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open in browser"), MBBF_TCHAR);
TranslateDialogDefault(hDlg);
@@ -194,7 +194,7 @@ INT_PTR CALLBACK PSPProcContactWork(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM PSGetBoldFont(hDlg, hBoldFont);
SendDlgItemMessage(hDlg, IDC_PAGETITLE, WM_SETFONT, (WPARAM)hBoldFont, 0);
- mir_sntprintf(szAddr, MAX_PATH, _T("%s (%s)"), TranslateT("Address and contact"), TranslateT("company"));
+ mir_sntprintf(szAddr, SIZEOF(szAddr), _T("%s (%s)"), TranslateT("Address and contact"), TranslateT("company"));
SetDlgItemText(hDlg, IDC_PAGETITLE, szAddr);
SendDlgItemMessage(hDlg, BTN_GOTO, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open in browser"), MBBF_TCHAR);
TranslateDialogDefault(hDlg);
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 6e0acf4ff6..a5b04fc55b 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -409,7 +409,7 @@ static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE if (bNotify && !bOverflow) {
// first anniversary found
if (numAnniversaries == 1) {
- mir_sntprintf(szAnniv, MAX_PATH,
+ mir_sntprintf(szAnniv, SIZEOF(szAnniv),
TranslateT("%s has the following anniversaries:\0"),
ContactGender(hContact));
mir_tstrncpy(strMsg, szAnniv, mir_tstrlen(szAnniv));
@@ -417,13 +417,13 @@ static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE switch (Diff) {
case 0:
- mir_sntprintf(szAnniv, MAX_PATH, TranslateT("%d. %s today\0"), mta.Age(), mta.Description());
+ mir_sntprintf(szAnniv, SIZEOF(szAnniv), TranslateT("%d. %s today\0"), mta.Age(), mta.Description());
break;
case 1:
- mir_sntprintf(szAnniv, MAX_PATH, TranslateT("%d. %s tomorrow\0"), mta.Age() + 1, mta.Description());
+ mir_sntprintf(szAnniv, SIZEOF(szAnniv), TranslateT("%d. %s tomorrow\0"), mta.Age() + 1, mta.Description());
break;
default:
- mir_sntprintf(szAnniv, MAX_PATH, TranslateT("%d. %s in %d days\0"), mta.Age() + 1, mta.Description(), Diff);
+ mir_sntprintf(szAnniv, SIZEOF(szAnniv), TranslateT("%d. %s in %d days\0"), mta.Age() + 1, mta.Description(), Diff);
}
if (mir_tstrlen(szAnniv) >= MAX_SECONDLINE - mir_tstrlen(strMsg)) {
|