From c370af60855db957c5b200914bf0bde743845528 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 28 Aug 2015 16:22:41 +0000 Subject: 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 --- src/core/stduserinfo/src/contactinfo.cpp | 10 +++++----- src/core/stduserinfo/src/stdinfo.cpp | 4 ++-- src/core/stduserinfo/src/userinfo.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/core/stduserinfo') diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp index 8a679012cd..c142be091b 100644 --- a/src/core/stduserinfo/src/contactinfo.cpp +++ b/src/core/stduserinfo/src/contactinfo.cpp @@ -115,7 +115,7 @@ static INT_PTR CALLBACK EditUserPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar char szPhone[96], szArea[32], szNumber[64]; GetDlgItemTextA(hwndDlg, IDC_AREA, szArea, _countof(szArea)); GetDlgItemTextA(hwndDlg, IDC_NUMBER, szNumber, _countof(szNumber)); - mir_snprintf(szPhone, _countof(szPhone), "+%u (%s) %s", SendDlgItemMessage(hwndDlg, IDC_COUNTRY, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_COUNTRY, CB_GETCURSEL, 0, 0), 0), szArea, szNumber); + mir_snprintf(szPhone, "+%u (%s) %s", SendDlgItemMessage(hwndDlg, IDC_COUNTRY, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_COUNTRY, CB_GETCURSEL, 0, 0), 0), szArea, szNumber); noRecursion = 1; SetDlgItemTextA(hwndDlg, IDC_PHONE, szPhone); noRecursion = 0; @@ -284,7 +284,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break; lvi.pszText = idstr2; - mir_sntprintf(idstr2, _countof(idstr2), _T("%d"), i + 2); + mir_sntprintf(idstr2, _T("%d"), i + 2); } ListView_InsertItem(GetDlgItem(hwndDlg, IDC_EMAILS), &lvi); ListView_SetItemText(GetDlgItem(hwndDlg, IDC_EMAILS), lvi.iItem, 1, dbv.ptszVal); @@ -298,7 +298,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (db_get_ts(hContact, "UserInfo", idstr, &dbv)) break; lvi.pszText = idstr2; - mir_sntprintf(idstr2, _countof(idstr2), TranslateT("Custom %d"), i + 1); + mir_sntprintf(idstr2, TranslateT("Custom %d"), i + 1); ListView_InsertItem(GetDlgItem(hwndDlg, IDC_EMAILS), &lvi); ListView_SetItemText(GetDlgItem(hwndDlg, IDC_EMAILS), lvi.iItem, 1, dbv.ptszVal); db_free(&dbv); @@ -359,7 +359,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (db_get_ts(hContact, "UserInfo", idstr, &dbv)) break; lvi.pszText = idstr2; - mir_sntprintf(idstr2, _countof(idstr2), TranslateT("Custom %d"), i + 1); + mir_sntprintf(idstr2, TranslateT("Custom %d"), i + 1); ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi); if (mir_tstrlen(dbv.ptszVal) > 4 && !mir_tstrcmp(dbv.ptszVal + mir_tstrlen(dbv.ptszVal) - 4, _T(" SMS"))) { ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 2, _T("y")); @@ -439,7 +439,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP TCHAR szEmail[256]; if (IsOverEmail(hwndDlg, szEmail, _countof(szEmail))) { TCHAR szExec[264]; - mir_sntprintf(szExec, _countof(szExec), _T("mailto:%s"), szEmail); + mir_sntprintf(szExec, _T("mailto:%s"), szEmail); ShellExecute(hwndDlg, _T("open"), szExec, NULL, NULL, SW_SHOW); break; } diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp index 1dec08f526..4ebc2726cf 100644 --- a/src/core/stduserinfo/src/stdinfo.cpp +++ b/src/core/stduserinfo/src/stdinfo.cpp @@ -107,7 +107,7 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule WORD wSave = dbv.wVal; if (wSave == (WORD)-1) { char szSettingName[100]; - mir_snprintf(szSettingName, _countof(szSettingName), "%sName", szSetting); + mir_snprintf(szSettingName, "%sName", szSetting); if (!db_get_ts(hContact, szModule, szSettingName, &dbv)) { ptstr = dbv.ptszVal; unspecified = false; @@ -215,7 +215,7 @@ static INT_PTR CALLBACK SummaryDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EMAIL))) { TCHAR szExec[264], szEmail[256]; GetDlgItemText(hwndDlg, IDC_EMAIL, szEmail, _countof(szEmail)); - mir_sntprintf(szExec, _countof(szExec), _T("mailto:%s"), szEmail); + mir_sntprintf(szExec, _T("mailto:%s"), szEmail); ShellExecute(hwndDlg, _T("open"), szExec, NULL, NULL, SW_SHOW); } break; diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 4ca8f3332d..f6629445bd 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -255,7 +255,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP name = pcli->pfnGetContactDisplayName(dat->hContact, 0); GetWindowText(hwndDlg, oldTitle, _countof(oldTitle)); - mir_sntprintf(newTitle, _countof(newTitle), oldTitle, name); + mir_sntprintf(newTitle, oldTitle, name); SetWindowText(hwndDlg, newTitle); ////////////////////////////////////////////////////////////////////// @@ -355,7 +355,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_TIMER: TCHAR str[128]; - mir_sntprintf(str, _countof(str), _T("%.*s%s%.*s"), dat->updateAnimFrame % 10, _T("........."), dat->szUpdating, dat->updateAnimFrame % 10, _T(".........")); + mir_sntprintf(str, _T("%.*s%s%.*s"), dat->updateAnimFrame % 10, _T("........."), dat->szUpdating, dat->updateAnimFrame % 10, _T(".........")); SetDlgItemText(hwndDlg, IDC_UPDATING, str); if (++dat->updateAnimFrame == UPDATEANIMFRAMES) dat->updateAnimFrame = 0; -- cgit v1.2.3