summaryrefslogtreecommitdiff
path: root/plugins/Popup
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 04:50:22 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 04:50:22 +0000
commit41a7300678e4bb3cd703e2c236e57af4a31962c7 (patch)
tree36318f807498cf15b405eda5c451fd37bfe1b675 /plugins/Popup
parent97e0ada5c34d6e7eba1cf47a8d8ac029197be6de (diff)
mir_snprintf(..., sizeof() -> SIZEOF(), ...)
small fixs cleanups git-svn-id: http://svn.miranda-ng.org/main/trunk@11188 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup')
-rw-r--r--plugins/Popup/src/font.cpp10
-rw-r--r--plugins/Popup/src/font.h2
-rw-r--r--plugins/Popup/src/notifications.cpp38
-rw-r--r--plugins/Popup/src/opt_class.cpp22
-rw-r--r--plugins/Popup/src/opt_gen.cpp2
-rw-r--r--plugins/Popup/src/opt_skins.cpp2
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp4
-rw-r--r--plugins/Popup/src/services.cpp6
-rw-r--r--plugins/Popup/src/skin.cpp4
9 files changed, 45 insertions, 45 deletions
diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp
index d481fc63c9..4e821502c4 100644
--- a/plugins/Popup/src/font.cpp
+++ b/plugins/Popup/src/font.cpp
@@ -39,32 +39,32 @@ void InitFonts() {
mir_tstrncpy(fid.deffontsettings.szFace, _T("Tahoma"), SIZEOF(fid.deffontsettings.szFace));
mir_tstrncpy(fid.name, _T(PU_FNT_NAME_TITLE), SIZEOF(fid.name));
- mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_TITLE);
+ mir_snprintf(fid.prefix, SIZEOF(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_TITLE);
fid.deffontsettings.style = DBFONTF_BOLD;
fid.deffontsettings.colour = RGB(0, 0, 0);
FontRegisterT(&fid);
mir_tstrncpy(fid.name, _T(PU_FNT_NAME_CLOCK), SIZEOF(fid.name));
- mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_CLOCK);
+ mir_snprintf(fid.prefix, SIZEOF(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_CLOCK);
//fid.deffontsettings.style = DBFONTF_BOLD;
//fid.deffontsettings.colour = RGB(0, 0, 0);
FontRegisterT(&fid);
mir_tstrncpy(fid.name, _T(PU_FNT_NAME_TEXT), SIZEOF(fid.name));
- mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_TEXT);
+ mir_snprintf(fid.prefix, SIZEOF(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_TEXT);
fid.deffontsettings.style = 0;
//fid.deffontsettings.colour = RGB(0, 0, 0);
FontRegisterT(&fid);
mir_tstrncpy(fid.name, _T(PU_FNT_NAME_ACTION), SIZEOF(fid.name));
- mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_ACTION);
+ mir_snprintf(fid.prefix, SIZEOF(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_ACTION);
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
//fid.deffontsettings.style = 0;
fid.deffontsettings.colour = RGB(0, 0, 255);
FontRegisterT(&fid);
mir_tstrncpy(fid.name, _T(PU_FNT_NAME_HOVERED_ACTION), SIZEOF(fid.name));
- mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_HOVERED_ACTION);
+ mir_snprintf(fid.prefix, SIZEOF(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_HOVERED_ACTION);
fid.deffontsettings.style = DBFONTF_UNDERLINE;
//fid.deffontsettings.colour = RGB(0, 0, 255);
FontRegisterT(&fid);
diff --git a/plugins/Popup/src/font.h b/plugins/Popup/src/font.h
index eeab5d9f65..8f897600af 100644
--- a/plugins/Popup/src/font.h
+++ b/plugins/Popup/src/font.h
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define PU_FNT_AND_COLOR LPGEN("Popups") //common main group for customice\font&color
#define PU_FNT_AND_COLOR_DB MODULNAME //use eg strcpy(fid.dbSettingsGroup, PU_FNT_GROUP_DB);
-#define PU_FNT_PREFIX "fnt%s" //use eg mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_....);
+#define PU_FNT_PREFIX "fnt%s" //use eg mir_snprintf(fid.prefix, SIZEOF(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_....);
#define PU_FNT_NAME_TITLE LPGEN("Title") //use eg mir_tstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDT
#define PU_FNT_NAME_CLOCK LPGEN("Clock")
#define PU_FNT_NAME_TEXT LPGEN("Text")
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp
index 7223a22100..0008852e25 100644
--- a/plugins/Popup/src/notifications.cpp
+++ b/plugins/Popup/src/notifications.cpp
@@ -94,32 +94,32 @@ void SaveNotificationSettings(POPUPTREEDATA *ptd, char* szModul)
if (ptd->typ == 1) {
char setting[2*MAXMODULELABELLENGTH];
- mir_snprintf(setting, sizeof(setting), "{%s/%s}Timeout",
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}Timeout",
ptd->notification.lpzGroup,
ptd->notification.lpzName);
db_set_w(NULL, szModul, setting, ptd->notification.iSeconds);
- mir_snprintf(setting, sizeof(setting), "{%s/%s}enabled",
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}enabled",
ptd->notification.lpzGroup,
ptd->notification.lpzName);
db_set_b(NULL, szModul, setting, ptd->enabled);
- mir_snprintf(setting, sizeof(setting), "{%s/%s}TimeoutVal",
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}TimeoutVal",
ptd->notification.lpzGroup,
ptd->notification.lpzName);
db_set_w(NULL, szModul, setting, ptd->timeoutValue);
- mir_snprintf(setting, sizeof(setting), "{%s/%s}disableWhen",
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}disableWhen",
ptd->notification.lpzGroup,
ptd->notification.lpzName);
db_set_b(NULL, szModul, setting, ptd->disableWhen);
- mir_snprintf(setting, sizeof(setting), "{%s/%s}leftAction",
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}leftAction",
ptd->notification.lpzGroup,
ptd->notification.lpzName);
db_set_s(NULL, szModul, setting, ptd->leftAction);
- mir_snprintf(setting, sizeof(setting), "{%s/%s}rightAction",
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}rightAction",
ptd->notification.lpzGroup,
ptd->notification.lpzName);
db_set_s(NULL, szModul, setting, ptd->rightAction);
@@ -141,29 +141,29 @@ void LoadNotificationSettings(POPUPTREEDATA *ptd, char* szModul)
char setting[2*MAXMODULELABELLENGTH];
char *szTmp = NULL;
- mir_snprintf(setting, sizeof(setting), "{%s/%s}enabled", ptd->notification.lpzGroup, ptd->notification.lpzName);
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}enabled", ptd->notification.lpzGroup, ptd->notification.lpzName);
ptd->enabled =
(signed char)db_get_b(NULL, szModul, setting, TRUE);
- mir_snprintf(setting, sizeof(setting), "{%s/%s}Timeout", ptd->notification.lpzGroup, ptd->notification.lpzName);
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}Timeout", ptd->notification.lpzGroup, ptd->notification.lpzName);
ptd->notification.iSeconds =
(signed char)db_get_w(NULL, szModul, setting, ptd->notification.iSeconds);
- mir_snprintf(setting, sizeof(setting), "{%s/%s}TimeoutVal", ptd->notification.lpzGroup, ptd->notification.lpzName);
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}TimeoutVal", ptd->notification.lpzGroup, ptd->notification.lpzName);
ptd->timeoutValue =
(signed char)db_get_w(NULL, szModul, setting,
ptd->notification.iSeconds ? ptd->notification.iSeconds : 0);
- mir_snprintf(setting, sizeof(setting), "{%s/%s}disableWhen", ptd->notification.lpzGroup, ptd->notification.lpzName);
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}disableWhen", ptd->notification.lpzGroup, ptd->notification.lpzName);
ptd->disableWhen =
db_get_b(NULL, szModul, setting, 0);
- mir_snprintf(setting, sizeof(setting), "{%s/%s}leftAction", ptd->notification.lpzGroup, ptd->notification.lpzName);
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}leftAction", ptd->notification.lpzGroup, ptd->notification.lpzName);
szTmp = db_get_s(NULL, szModul, setting, ptd->notification.lpzLAction);
mir_strncpy(ptd->leftAction, szTmp, sizeof(ptd->leftAction));
mir_free(szTmp); szTmp = NULL;
- mir_snprintf(setting, sizeof(setting), "{%s/%s}rightAction", ptd->notification.lpzGroup, ptd->notification.lpzName);
+ mir_snprintf(setting, SIZEOF(setting), "{%s/%s}rightAction", ptd->notification.lpzGroup, ptd->notification.lpzName);
szTmp = db_get_s(NULL, szModul, setting, ptd->notification.lpzRAction);
mir_strncpy(ptd->rightAction, szTmp, sizeof(ptd->rightAction));
mir_free(szTmp); szTmp = NULL;
@@ -187,7 +187,7 @@ HANDLE RegisterNotification(POPUPNOTIFICATION *notification)
FontID fontid = {0};
fontid.cbSize = sizeof(fontid);
- mir_snprintf(fontid.group, sizeof(fontid.group), PU_FNT_AND_COLOR"/%s", notification->lpzGroup);
+ mir_snprintf(fontid.group, SIZEOF(fontid.group), PU_FNT_AND_COLOR"/%s", notification->lpzGroup);
mir_strcpy(fontid.dbSettingsGroup, "PopupNotifications");
fontid.flags = FIDF_DEFAULTVALID;
fontid.deffontsettings.charset = DEFAULT_CHARSET;
@@ -202,7 +202,7 @@ HANDLE RegisterNotification(POPUPNOTIFICATION *notification)
ColourID colourid = {0};
colourid.cbSize = sizeof(colourid);
- mir_snprintf(colourid.group, sizeof(colourid.group), PU_FNT_AND_COLOR"/%s", notification->lpzGroup);
+ mir_snprintf(colourid.group, SIZEOF(colourid.group), PU_FNT_AND_COLOR"/%s", notification->lpzGroup);
mir_strcpy(colourid.dbSettingsGroup, "PopupNotifications");
mir_snprintf(colourid.name, SIZEOF(colourid.name), "%s (colors only)", notification->lpzName);
mir_snprintf(colourid.setting, SIZEOF(colourid.setting), "{%s/%s}backColor", notification->lpzGroup, notification->lpzName);
@@ -210,8 +210,8 @@ HANDLE RegisterNotification(POPUPNOTIFICATION *notification)
ColourRegister(&colourid);
char section[MAXMODULELABELLENGTH], setting[MAXMODULELABELLENGTH];
- mir_snprintf(section, sizeof(section), "Popups/%s", notification->lpzGroup);
- mir_snprintf(setting, sizeof(setting), MODULNAME"_%s_%s", notification->lpzGroup, notification->lpzName);
+ mir_snprintf(section, SIZEOF(section), "Popups/%s", notification->lpzGroup);
+ mir_snprintf(setting, SIZEOF(setting), MODULNAME"_%s_%s", notification->lpzGroup, notification->lpzName);
SKINICONDESC sid = { sizeof(sid) };
sid.pszSection = section;
@@ -254,18 +254,18 @@ void FillNotificationData(POPUPDATA2 *ppd, DWORD *disableWhen)
LOGFONTA lf; //dummy to make FS happy (use LOGFONTA coz we use MS_FONT_GET)
FontID fontid = {0}; //use ansi version of fontID coz POPUPNOTIFICATION use char
fontid.cbSize = sizeof(fontid);
- mir_snprintf(fontid.group, sizeof(fontid.group), PU_FNT_AND_COLOR"/%s", ptd->notification.lpzGroup);
+ mir_snprintf(fontid.group, SIZEOF(fontid.group), PU_FNT_AND_COLOR"/%s", ptd->notification.lpzGroup);
mir_snprintf(fontid.name, SIZEOF(fontid.name), "%s (colors only)", ptd->notification.lpzName);
ppd->colorText = (COLORREF)CallService(MS_FONT_GET, (WPARAM)&fontid, (LPARAM)&lf);
ColourID colourid = {0}; //use ansi version of ColourID coz POPUPNOTIFICATION use char
colourid.cbSize = sizeof(colourid);
- mir_snprintf(colourid.group, sizeof(colourid.group), PU_FNT_AND_COLOR"/%s", ptd->notification.lpzGroup);
+ mir_snprintf(colourid.group, SIZEOF(colourid.group), PU_FNT_AND_COLOR"/%s", ptd->notification.lpzGroup);
mir_snprintf(colourid.name, SIZEOF(colourid.name), "%s (colors only)", ptd->notification.lpzName);
ppd->colorBack = (COLORREF)CallService(MS_COLOUR_GET, (WPARAM)&colourid, 0);
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, sizeof(setting), MODULNAME"_%s_%s", ptd->notification.lpzGroup, ptd->notification.lpzName);
+ mir_snprintf(setting, SIZEOF(setting), MODULNAME"_%s_%s", ptd->notification.lpzGroup, ptd->notification.lpzName);
ppd->lchIcon = Skin_GetIcon(setting);
}
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp
index 4fd1d07894..3410671606 100644
--- a/plugins/Popup/src/opt_class.cpp
+++ b/plugins/Popup/src/opt_class.cpp
@@ -189,7 +189,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
for (i=0; i < gTreeData.getCount(); ++i) {
switch (gTreeData[i]->typ) {
case 1: //Treeview part for typ 1 (notification)
- mir_snprintf(iconName, sizeof(iconName), "%s_%S_%S", MODULNAME, gTreeData[i]->pszTreeRoot, gTreeData[i]->pszDescription);
+ mir_snprintf(iconName, SIZEOF(iconName), "%s_%S_%S", MODULNAME, gTreeData[i]->pszTreeRoot, gTreeData[i]->pszDescription);
iconIndex = ImageList_ReplaceIcon(hImgLst, -1, IcoLib_GetIcon(iconName));
mir_sntprintf(itemName, SIZEOF(itemName), _T("%s/%s"), gTreeData[i]->pszTreeRoot, gTreeData[i]->pszDescription);
break;
@@ -493,25 +493,25 @@ void LoadClassSettings(POPUPTREEDATA *ptd, char* szModul)
char setting[2*MAXMODULELABELLENGTH];
char *szTmp = NULL;
- mir_snprintf(setting, sizeof(setting), "%s/enabled", ptd->pupClass.pszName);
+ mir_snprintf(setting, SIZEOF(setting), "%s/enabled", ptd->pupClass.pszName);
ptd->enabled =
(signed char)db_get_b(NULL, szModul, setting, TRUE);
- mir_snprintf(setting, sizeof(setting), "%s/Timeout", ptd->pupClass.pszName);
+ mir_snprintf(setting, SIZEOF(setting), "%s/Timeout", ptd->pupClass.pszName);
ptd->pupClass.iSeconds =
(signed char)db_get_w(NULL, szModul, setting, 0);
- mir_snprintf(setting, sizeof(setting), "%s/TimeoutVal", ptd->pupClass.pszName);
+ mir_snprintf(setting, SIZEOF(setting), "%s/TimeoutVal", ptd->pupClass.pszName);
ptd->timeoutValue =
(signed char)db_get_w(NULL, szModul, setting,
ptd->pupClass.iSeconds ? ptd->pupClass.iSeconds : PopupOptions.Seconds);
- mir_snprintf(setting, sizeof(setting), "%s/leftAction", ptd->pupClass.pszName);
+ mir_snprintf(setting, SIZEOF(setting), "%s/leftAction", ptd->pupClass.pszName);
szTmp = db_get_s(NULL, szModul, setting, POPUP_ACTION_NOTHING); //standart ??
mir_strncpy(ptd->leftAction, szTmp, sizeof(ptd->leftAction));
mir_free(szTmp); szTmp = NULL;
- mir_snprintf(setting, sizeof(setting), "%s/rightAction", ptd->pupClass.pszName);
+ mir_snprintf(setting, SIZEOF(setting), "%s/rightAction", ptd->pupClass.pszName);
szTmp = db_get_s(NULL, szModul, setting, POPUP_ACTION_DISMISS); //standart ??
mir_strncpy(ptd->rightAction, szTmp, sizeof(ptd->rightAction));
mir_free(szTmp); szTmp = NULL;
@@ -521,18 +521,18 @@ void SaveClassSettings(POPUPTREEDATA *ptd, char* szModul)
{
char setting[2*MAXMODULELABELLENGTH];
- mir_snprintf(setting, sizeof(setting), "%s/enabled", ptd->pupClass.pszName);
+ mir_snprintf(setting, SIZEOF(setting), "%s/enabled", ptd->pupClass.pszName);
db_set_b(NULL, szModul, setting, ptd->enabled);
- mir_snprintf(setting, sizeof(setting), "%s/Timeout", ptd->pupClass.pszName);
+ mir_snprintf(setting, SIZEOF(setting), "%s/Timeout", ptd->pupClass.pszName);
db_set_w(NULL, szModul, setting, ptd->pupClass.iSeconds);
- mir_snprintf(setting, sizeof(setting), "%s/TimeoutVal",ptd->pupClass.pszName);
+ mir_snprintf(setting, SIZEOF(setting), "%s/TimeoutVal",ptd->pupClass.pszName);
db_set_w(NULL, szModul, setting, ptd->timeoutValue);
- mir_snprintf(setting, sizeof(setting), "%s/leftAction",ptd->pupClass.pszName);
+ mir_snprintf(setting, SIZEOF(setting), "%s/leftAction",ptd->pupClass.pszName);
db_set_s(NULL, szModul, setting, ptd->leftAction);
- mir_snprintf(setting, sizeof(setting), "%s/rightAction",ptd->pupClass.pszName);
+ mir_snprintf(setting, SIZEOF(setting), "%s/rightAction",ptd->pupClass.pszName);
db_set_s(NULL, szModul, setting, ptd->rightAction);
}
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp
index c104eb2c3a..5b39304862 100644
--- a/plugins/Popup/src/opt_gen.cpp
+++ b/plugins/Popup/src/opt_gen.cpp
@@ -235,7 +235,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
continue;
char prefix[128];
- mir_snprintf(prefix, sizeof(prefix), "Protocol Status/%s", protocols[i]->szModuleName);
+ mir_snprintf(prefix, SIZEOF(prefix), "Protocol Status/%s", protocols[i]->szModuleName);
TCHAR pszSettingName[256];
mir_sntprintf(pszSettingName, SIZEOF(pszSettingName), LPGENT("Protocol Status")_T("/%s"), protocols[i]->tszAccountName);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp
index 2edb58f93e..c859e7f620 100644
--- a/plugins/Popup/src/opt_skins.cpp
+++ b/plugins/Popup/src/opt_skins.cpp
@@ -281,7 +281,7 @@ bool SkinOptionList_Update (OPTTREE_OPTION* &options, int *OptionsCount, HWND hw
//check "Skin options" state
char prefix[128];
- mir_snprintf(prefix, sizeof(prefix),"skin.%S", PopupOptions.SkinPack);
+ mir_snprintf(prefix, SIZEOF(prefix),"skin.%S", PopupOptions.SkinPack);
OptTree_SetOptions(hwndDlg, IDC_SKIN_LIST_OPT, options, *OptionsCount,
db_get_dw(NULL, MODULNAME, prefix, dwSkinOptions), _T("Skin options"));
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index 5c61d32e65..e56281bd37 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -361,7 +361,7 @@ void PopupWnd2::show()
if (*PopupOptions.Effect)
{
char vfxService[128];
- mir_snprintf(vfxService, sizeof(vfxService), "Popup/Vfx/%S", PopupOptions.Effect);
+ mir_snprintf(vfxService, SIZEOF(vfxService), "Popup/Vfx/%S", PopupOptions.Effect);
if (ServiceExists(vfxService))
if (effect = (IPopupPlusEffect *)CallService(vfxService, 0, 0))
{
@@ -459,7 +459,7 @@ void PopupWnd2::hide()
if (*PopupOptions.Effect)
{
char vfxService[128];
- mir_snprintf(vfxService, sizeof(vfxService), "Popup/Vfx/%S", PopupOptions.Effect);
+ mir_snprintf(vfxService, SIZEOF(vfxService), "Popup/Vfx/%S", PopupOptions.Effect);
if (ServiceExists(vfxService))
if (effect = (IPopupPlusEffect *)CallService(vfxService, 0, 0))
{
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp
index fe17687cf7..6c2fd14c6d 100644
--- a/plugins/Popup/src/services.cpp
+++ b/plugins/Popup/src/services.cpp
@@ -146,7 +146,7 @@ INT_PTR Popup_AddPopup2(WPARAM wParam, LPARAM lParam)
if (proto) {
char prefix[128];
- mir_snprintf(prefix, sizeof(prefix), LPGEN("Protocol Status") "/%s", GetContactProto(ppd->lchContact));
+ mir_snprintf(prefix, SIZEOF(prefix), LPGEN("Protocol Status") "/%s", GetContactProto(ppd->lchContact));
if (db_get_dw(NULL, MODULNAME, prefix, 0) & Proto_Status2Flag_My(CallProtoService(proto, PS_GETSTATUS, 0, 0)))
return -1;
if (((disableWhen >> 16) & 0xFFFF0000) & Proto_Status2Flag_My(CallProtoService(proto, PS_GETSTATUS, 0, 0)))
@@ -389,7 +389,7 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam)
_tcsncpy(fid.deffontsettings.szFace, _T("Verdana"), SIZEOF(fid.deffontsettings.szFace));
_tcsncpy(fid.name, _T(PU_FNT_NAME_TEXT), SIZEOF(fid.name));
strncpy(fid.prefix, setting, SIZEOF(fid.prefix));
- mir_snprintf(fid.prefix, sizeof(fid.prefix), "%s/Text", ptd->pupClass.pszName); // result is "%s/TextCol"
+ mir_snprintf(fid.prefix, SIZEOF(fid.prefix), "%s/Text", ptd->pupClass.pszName); // result is "%s/TextCol"
fid.deffontsettings.style = 0;
fid.deffontsettings.colour = fonts.clText;
FontRegisterT(&fid);
@@ -402,7 +402,7 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam)
mir_sntprintf(cid.group, SIZEOF(cid.group), _T(PU_FNT_AND_COLOR)_T("/%S"), ptd->pupClass.pszName);
strncpy(cid.dbSettingsGroup, PU_MODULCLASS, SIZEOF(fid.dbSettingsGroup));
_tcsncpy(cid.name, PU_COL_BACK_NAME, SIZEOF(cid.name));
- mir_snprintf(cid.setting, sizeof(cid.setting), "%s/BgCol", ptd->pupClass.pszName);
+ mir_snprintf(cid.setting, SIZEOF(cid.setting), "%s/BgCol", ptd->pupClass.pszName);
cid.defcolour = fonts.clBack;
ColourRegisterT(&cid);
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp
index 444c539c95..d9010f4af4 100644
--- a/plugins/Popup/src/skin.cpp
+++ b/plugins/Popup/src/skin.cpp
@@ -1047,14 +1047,14 @@ void PopupSkin::freeSkin(SKINELEMENT *head)
void PopupSkin::saveOpts() const
{
char buf[128];
- mir_snprintf(buf, sizeof(buf), "skin.%.120S", m_name);
+ mir_snprintf(buf, SIZEOF(buf), "skin.%.120S", m_name);
db_set_dw(NULL, MODULNAME, buf, m_flags);
}
void PopupSkin::loadOpts() const
{
char buf[128];
- mir_snprintf(buf, sizeof(buf), "skin.%.120S", m_name);
+ mir_snprintf(buf, SIZEOF(buf), "skin.%.120S", m_name);
m_flags = db_get_dw(NULL, MODULNAME, buf, m_flags);
}