diff options
Diffstat (limited to 'plugins/Scriver/src/msgoptions.cpp')
-rw-r--r-- | plugins/Scriver/src/msgoptions.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 171ebfca17..7b56f8f3d2 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -76,7 +76,7 @@ static const FontOptionsList fontOptionsList[] = { { LPGENT("Info bar status message"), RGB(50, 50, 50), _T("Arial"), FONTF_ITALIC, -11, LPGENT("Info bar background")}
};
-int fontOptionsListSize = SIZEOF(fontOptionsList);
+int fontOptionsListSize = _countof(fontOptionsList);
struct ColourOptionsList
{
@@ -108,37 +108,37 @@ void RegisterFontServiceFonts() FontIDT fid = { sizeof(fid) };
_tcsncpy_s(fid.group, LPGENT("Messaging"), _TRUNCATE);
_tcsncpy_s(fid.backgroundGroup, LPGENT("Messaging"), _TRUNCATE);
- strncpy(fid.dbSettingsGroup, SRMMMOD, SIZEOF(fid.dbSettingsGroup));
+ strncpy(fid.dbSettingsGroup, SRMMMOD, _countof(fid.dbSettingsGroup));
fid.flags = FIDF_DEFAULTVALID | FIDF_DEFAULTVALID;
- for (int i = 0; i < SIZEOF(fontOptionsList); i++) {
+ for (int i = 0; i < _countof(fontOptionsList); i++) {
fid.order = i;
char szTemp[100];
mir_snprintf(szTemp, "SRMFont%d", i);
- strncpy(fid.prefix, szTemp, SIZEOF(fid.prefix));
- _tcsncpy(fid.name, fontOptionsList[i].szDescr, SIZEOF(fid.name));
+ strncpy(fid.prefix, szTemp, _countof(fid.prefix));
+ _tcsncpy(fid.name, fontOptionsList[i].szDescr, _countof(fid.name));
fid.deffontsettings.colour = fontOptionsList[i].defColour;
fid.deffontsettings.size = fontOptionsList[i].defSize;
fid.deffontsettings.style = fontOptionsList[i].defStyle;
fid.deffontsettings.charset = DEFAULT_CHARSET;
- _tcsncpy(fid.deffontsettings.szFace, fontOptionsList[i].szDefFace, SIZEOF(fid.deffontsettings.szFace));
- _tcsncpy(fid.backgroundName, fontOptionsList[i].szBkgName, SIZEOF(fid.backgroundName));
+ _tcsncpy(fid.deffontsettings.szFace, fontOptionsList[i].szDefFace, _countof(fid.deffontsettings.szFace));
+ _tcsncpy(fid.backgroundName, fontOptionsList[i].szBkgName, _countof(fid.backgroundName));
FontRegisterT(&fid);
}
ColourIDT cid = { sizeof(cid) };
_tcsncpy_s(cid.group, LPGENT("Messaging"), _TRUNCATE);
- strncpy(cid.dbSettingsGroup, SRMMMOD, SIZEOF(fid.dbSettingsGroup));
+ strncpy(cid.dbSettingsGroup, SRMMMOD, _countof(fid.dbSettingsGroup));
cid.flags = 0;
- for (int i = 0; i < SIZEOF(colourOptionsList); i++) {
+ for (int i = 0; i < _countof(colourOptionsList); i++) {
cid.order = i;
- _tcsncpy(cid.name, colourOptionsList[i].szName, SIZEOF(cid.name));
+ _tcsncpy(cid.name, colourOptionsList[i].szName, _countof(cid.name));
if (colourOptionsList[i].systemColor != -1)
cid.defcolour = GetSysColor(colourOptionsList[i].systemColor);
else
cid.defcolour = colourOptionsList[i].defColour;
- strncpy(cid.setting, colourOptionsList[i].szSettingName, SIZEOF(cid.setting));
+ strncpy(cid.setting, colourOptionsList[i].szSettingName, _countof(cid.setting));
ColourRegisterT(&cid);
}
}
@@ -192,7 +192,7 @@ void LoadMsgDlgFont(int i, LOGFONT *lf, COLORREF *colour) if (tszFace == NULL)
mir_tstrcpy(lf->lfFaceName, fontOptionsList[i].szDefFace);
else
- _tcsncpy(lf->lfFaceName, tszFace, SIZEOF(lf->lfFaceName));
+ _tcsncpy(lf->lfFaceName, tszFace, _countof(lf->lfFaceName));
mir_snprintf(str, "%s%dSet", "SRMFont", i);
lf->lfCharSet = db_get_b(NULL, SRMMMOD, str, DEFAULT_CHARSET);
@@ -957,7 +957,7 @@ int OptInitialise(WPARAM wParam, LPARAM) odp.hInstance = g_hInst;
odp.pszTitle = LPGEN("Message sessions");
odp.flags = ODPF_BOLDGROUPS;
- for (int i = 0; i < SIZEOF(tabPages); i++) {
+ for (int i = 0; i < _countof(tabPages); i++) {
odp.pszTemplate = MAKEINTRESOURCEA(tabPages[i].dlgId);
odp.pfnDlgProc = tabPages[i].dlgProc;
odp.pszTab = (char *)tabPages[i].tabName;
|