summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin/src/options.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
commit4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch)
tree9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /plugins/SeenPlugin/src/options.cpp
parentf0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff)
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SeenPlugin/src/options.cpp')
-rw-r--r--plugins/SeenPlugin/src/options.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp
index e51c8dad93..8bb34912f8 100644
--- a/plugins/SeenPlugin/src/options.cpp
+++ b/plugins/SeenPlugin/src/options.cpp
@@ -92,10 +92,10 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
SendDlgItemMessage(hdlg, idText, CPM_SETCOLOUR, 0, ppd.colorText);
ppd.lchIcon = Skin_LoadProtoIcon(NULL, idBack);
- GetDlgItemText(hdlg, IDC_POPUPSTAMP, szstamp, SIZEOF(szstamp));
+ GetDlgItemText(hdlg, IDC_POPUPSTAMP, szstamp, _countof(szstamp));
_tcsncpy(ppd.lptzContactName, ParseString(szstamp, NULL, 0), MAX_CONTACTNAME);
- GetDlgItemText(hdlg, IDC_POPUPSTAMPTEXT, szstamp, SIZEOF(szstamp));
+ GetDlgItemText(hdlg, IDC_POPUPSTAMPTEXT, szstamp, _countof(szstamp));
_tcsncpy(ppd.lptzText, ParseString(szstamp, NULL, 0), MAX_SECONDLINE);
PUAddPopupT(&ppd);
@@ -131,10 +131,10 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
case 0:
switch (((LPNMHDR)lparam)->code) {
case PSN_APPLY:
- GetDlgItemText(hdlg, IDC_POPUPSTAMP, szstamp, SIZEOF(szstamp));
+ GetDlgItemText(hdlg, IDC_POPUPSTAMP, szstamp, _countof(szstamp));
db_set_ts(NULL, S_MOD, "PopupStamp", szstamp);
- GetDlgItemText(hdlg, IDC_POPUPSTAMPTEXT, szstamp, SIZEOF(szstamp));
+ GetDlgItemText(hdlg, IDC_POPUPSTAMPTEXT, szstamp, _countof(szstamp));
db_set_ts(NULL, S_MOD, "PopupStampText", szstamp);
bchecked = (BYTE)IsDlgButtonChecked(hdlg, IDC_POPUPS);
@@ -278,7 +278,7 @@ INT_PTR CALLBACK OptsSettingsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM
if (LOWORD(wparam) == IDC_VARIABLES) {
char szout[2048];
- mir_snprintf(szout, SIZEOF(szout), VARIABLE_LIST);
+ mir_snprintf(szout, _countof(szout), VARIABLE_LIST);
MessageBoxA(hdlg, szout, Translate("Last Seen Variables"), MB_OK | MB_TOPMOST);
}
break; //case WM_COMMAND
@@ -288,19 +288,19 @@ INT_PTR CALLBACK OptsSettingsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM
case 0:
switch (((LPNMHDR)lparam)->code) {
case PSN_APPLY:
- GetDlgItemText(hdlg, IDC_MENUSTAMP, szstamp, SIZEOF(szstamp));
+ GetDlgItemText(hdlg, IDC_MENUSTAMP, szstamp, _countof(szstamp));
db_set_ts(NULL, S_MOD, "MenuStamp", szstamp);
- GetDlgItemText(hdlg, IDC_USERSTAMP, szstamp, SIZEOF(szstamp));
+ GetDlgItemText(hdlg, IDC_USERSTAMP, szstamp, _countof(szstamp));
db_set_ts(NULL, S_MOD, "UserStamp", szstamp);
- GetDlgItemText(hdlg, IDC_FILESTAMP, szstamp, SIZEOF(szstamp));
+ GetDlgItemText(hdlg, IDC_FILESTAMP, szstamp, _countof(szstamp));
db_set_ts(NULL, S_MOD, "FileStamp", szstamp);
- GetDlgItemText(hdlg, IDC_FILENAME, szstamp, SIZEOF(szstamp));
+ GetDlgItemText(hdlg, IDC_FILENAME, szstamp, _countof(szstamp));
db_set_ts(NULL, S_MOD, "FileName", szstamp);
- GetDlgItemText(hdlg, IDC_HISTORYSTAMP, szstamp, SIZEOF(szstamp));
+ GetDlgItemText(hdlg, IDC_HISTORYSTAMP, szstamp, _countof(szstamp));
db_set_ts(NULL, S_MOD, "HistoryStamp", szstamp);
db_set_w(NULL, S_MOD, "HistoryMax", (WORD)(GetDlgItemInt(hdlg, IDC_HISTORYSIZE, NULL, FALSE) + 1));