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/StatusPlugins | |
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/StatusPlugins')
-rw-r--r-- | plugins/StatusPlugins/KeepStatus/keepstatus.cpp | 10 | ||||
-rw-r--r-- | plugins/StatusPlugins/KeepStatus/options.cpp | 4 | ||||
-rw-r--r-- | plugins/StatusPlugins/StartupStatus/options.cpp | 2 | ||||
-rw-r--r-- | plugins/StatusPlugins/StartupStatus/profiles.cpp | 8 | ||||
-rw-r--r-- | plugins/StatusPlugins/StartupStatus/startupstatus.cpp | 6 | ||||
-rw-r--r-- | plugins/StatusPlugins/confirmdialog.cpp | 4 |
6 files changed, 17 insertions, 17 deletions
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index 36e379aa59..c72083e891 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -213,7 +213,7 @@ static int AssignStatus(TConnectionSettings* cs, int status, int lastStatus, TCH mir_cslock lck(GenStatusCS); char dbSetting[128]; - mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", cs->szName); + mir_snprintf(dbSetting, "%s_enabled", cs->szName); cs->lastStatus = lastStatus == 0 ? cs->status : lastStatus; if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) cs->status = ID_STATUS_DISABLED; @@ -521,7 +521,7 @@ static int ProcessProtoAck(WPARAM, LPARAM lParam) return 0; char dbSetting[128]; - mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", ack->szModule); + mir_snprintf(dbSetting, "%s_enabled", ack->szModule); if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) return 0; @@ -934,7 +934,7 @@ static int ProcessPopup(int reason, LPARAM lParam) for (int i = 0; i < connectionSettings.getCount(); i++) { if (mir_tstrlen(ps[i]->tszAccName) > 0 && mir_strlen(ps[i]->szName) > 0) { if (db_get_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE)) { - mir_sntprintf(protoInfoLine, _countof(protoInfoLine), TranslateT("%s\t(will be set to %s)\r\n"), ps[i]->tszAccName, pcli->pfnGetStatusModeDescription(ps[i]->status, 0)); + mir_sntprintf(protoInfoLine, TranslateT("%s\t(will be set to %s)\r\n"), ps[i]->tszAccName, pcli->pfnGetStatusModeDescription(ps[i]->status, 0)); mir_tstrncat(protoInfo, protoInfoLine, _countof(protoInfo) - mir_tstrlen(protoInfo) - 1); } } @@ -1052,7 +1052,7 @@ INT_PTR EnableProtocolService(WPARAM wParam, LPARAM lParam) return -1; char dbSetting[128]; - mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", szProto); + mir_snprintf(dbSetting, "%s_enabled", szProto); if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) // 'hard' disabled return -1; @@ -1078,7 +1078,7 @@ INT_PTR IsProtocolEnabledService(WPARAM, LPARAM lParam) char *szProto = (char *)lParam; char dbSetting[128]; - mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", szProto); + mir_snprintf(dbSetting, "%s_enabled", szProto); if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) return FALSE; diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp index 5cafcaadbf..effa88cf8a 100644 --- a/plugins/StatusPlugins/KeepStatus/options.cpp +++ b/plugins/StatusPlugins/KeepStatus/options.cpp @@ -72,7 +72,7 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg, UINT msg, WPARAM wParam ListView_InsertItem(hList, &lvItem);
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", protos[i]->szModuleName);
+ mir_snprintf(dbSetting, "%s_enabled", protos[i]->szModuleName);
ListView_SetCheckState(hList, lvItem.iItem, db_get_b(NULL, MODULENAME, dbSetting, TRUE));
lvItem.iItem++;
}
@@ -153,7 +153,7 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg, UINT msg, WPARAM wParam ListView_GetItem(hList, &lvItem);
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s_enabled", (char *)lvItem.lParam);
+ mir_snprintf(dbSetting, "%s_enabled", (char *)lvItem.lParam);
db_set_b(NULL, MODULENAME, dbSetting, (BYTE)ListView_GetCheckState(hList, lvItem.iItem));
}
}
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp index f5920c333b..eb9573b0ac 100644 --- a/plugins/StatusPlugins/StartupStatus/options.cpp +++ b/plugins/StatusPlugins/StartupStatus/options.cpp @@ -165,7 +165,7 @@ HRESULT CreateLink(TSettingsList& protoSettings) if (SHGetSpecialFolderPath(NULL, savePath, 0x10, FALSE))
_tcsncat_s(savePath, SHORTCUT_FILENAME, _countof(savePath) - mir_tstrlen(savePath));
else
- mir_sntprintf(savePath, _countof(savePath), _T(".\\%s"), SHORTCUT_FILENAME);
+ mir_sntprintf(savePath, _T(".\\%s"), SHORTCUT_FILENAME);
// Get a pointer to the IShellLink interface.
IShellLink *psl;
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index 0742c34198..da6db98855 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -107,7 +107,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM) mi.name.t = profilename; mi.position = 2000100000 + mcount; - mir_snprintf(servicename, _countof(servicename), "%s%d", MS_SS_MENUSETPROFILEPREFIX, mcount); + mir_snprintf(servicename, "%s%d", MS_SS_MENUSETPROFILEPREFIX, mcount); switch(mcount) { case 0: hProfileServices[mcount] = CreateServiceFunction(servicename, profileService0); @@ -190,7 +190,7 @@ TCHAR *GetStatusMessage(int profile, char *szProto) for ( int i=0; i < pceCount; i++ ) { if ( (pce[i].profile == profile) && (!mir_strcmp(pce[i].szProto, szProto))) { - mir_snprintf(dbSetting, _countof(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); + mir_snprintf(dbSetting, "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); if (!db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db pce[i].msg = ( TCHAR* )realloc(pce[i].msg, sizeof(TCHAR)*(mir_tstrlen(dbv.ptszVal)+1)); if (pce[i].msg != NULL) { @@ -214,7 +214,7 @@ TCHAR *GetStatusMessage(int profile, char *szProto) pce[pceCount].profile = profile; pce[pceCount].szProto = _strdup(szProto); pce[pceCount].msg = NULL; - mir_snprintf(dbSetting, _countof(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); + mir_snprintf(dbSetting, "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); if (!db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) { pce[pceCount].msg = _tcsdup(dbv.ptszVal); db_free(&dbv); @@ -339,7 +339,7 @@ static int RegisterHotKeys() return -1; char atomname[255]; - mir_snprintf(atomname, _countof(atomname), "StatusProfile_%d", i); + mir_snprintf(atomname, "StatusProfile_%d", i); hkInfo[hkiCount].id = GlobalAddAtomA(atomname); if (hkInfo[hkiCount].id == 0) continue; diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp index 7f0afc3e37..9da5d6ccf5 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp @@ -168,7 +168,7 @@ static void SetLastStatusMessages(TSettingsList &ps) continue;
char dbSetting[128];
- mir_snprintf(dbSetting, _countof(dbSetting), "%s%s", PREFIX_LASTMSG, ps[i].szName);
+ mir_snprintf(dbSetting, "%s%s", PREFIX_LASTMSG, ps[i].szName);
DBVARIANT dbv;
if (ps[i].szMsg == NULL && !db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) {
@@ -301,9 +301,9 @@ static int OnOkToExit(WPARAM, LPARAM) continue;
char lastName[128], lastMsg[128];
- mir_snprintf(lastName, _countof(lastName), "%s%s", PREFIX_LAST, pa->szModuleName);
+ mir_snprintf(lastName, "%s%s", PREFIX_LAST, pa->szModuleName);
db_set_w(NULL, MODULENAME, lastName, (WORD)CallProtoService(pa->szModuleName, PS_GETSTATUS, 0, 0));
- mir_snprintf(lastMsg, _countof(lastMsg), "%s%s", PREFIX_LASTMSG, pa->szModuleName);
+ mir_snprintf(lastMsg, "%s%s", PREFIX_LASTMSG, pa->szModuleName);
db_unset(NULL, MODULENAME, lastMsg);
if (!(CallProtoService(pa->szModuleName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG))
diff --git a/plugins/StatusPlugins/confirmdialog.cpp b/plugins/StatusPlugins/confirmdialog.cpp index 5b5ecca46d..e652dc004e 100644 --- a/plugins/StatusPlugins/confirmdialog.cpp +++ b/plugins/StatusPlugins/confirmdialog.cpp @@ -269,7 +269,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP // LAST STATUS
if (proto->status == ID_STATUS_LAST) {
TCHAR last[80];
- mir_sntprintf(last, _countof(last), _T("%s (%s)"), TranslateT("<last>"), pcli->pfnGetStatusModeDescription(proto->lastStatus, 0));
+ mir_sntprintf(last, _T("%s (%s)"), TranslateT("<last>"), pcli->pfnGetStatusModeDescription(proto->lastStatus, 0));
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_STARTUPLIST), lvItem.iItem, 1, last);
actualStatus = proto->lastStatus;
}
@@ -278,7 +278,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP else if (proto->status == ID_STATUS_CURRENT) {
int currentStatus = CallProtoService(proto->szName, PS_GETSTATUS, 0, 0);
TCHAR current[80];
- mir_sntprintf(current, _countof(current), _T("%s (%s)"), TranslateT("<current>"), pcli->pfnGetStatusModeDescription(currentStatus, 0));
+ mir_sntprintf(current, _T("%s (%s)"), TranslateT("<current>"), pcli->pfnGetStatusModeDescription(currentStatus, 0));
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_STARTUPLIST), lvItem.iItem, 1, current);
actualStatus = currentStatus;
}
|