diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:12:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:12:13 +0000 |
commit | b7c74cd5b22618d544a3f4ae124985d4837e3a22 (patch) | |
tree | 468d9610a590685322ad2159a9bd2d9e2ba83f89 /plugins/StatusPlugins/StartupStatus | |
parent | 7de513f180c429859e246d1033d745b394e1fc28 (diff) |
new mir_snprintf templates without SIZEOF
git-svn-id: http://svn.miranda-ng.org/main/trunk@14002 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/StartupStatus')
4 files changed, 9 insertions, 9 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp index 06de929df4..64d1a63444 100644 --- a/plugins/StatusPlugins/StartupStatus/options.cpp +++ b/plugins/StatusPlugins/StartupStatus/options.cpp @@ -812,7 +812,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP char setting[128];
int i, oldCount = db_get_w(NULL, MODULENAME, SETTING_PROFILECOUNT, 0);
for (i=0; i < oldCount; i++) {
- mir_snprintf(setting, SIZEOF(setting), "%d_", i);
+ mir_snprintf(setting, "%d_", i);
ClearDatabase(setting);
}
for (i=0; i < arProfiles.getCount(); i++) {
@@ -828,7 +828,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP TSettingsList& ar = *po.ps;
for (int j=0; j < ar.getCount(); j++) {
if ( ar[j].szMsg != NULL ) {
- mir_snprintf(setting, SIZEOF(setting), "%s_%s", ar[j].szName, SETTING_PROFILE_STSMSG);
+ mir_snprintf(setting, "%s_%s", ar[j].szName, SETTING_PROFILE_STSMSG);
db_set_ts(NULL, MODULENAME, OptName(i, setting), ar[j].szMsg);
}
db_set_w(NULL, MODULENAME, OptName(i, ar[j].szName), ar[j].status);
@@ -955,6 +955,6 @@ static int DeleteSetting(const char *szSetting,LPARAM lParam) char* OptName(int i, const char* setting)
{
static char buf[100];
- mir_snprintf(buf, SIZEOF(buf), "%d_%s", i, setting);
+ mir_snprintf(buf, "%d_%s", i, setting);
return buf;
}
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index 3a7421957f..25c0e0bffd 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -161,7 +161,7 @@ INT_PTR GetProfileName(WPARAM wParam, LPARAM lParam) DBVARIANT dbv; char setting[80]; - mir_snprintf(setting, SIZEOF(setting), "%d_%s", profile, SETTING_PROFILENAME); + mir_snprintf(setting, "%d_%s", profile, SETTING_PROFILENAME); if ( db_get_ts(NULL, MODULENAME, setting, &dbv)) return -1; @@ -264,7 +264,7 @@ INT_PTR LoadAndSetProfile(WPARAM wParam, LPARAM lParam) profile = (profile >= 0)?profile:db_get_w(NULL, MODULENAME, SETTING_DEFAULTPROFILE, 0); char setting[64]; - mir_snprintf(setting, SIZEOF(setting), "%d_%s", profile, SETTING_SHOWCONFIRMDIALOG); + mir_snprintf(setting, "%d_%s", profile, SETTING_SHOWCONFIRMDIALOG); if (!db_get_b(NULL, MODULENAME, setting, 0)) CallService(MS_CS_SETSTATUSEX,(WPARAM)&profileSettings, 0); else diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp index aa2bba706e..b126018a9a 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp @@ -47,14 +47,14 @@ TSSSetting::TSSSetting(int profile, PROTOACCOUNT *pa) // load status
char setting[80];
- mir_snprintf(setting, SIZEOF(setting), "%d_%s", profile, pa->szModuleName);
+ mir_snprintf(setting, "%d_%s", profile, pa->szModuleName);
int iStatus = db_get_w(NULL, MODULENAME, setting, 0);
if (iStatus < MIN_STATUS || iStatus > MAX_STATUS)
iStatus = DEFAULT_STATUS;
status = iStatus;
// load last status
- mir_snprintf(setting, SIZEOF(setting), "%s%s", PREFIX_LAST, szName);
+ mir_snprintf(setting, "%s%s", PREFIX_LAST, szName);
iStatus = db_get_w(NULL, MODULENAME, setting, 0);
if (iStatus < MIN_STATUS || iStatus > MAX_STATUS)
iStatus = DEFAULT_STATUS;
diff --git a/plugins/StatusPlugins/StartupStatus/toolbars.cpp b/plugins/StatusPlugins/StartupStatus/toolbars.cpp index 70d702f215..6fc5b99823 100644 --- a/plugins/StatusPlugins/StartupStatus/toolbars.cpp +++ b/plugins/StatusPlugins/StartupStatus/toolbars.cpp @@ -55,12 +55,12 @@ int CreateTopToolbarButtons(WPARAM wParam, LPARAM lParam) ttb.pszService = MS_SS_LOADANDSETPROFILE;
for (int i=0; i < profileCount; i++) {
char setting[80];
- mir_snprintf(setting, SIZEOF(setting), "%d_%s", i, SETTING_CREATETTBBUTTON);
+ mir_snprintf(setting, "%d_%s", i, SETTING_CREATETTBBUTTON);
if (!db_get_b(NULL, MODULENAME, setting, FALSE))
continue;
DBVARIANT dbv;
- mir_snprintf(setting, SIZEOF(setting), "%d_%s", i, SETTING_PROFILENAME);
+ mir_snprintf(setting, "%d_%s", i, SETTING_PROFILENAME);
if (db_get(NULL, MODULENAME, setting, &dbv))
continue;
|