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/TipperYM | |
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/TipperYM')
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 10 | ||||
-rw-r--r-- | plugins/TipperYM/src/skin_parser.cpp | 4 | ||||
-rw-r--r-- | plugins/TipperYM/src/translations.cpp | 38 |
3 files changed, 26 insertions, 26 deletions
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 8907f068b1..55c00e03bc 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -79,7 +79,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa a2t(pwd->clcit.szProto, pwd->swzTitle, TITLE_TEXT_LEN); if (Proto_IsAccountLocked(pa)) - mir_sntprintf(pwd->swzTitle, _countof(pwd->swzTitle), TranslateT("%s (locked)"), pwd->swzTitle); + mir_sntprintf(pwd->swzTitle, TranslateT("%s (locked)"), pwd->swzTitle); // protocol status WORD wStatus = (WORD)CallProtoService(pwd->clcit.szProto, PS_GETSTATUS, 0, 0); @@ -107,7 +107,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR swzLogon[64]; if (TimestampToTimeDifference(NULL, pwd->clcit.szProto, "LogonTS", swzLogon, 59)) { TCHAR ago[96]; - mir_sntprintf(ago, _countof(ago), TranslateT("%s ago"), swzLogon); + mir_sntprintf(ago, TranslateT("%s ago"), swzLogon); AddRow(pwd, TranslateT("Log on:"), ago, NULL, false, false, false); } @@ -1492,7 +1492,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa mir_tstrcpy(swzProto, pa->tszAccountName); if (dwItems & TRAYTIP_LOCKSTATUS) if (Proto_IsAccountLocked(pa)) - mir_sntprintf(swzProto, _countof(swzProto), TranslateT("%s (locked)"), pa->tszAccountName); + mir_sntprintf(swzProto, TranslateT("%s (locked)"), pa->tszAccountName); AddRow(pwd, swzProto, buff, NULL, false, false, !bFirstItem, true, Skin_LoadProtoIcon(pa->szModuleName, wStatus)); bFirstItem = false; @@ -1500,7 +1500,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (dwItems & TRAYTIP_LOGON) { if (TimestampToTimeDifference(NULL, pa->szModuleName, "LogonTS", buff, 59)) { TCHAR ago[96]; - mir_sntprintf(ago, _countof(ago), TranslateT("%s ago"), buff); + mir_sntprintf(ago, TranslateT("%s ago"), buff); AddRow(pwd, TranslateT("Log on:"), ago, NULL, false, false, false); } } @@ -1621,7 +1621,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR *swzNick = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0); if (opt.iFavoriteContFlags & FAVCONT_APPEND_PROTO) { TCHAR *swzProto = a2t(proto); - mir_sntprintf(swzName, _countof(swzName), _T("%s (%s)"), swzNick, swzProto); + mir_sntprintf(swzName, _T("%s (%s)"), swzNick, swzProto); mir_free(swzProto); } else mir_tstrcpy(swzName, swzNick); diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp index 7921a184fd..5b0624a520 100644 --- a/plugins/TipperYM/src/skin_parser.cpp +++ b/plugins/TipperYM/src/skin_parser.cpp @@ -88,7 +88,7 @@ void ParseAboutPart(FILE *fp, TCHAR *buff, TCHAR *szSkinName) else if (_tcsstr(buff, _T("preview")))
{
TCHAR szImgPath[1024];
- mir_sntprintf(szImgPath, _countof(szImgPath), _T("%s\\%s\\%s"), SKIN_FOLDER, szSkinName, pch);
+ mir_sntprintf(szImgPath, _T("%s\\%s\\%s"), SKIN_FOLDER, szSkinName, pch);
if (FileExists(szImgPath))
mir_tstrcpy(opt.szPreviewFile, szImgPath);
}
@@ -126,7 +126,7 @@ void ParseImagePart(FILE *fp, TCHAR *buff, int iPart) if (_tcsstr(buff, _T("image")))
{
TCHAR szImgPath[1024];
- mir_sntprintf(szImgPath, _countof(szImgPath), _T("%s\\%s\\%s"), SKIN_FOLDER, opt.szSkinName, pch);
+ mir_sntprintf(szImgPath, _T("%s\\%s\\%s"), SKIN_FOLDER, opt.szSkinName, pch);
opt.szImgFile[iPart] = mir_tstrdup(szImgPath);
}
else if (_tcsstr(buff, _T("tm")))
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index 7fe285ac0f..c20915147e 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -233,21 +233,21 @@ TCHAR *DayMonthYearToDate(MCONTACT hContact, const char *szModuleName, const cha {
DBVARIANT dbv;
char szSettingName[256];
- mir_snprintf(szSettingName, _countof(szSettingName), "%sDay", prefix);
+ mir_snprintf(szSettingName, "%sDay", prefix);
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
int day = 0;
if (GetInt(dbv, &day))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sMonth", prefix);
+ mir_snprintf(szSettingName, "%sMonth", prefix);
int month = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
if (GetInt(dbv, &month))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sYear", prefix);
+ mir_snprintf(szSettingName, "%sYear", prefix);
int year = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
@@ -281,21 +281,21 @@ TCHAR *DayMonthYearToAge(MCONTACT hContact, const char *szModuleName, const char {
DBVARIANT dbv;
char szSettingName[256];
- mir_snprintf(szSettingName, _countof(szSettingName), "%sDay", szPrefix);
+ mir_snprintf(szSettingName, "%sDay", szPrefix);
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
int day = 0;
if (GetInt(dbv, &day))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sMonth", szPrefix);
+ mir_snprintf(szSettingName, "%sMonth", szPrefix);
int month = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
if (GetInt(dbv, &month))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sYear", szPrefix);
+ mir_snprintf(szSettingName, "%sYear", szPrefix);
int year = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
@@ -330,21 +330,21 @@ TCHAR *HoursMinutesSecondsToTime(MCONTACT hContact, const char *szModuleName, co {
DBVARIANT dbv;
char szSettingName[256];
- mir_snprintf(szSettingName, _countof(szSettingName), "%sHours", szPrefix);
+ mir_snprintf(szSettingName, "%sHours", szPrefix);
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
int hours = 0;
if (GetInt(dbv, &hours))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sMinutes", szPrefix);
+ mir_snprintf(szSettingName, "%sMinutes", szPrefix);
int minutes = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
if (GetInt(dbv, &minutes))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sSeconds", szPrefix);
+ mir_snprintf(szSettingName, "%sSeconds", szPrefix);
int seconds = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
@@ -374,14 +374,14 @@ TCHAR *HoursMinutesToTime(MCONTACT hContact, const char *szModuleName, const cha {
DBVARIANT dbv;
char szSettingName[256];
- mir_snprintf(szSettingName, _countof(szSettingName), "%sHours", szPrefix);
+ mir_snprintf(szSettingName, "%sHours", szPrefix);
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
int hours = 0;
if (GetInt(dbv, &hours))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sMinutes", szPrefix);
+ mir_snprintf(szSettingName, "%sMinutes", szPrefix);
int minutes = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
@@ -410,42 +410,42 @@ TCHAR *DmyToTimeDifference(MCONTACT hContact, const char *szModuleName, const ch {
DBVARIANT dbv;
char szSettingName[256];
- mir_snprintf(szSettingName, _countof(szSettingName), "%sDay", szPrefix);
+ mir_snprintf(szSettingName, "%sDay", szPrefix);
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
int day = 0;
if (GetInt(dbv, &day))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sMonth", szPrefix);
+ mir_snprintf(szSettingName, "%sMonth", szPrefix);
int month = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
if (GetInt(dbv, &month))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sYear", szPrefix);
+ mir_snprintf(szSettingName, "%sYear", szPrefix);
int year = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
if (GetInt(dbv, &year))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sHours", szPrefix);
+ mir_snprintf(szSettingName, "%sHours", szPrefix);
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
int hours = 0;
if (GetInt(dbv, &hours))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sMinutes", szPrefix);
+ mir_snprintf(szSettingName, "%sMinutes", szPrefix);
int minutes = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
if (GetInt(dbv, &minutes))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sSeconds", szPrefix);
+ mir_snprintf(szSettingName, "%sSeconds", szPrefix);
int seconds = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
@@ -512,14 +512,14 @@ TCHAR *DayMonthToDaysToNextBirthday(MCONTACT hContact, const char *szModuleName, {
DBVARIANT dbv;
char szSettingName[256];
- mir_snprintf(szSettingName, _countof(szSettingName), "%sDay", szPrefix);
+ mir_snprintf(szSettingName, "%sDay", szPrefix);
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
int day = 0;
if (GetInt(dbv, &day))
{
db_free(&dbv);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sMonth", szPrefix);
+ mir_snprintf(szSettingName, "%sMonth", szPrefix);
int month = 0;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
{
|