diff options
Diffstat (limited to 'src/modules/fonts')
-rw-r--r-- | src/modules/fonts/FontOptions.cpp | 26 | ||||
-rw-r--r-- | src/modules/fonts/services.cpp | 18 |
2 files changed, 22 insertions, 22 deletions
diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp index 6efdc67f7d..a028f0d9cc 100644 --- a/src/modules/fonts/FontOptions.cpp +++ b/src/modules/fonts/FontOptions.cpp @@ -147,7 +147,7 @@ static BOOL ExportSettings(HWND hwndDlg, const TCHAR *filename, OBJLIST<FontInte for (int i = 0; i < flist.getCount(); i++) {
FontInternal& F = flist[i];
- mir_snprintf(buff, SIZEOF(buff), "\n[%s]", F.dbSettingsGroup);
+ mir_snprintf(buff, "\n[%s]", F.dbSettingsGroup);
if (mir_strcmp(buff, header) != 0) {
strncpy(header, buff, SIZEOF(header));
WriteLine(out, buff);
@@ -193,7 +193,7 @@ static BOOL ExportSettings(HWND hwndDlg, const TCHAR *filename, OBJLIST<FontInte for (int i = 0; i < clist.getCount(); i++) {
ColourInternal& C = clist[i];
- mir_snprintf(buff, SIZEOF(buff), "\n[%s]", C.dbSettingsGroup);
+ mir_snprintf(buff, "\n[%s]", C.dbSettingsGroup);
if (mir_strcmp(buff, header) != 0) {
strncpy_s(header, buff, _TRUNCATE);
WriteLine(out, buff);
@@ -205,7 +205,7 @@ static BOOL ExportSettings(HWND hwndDlg, const TCHAR *filename, OBJLIST<FontInte for (int i = 0; i < elist.getCount(); i++) {
EffectInternal& E = elist[i];
- mir_snprintf(buff, SIZEOF(buff), "\n[%s]", E.dbSettingsGroup);
+ mir_snprintf(buff, "\n[%s]", E.dbSettingsGroup);
if (mir_strcmp(buff, header) != 0) {
strncpy_s(header, buff, _TRUNCATE);
WriteLine(out, buff);
@@ -504,7 +504,7 @@ static void sttSaveFontData(HWND hwndDlg, FontInternal &F) char str[128];
if (F.flags & FIDF_APPENDNAME)
- mir_snprintf(str, SIZEOF(str), "%sName", F.prefix);
+ mir_snprintf(str, "%sName", F.prefix);
else
strncpy_s(str, F.prefix, _TRUNCATE);
@@ -514,7 +514,7 @@ static void sttSaveFontData(HWND hwndDlg, FontInternal &F) db_set_s(NULL, F.dbSettingsGroup, str, buff);
}
- mir_snprintf(str, SIZEOF(str), "%sSize", F.prefix);
+ mir_snprintf(str, "%sSize", F.prefix);
if (F.flags & FIDF_SAVEACTUALHEIGHT) {
SIZE size;
CreateFromFontSettings(&F.value, &lf);
@@ -535,17 +535,17 @@ static void sttSaveFontData(HWND hwndDlg, FontInternal &F) }
else db_set_b(NULL, F.dbSettingsGroup, str, F.value.size);
- mir_snprintf(str, SIZEOF(str), "%sSty", F.prefix);
+ mir_snprintf(str, "%sSty", F.prefix);
db_set_b(NULL, F.dbSettingsGroup, str, F.value.style);
- mir_snprintf(str, SIZEOF(str), "%sSet", F.prefix);
+ mir_snprintf(str, "%sSet", F.prefix);
db_set_b(NULL, F.dbSettingsGroup, str, F.value.charset);
- mir_snprintf(str, SIZEOF(str), "%sCol", F.prefix);
+ mir_snprintf(str, "%sCol", F.prefix);
db_set_dw(NULL, F.dbSettingsGroup, str, F.value.colour);
if (F.flags & FIDF_NOAS) {
- mir_snprintf(str, SIZEOF(str), "%sAs", F.prefix);
+ mir_snprintf(str, "%sAs", F.prefix);
db_set_w(NULL, F.dbSettingsGroup, str, (WORD)0x00FF);
}
- mir_snprintf(str, SIZEOF(str), "%sFlags", F.prefix);
+ mir_snprintf(str, "%sFlags", F.prefix);
db_set_w(NULL, F.dbSettingsGroup, str, (WORD)F.flags);
}
@@ -1139,13 +1139,13 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, for (i = 0; i < effect_id_list_w2.getCount(); i++) {
EffectInternal& E = effect_id_list_w2[i];
- mir_snprintf(str, SIZEOF(str), "%sEffect", E.setting);
+ mir_snprintf(str, "%sEffect", E.setting);
db_set_b(NULL, E.dbSettingsGroup, str, E.value.effectIndex);
- mir_snprintf(str, SIZEOF(str), "%sEffectCol1", E.setting);
+ mir_snprintf(str, "%sEffectCol1", E.setting);
db_set_dw(NULL, E.dbSettingsGroup, str, E.value.baseColour);
- mir_snprintf(str, SIZEOF(str), "%sEffectCol2", E.setting);
+ mir_snprintf(str, "%sEffectCol2", E.setting);
db_set_dw(NULL, E.dbSettingsGroup, str, E.value.secondaryColour);
}
diff --git a/src/modules/fonts/services.cpp b/src/modules/fonts/services.cpp index b02a4f7c82..77f29e8218 100644 --- a/src/modules/fonts/services.cpp +++ b/src/modules/fonts/services.cpp @@ -137,7 +137,7 @@ int GetFontSettingFromDB(char *settings_group, char *prefix, LOGFONT *lf, COLORR char idstr[256];
if (flags & FIDF_APPENDNAME)
- mir_snprintf(idstr, SIZEOF(idstr), "%sName", prefix);
+ mir_snprintf(idstr, "%sName", prefix);
else
strncpy_s(idstr, prefix, _TRUNCATE);
@@ -149,14 +149,14 @@ int GetFontSettingFromDB(char *settings_group, char *prefix, LOGFONT *lf, COLORR retval = 1;
if (colour) {
- mir_snprintf(idstr, SIZEOF(idstr), "%sCol", prefix);
+ mir_snprintf(idstr, "%sCol", prefix);
*colour = db_get_dw(NULL, settings_group, idstr, *colour);
}
- mir_snprintf(idstr, SIZEOF(idstr), "%sSize", prefix);
+ mir_snprintf(idstr, "%sSize", prefix);
lf->lfHeight = (char)db_get_b(NULL, settings_group, idstr, lf->lfHeight);
- mir_snprintf(idstr, SIZEOF(idstr), "%sSty", prefix);
+ mir_snprintf(idstr, "%sSty", prefix);
BYTE style = (BYTE)db_get_b(NULL, settings_group, idstr,
(lf->lfWeight == FW_NORMAL ? 0 : DBFONTF_BOLD) | (lf->lfItalic ? DBFONTF_ITALIC : 0) | (lf->lfUnderline ? DBFONTF_UNDERLINE : 0) | lf->lfStrikeOut ? DBFONTF_STRIKEOUT : 0);
@@ -166,7 +166,7 @@ int GetFontSettingFromDB(char *settings_group, char *prefix, LOGFONT *lf, COLORR lf->lfUnderline = (style & DBFONTF_UNDERLINE) != 0;
lf->lfStrikeOut = (style & DBFONTF_STRIKEOUT) != 0;
- mir_snprintf(idstr, SIZEOF(idstr), "%sSet", prefix);
+ mir_snprintf(idstr, "%sSet", prefix);
lf->lfCharSet = db_get_b(NULL, settings_group, idstr, lf->lfCharSet);
lf->lfOutPrecision = OUT_DEFAULT_PRECIS;
@@ -250,7 +250,7 @@ static int sttRegisterFontWorker(FontIDW *font_id, int hLangpack) }
char idstr[256];
- mir_snprintf(idstr, SIZEOF(idstr), "%sFlags", font_id->prefix);
+ mir_snprintf(idstr, "%sFlags", font_id->prefix);
db_set_dw(0, font_id->dbSettingsGroup, idstr, font_id->flags);
FontInternal* newItem = new FontInternal;
@@ -413,13 +413,13 @@ void KillModuleColours(int hLangpack) void UpdateEffectSettings(EffectIDW *effect_id, FONTEFFECT *effectsettings)
{
char str[256];
- mir_snprintf(str, SIZEOF(str), "%sEffect", effect_id->setting);
+ mir_snprintf(str, "%sEffect", effect_id->setting);
effectsettings->effectIndex = db_get_b(NULL, effect_id->dbSettingsGroup, str, effect_id->defeffect.effectIndex);
- mir_snprintf(str, SIZEOF(str), "%sEffectCol1", effect_id->setting);
+ mir_snprintf(str, "%sEffectCol1", effect_id->setting);
effectsettings->baseColour = db_get_dw(NULL, effect_id->dbSettingsGroup, str, effect_id->defeffect.baseColour);
- mir_snprintf(str, SIZEOF(str), "%sEffectCol2", effect_id->setting);
+ mir_snprintf(str, "%sEffectCol2", effect_id->setting);
effectsettings->secondaryColour = db_get_dw(NULL, effect_id->dbSettingsGroup, str, effect_id->defeffect.secondaryColour);
}
|