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 /src/modules/skin | |
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 'src/modules/skin')
-rw-r--r-- | src/modules/skin/hotkey_opts.cpp | 8 | ||||
-rw-r--r-- | src/modules/skin/hotkeys.cpp | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/skin/hotkey_opts.cpp b/src/modules/skin/hotkey_opts.cpp index 4c04405e09..4e86d5021b 100644 --- a/src/modules/skin/hotkey_opts.cpp +++ b/src/modules/skin/hotkey_opts.cpp @@ -307,7 +307,7 @@ static int CALLBACK sttOptionsSortList(LPARAM lParam1, LPARAM lParam2, LPARAM lP static void sttOptionsAddHotkey(HWND hwndList, THotkeyItem *item) { char buf[256]; - mir_snprintf(buf, SIZEOF(buf), "mir_hotkey_%d_%d", g_pid, g_hkid++); + mir_snprintf(buf, "mir_hotkey_%d_%d", g_pid, g_hkid++); THotkeyItem *newItem = (THotkeyItem *)mir_alloc(sizeof(THotkeyItem)); newItem->pszName = NULL; @@ -369,7 +369,7 @@ static void sttOptionsSaveItem(THotkeyItem *item) subItem->Hotkey = subItem->OptHotkey; subItem->type = subItem->OptType; - mir_snprintf(buf, SIZEOF(buf), "%s$%d", item->pszName, item->nSubHotkeys); + mir_snprintf(buf, "%s$%d", item->pszName, item->nSubHotkeys); db_set_w(NULL, DBMODULENAME, buf, subItem->Hotkey); if (subItem->type != HKT_MANUAL) db_set_b(NULL, DBMODULENAME "Types", buf, (BYTE)subItem->type); @@ -377,7 +377,7 @@ static void sttOptionsSaveItem(THotkeyItem *item) ++item->nSubHotkeys; } } - mir_snprintf(buf, SIZEOF(buf), "%s$count", item->pszName); + mir_snprintf(buf, "%s$count", item->pszName); db_set_dw(NULL, DBMODULENAME, buf, item->nSubHotkeys); } @@ -664,7 +664,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_CONTEXTMENU: if (GetWindowLongPtr((HWND)wParam, GWL_ID) == IDC_LV_HOTKEYS) { HWND hwndList = (HWND)wParam; - POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
+ POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; LVITEM lvi = {0}; THotkeyItem *item = NULL; diff --git a/src/modules/skin/hotkeys.cpp b/src/modules/skin/hotkeys.cpp index 13dfc09ad0..d660ef294a 100644 --- a/src/modules/skin/hotkeys.cpp +++ b/src/modules/skin/hotkeys.cpp @@ -178,7 +178,7 @@ static INT_PTR svcHotkeyRegister(WPARAM wParam, LPARAM lParam) item->lParam = desc->lParam;
char buf[256];
- mir_snprintf(buf, SIZEOF(buf), "mir_hotkey_%d_%d", g_pid, g_hkid++);
+ mir_snprintf(buf, "mir_hotkey_%d_%d", g_pid, g_hkid++);
item->idHotkey = GlobalAddAtomA(buf);
if (item->type == HKT_GLOBAL) {
if (item->Enabled) {
@@ -192,10 +192,10 @@ static INT_PTR svcHotkeyRegister(WPARAM wParam, LPARAM lParam) if (!item->rootHotkey) {
/* try to load alternatives from db */
int count, i;
- mir_snprintf(buf, SIZEOF(buf), "%s$count", item->pszName);
+ mir_snprintf(buf, "%s$count", item->pszName);
count = (int)db_get_dw(NULL, DBMODULENAME, buf, -1);
for (i=0; i < count; i++) {
- mir_snprintf(buf, SIZEOF(buf), "%s$%d", item->pszName, i);
+ mir_snprintf(buf, "%s$%d", item->pszName, i);
if (!db_get_w(NULL, DBMODULENAME, buf, 0))
continue;
@@ -371,7 +371,7 @@ int LoadSkinHotkeys(void) for (int i=0; i < SIZEOF(oldSettings); i++) {
char szSetting[ 100 ];
- mir_snprintf(szSetting, SIZEOF(szSetting), "HK%s", oldSettings[i]);
+ mir_snprintf(szSetting, "HK%s", oldSettings[i]);
WORD key;
if ((key = db_get_w(NULL, "Clist", szSetting, 0))) {
@@ -379,7 +379,7 @@ int LoadSkinHotkeys(void) db_set_w(NULL, DBMODULENAME, newSettings[i], key);
}
- mir_snprintf(szSetting, SIZEOF(szSetting), "HKEn%s", oldSettings[i]);
+ mir_snprintf(szSetting, "HKEn%s", oldSettings[i]);
if ((key = db_get_b(NULL, "Clist", szSetting, 0))) {
db_unset(NULL, "Clist", szSetting);
db_set_b(NULL, DBMODULENAME "Off", newSettings[i], (BYTE)(key == 0));
|