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/chat | |
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/chat')
-rw-r--r-- | src/modules/chat/chat_opts.cpp | 12 | ||||
-rw-r--r-- | src/modules/chat/log.cpp | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/modules/chat/chat_opts.cpp b/src/modules/chat/chat_opts.cpp index 5a2497b21a..dd889280c2 100644 --- a/src/modules/chat/chat_opts.cpp +++ b/src/modules/chat/chat_opts.cpp @@ -97,28 +97,28 @@ void LoadMsgDlgFont(int i, LOGFONT *lf, COLORREF *colour) FontOptionsList &FO = fontOptionsList[i];
if (colour) {
- mir_snprintf(str, SIZEOF(str), "Font%dCol", i);
+ mir_snprintf(str, "Font%dCol", i);
*colour = db_get_dw(NULL, CHATFONT_MODULE, str, FO.defColour);
}
if (lf) {
- mir_snprintf(str, SIZEOF(str), "Font%dSize", i);
+ mir_snprintf(str, "Font%dSize", i);
lf->lfHeight = (char)db_get_b(NULL, CHATFONT_MODULE, str, FO.defSize);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
- mir_snprintf(str, SIZEOF(str), "Font%dSty", i);
+ mir_snprintf(str, "Font%dSty", i);
style = db_get_b(NULL, CHATFONT_MODULE, str, FO.defStyle);
lf->lfWeight = style & FONTF_BOLD ? FW_BOLD : FW_NORMAL;
lf->lfItalic = style & FONTF_ITALIC ? 1 : 0;
lf->lfUnderline = 0;
lf->lfStrikeOut = 0;
- mir_snprintf(str, SIZEOF(str), "Font%dSet", i);
+ mir_snprintf(str, "Font%dSet", i);
lf->lfCharSet = db_get_b(NULL, CHATFONT_MODULE, str, FO.defCharset);
lf->lfOutPrecision = OUT_DEFAULT_PRECIS;
lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf->lfQuality = DEFAULT_QUALITY;
lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
- mir_snprintf(str, SIZEOF(str), "Font%d", i);
+ mir_snprintf(str, "Font%d", i);
ptrT tszFace(db_get_tsa(NULL, CHATFONT_MODULE, str));
if (tszFace == NULL)
@@ -185,7 +185,7 @@ void RegisterFonts(void) HICON LoadIconEx(char* pszIcoLibName, BOOL big)
{
char szTemp[256];
- mir_snprintf(szTemp, SIZEOF(szTemp), "chat_%s", pszIcoLibName);
+ mir_snprintf(szTemp, "chat_%s", pszIcoLibName);
return Skin_GetIcon(szTemp, big);
}
diff --git a/src/modules/chat/log.cpp b/src/modules/chat/log.cpp index 9fc6d5b20a..59c37ff1c1 100644 --- a/src/modules/chat/log.cpp +++ b/src/modules/chat/log.cpp @@ -159,7 +159,7 @@ static int Log_AppendRTF(LOGSTREAMDATA *streamData, BOOL simpleMode, char *&buff col = _ttoi(szTemp3);
col += (OPTIONS_FONTCOUNT + 1);
- mir_snprintf(szTemp, SIZEOF(szTemp), (c == 'c') ? "\\cf%u " : "\\highlight%u ", col);
+ mir_snprintf(szTemp, (c == 'c') ? "\\cf%u " : "\\highlight%u ", col);
}
break;
case 'C':
@@ -167,23 +167,23 @@ static int Log_AppendRTF(LOGSTREAMDATA *streamData, BOOL simpleMode, char *&buff if (!g_Settings->bStripFormat && !streamData->bStripFormat) {
int j = streamData->lin->bIsHighlighted ? 16 : EventToIndex(streamData->lin);
if (*line == 'C')
- mir_snprintf(szTemp, SIZEOF(szTemp), "\\cf%u ", j + 1);
+ mir_snprintf(szTemp, "\\cf%u ", j + 1);
else
- mir_snprintf(szTemp, SIZEOF(szTemp), "\\highlight0 ");
+ mir_snprintf(szTemp, "\\highlight0 ");
}
break;
case 'b':
case 'u':
case 'i':
if (!streamData->bStripFormat)
- mir_snprintf(szTemp, SIZEOF(szTemp), (*line == 'u') ? "\\%cl " : "\\%c ", *line);
+ mir_snprintf(szTemp, (*line == 'u') ? "\\%cl " : "\\%c ", *line);
break;
case 'B':
case 'U':
case 'I':
if (!streamData->bStripFormat) {
- mir_snprintf(szTemp, SIZEOF(szTemp), (*line == 'U') ? "\\%cl0 " : "\\%c0 ", *line);
+ mir_snprintf(szTemp, (*line == 'U') ? "\\%cl0 " : "\\%c0 ", *line);
CharLowerA(szTemp);
}
break;
@@ -191,7 +191,7 @@ static int Log_AppendRTF(LOGSTREAMDATA *streamData, BOOL simpleMode, char *&buff case 'r':
if (!streamData->bStripFormat) {
int index = EventToIndex(streamData->lin);
- mir_snprintf(szTemp, SIZEOF(szTemp), "%s ", Log_SetStyle(index));
+ mir_snprintf(szTemp, "%s ", Log_SetStyle(index));
}
break;
}
|