summaryrefslogtreecommitdiff
path: root/plugins/IEView
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-07-25 20:15:05 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-07-25 20:15:05 +0000
commit9d32b9cd791fb5f51dad17567152c70a8511a500 (patch)
treefd7aa3250ed409e720f26c341c0a5d736ed8083c /plugins/IEView
parent125a25c86eed41352d45eb8fb6f994f65700c3ec (diff)
replace sprintf to mir_snprintf (part 6)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5485 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IEView')
-rw-r--r--plugins/IEView/src/HistoryHTMLBuilder.cpp14
-rw-r--r--plugins/IEView/src/IEView.cpp2
-rw-r--r--plugins/IEView/src/MUCCHTMLBuilder.cpp10
-rw-r--r--plugins/IEView/src/ScriverHTMLBuilder.cpp10
-rw-r--r--plugins/IEView/src/TabSRMMHTMLBuilder.cpp10
-rw-r--r--plugins/IEView/src/Utils.cpp4
6 files changed, 25 insertions, 25 deletions
diff --git a/plugins/IEView/src/HistoryHTMLBuilder.cpp b/plugins/IEView/src/HistoryHTMLBuilder.cpp
index 5d454b7f54..6ba7cbd57e 100644
--- a/plugins/IEView/src/HistoryHTMLBuilder.cpp
+++ b/plugins/IEView/src/HistoryHTMLBuilder.cpp
@@ -98,34 +98,34 @@ void HistoryHTMLBuilder::loadMsgDlgFont(const char *dbSetting, LOGFONTA * lf, CO
int style;
DBVARIANT dbv;
if (bkgColour) {
- wsprintfA(str, "Back.%s", dbSetting);
+ mir_snprintf(str, SIZEOF(str), "Back.%s", dbSetting);
*bkgColour = db_get_dw(NULL, HPPMOD, str, 0xFFFFFF);
}
if (colour) {
- wsprintfA(str, "Font.%s.Color", dbSetting);
+ mir_snprintf(str, SIZEOF(str), "Font.%s.Color", dbSetting);
*colour = db_get_dw(NULL, HPPMOD, str, 0x000000);
}
if (lf) {
- wsprintfA(str, "Font.%s.Size", dbSetting);
+ mir_snprintf(str, SIZEOF(str), "Font.%s.Size", dbSetting);
lf->lfHeight = (char) db_get_b(NULL, HPPMOD, str, 10);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
- wsprintfA(str, "Font.%s.Style.Bold", dbSetting);
+ mir_snprintf(str, SIZEOF(str), "Font.%s.Style.Bold", dbSetting);
style = db_get_b(NULL, HPPMOD, str, 0);
lf->lfWeight = style & FONTF_BOLD ? FW_BOLD : FW_NORMAL;
- wsprintfA(str, "Font.%s.Style.Italic", dbSetting);
+ mir_snprintf(str, SIZEOF(str), "Font.%s.Style.Italic", dbSetting);
style = db_get_b(NULL, HPPMOD, str, 0) << 1;
lf->lfItalic = style & FONTF_ITALIC ? 1 : 0;
lf->lfUnderline = style & FONTF_UNDERLINE ? 1 : 0;
lf->lfStrikeOut = 0;
- wsprintfA(str, "Font.%s.Charset", dbSetting);
+ mir_snprintf(str, SIZEOF(str), "Font.%s.Charset", dbSetting);
lf->lfCharSet = db_get_b(NULL, HPPMOD, str, DEFAULT_CHARSET);
lf->lfOutPrecision = OUT_DEFAULT_PRECIS;
lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf->lfQuality = DEFAULT_QUALITY;
lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
- wsprintfA(str, "Font.%s.Name", dbSetting);
+ mir_snprintf(str, SIZEOF(str), "Font.%s.Name", dbSetting);
if (db_get(NULL, HPPMOD, str, &dbv))
lstrcpyA(lf->lfFaceName, "Verdana");
else {
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp
index edecd1e419..1925a59f98 100644
--- a/plugins/IEView/src/IEView.cpp
+++ b/plugins/IEView/src/IEView.cpp
@@ -894,7 +894,7 @@ void IEView::writef(const char *fmt, ...)
int strsize;
va_start(vararg, fmt);
str = (char *) malloc(strsize=2048);
- while (_vsnprintf(str, strsize, fmt, vararg) == -1)
+ while (mir_vsnprintf(str, strsize, fmt, vararg) == -1)
str = (char *) realloc(str, strsize+=2048);
va_end(vararg);
write(str);
diff --git a/plugins/IEView/src/MUCCHTMLBuilder.cpp b/plugins/IEView/src/MUCCHTMLBuilder.cpp
index e6feaa0761..51e8f7f628 100644
--- a/plugins/IEView/src/MUCCHTMLBuilder.cpp
+++ b/plugins/IEView/src/MUCCHTMLBuilder.cpp
@@ -44,29 +44,29 @@ void MUCCHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) {
int style;
DBVARIANT dbv;
if (colour) {
- wsprintfA(str, "Font%dCol", i);
+ mir_snprintf(str, SIZEOF(str), "Font%dCol", i);
*colour = db_get_dw(NULL, MUCCMOD, str, 0x000000);
}
if (lf) {
- wsprintfA(str, "Font%dSize", i);
+ mir_snprintf(str, SIZEOF(str), "Font%dSize", i);
lf->lfHeight = (char) db_get_b(NULL, MUCCMOD, str, 10);
lf->lfHeight = abs(lf->lfHeight);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
- wsprintfA(str, "Font%dStyle", i);
+ mir_snprintf(str, SIZEOF(str), "Font%dStyle", i);
style = db_get_b(NULL, MUCCMOD, str, 0);
lf->lfWeight = style & FONTF_BOLD ? FW_BOLD : FW_NORMAL;
lf->lfItalic = style & FONTF_ITALIC ? 1 : 0;
lf->lfUnderline = style & FONTF_UNDERLINE ? 1 : 0;
lf->lfStrikeOut = 0;
- wsprintfA(str, "Font%dSet", i);
+ mir_snprintf(str, SIZEOF(str), "Font%dSet", i);
lf->lfCharSet = db_get_b(NULL, MUCCMOD, str, DEFAULT_CHARSET);
lf->lfOutPrecision = OUT_DEFAULT_PRECIS;
lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf->lfQuality = DEFAULT_QUALITY;
lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
- wsprintfA(str, "Font%dFace", i);
+ mir_snprintf(str, SIZEOF(str), "Font%dFace", i);
if (db_get(NULL, MUCCMOD, str, &dbv))
lstrcpyA(lf->lfFaceName, "Verdana");
else {
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp
index 642b2083ad..af97c04504 100644
--- a/plugins/IEView/src/ScriverHTMLBuilder.cpp
+++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp
@@ -88,29 +88,29 @@ void ScriverHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour)
int style;
DBVARIANT dbv;
if (colour) {
- wsprintfA(str, "SRMFont%dCol", i);
+ mir_snprintf(str, SIZEOF(str), "SRMFont%dCol", i);
*colour = db_get_dw(NULL, SRMMMOD, str, 0x000000);
}
if (lf) {
- wsprintfA(str, "SRMFont%dSize", i);
+ mir_snprintf(str, SIZEOF(str), "SRMFont%dSize", i);
lf->lfHeight = (char) db_get_b(NULL, SRMMMOD, str, 10);
lf->lfHeight = abs(lf->lfHeight);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
- wsprintfA(str, "SRMFont%dSty", i);
+ mir_snprintf(str, SIZEOF(str), "SRMFont%dSty", i);
style = db_get_b(NULL, SRMMMOD, str, 0);
lf->lfWeight = style & FONTF_BOLD ? FW_BOLD : FW_NORMAL;
lf->lfItalic = style & FONTF_ITALIC ? 1 : 0;
lf->lfUnderline = style & FONTF_UNDERLINE ? 1 : 0;
lf->lfStrikeOut = 0;
- wsprintfA(str, "SRMFont%dSet", i);
+ mir_snprintf(str, SIZEOF(str), "SRMFont%dSet", i);
lf->lfCharSet = db_get_b(NULL, SRMMMOD, str, DEFAULT_CHARSET);
lf->lfOutPrecision = OUT_DEFAULT_PRECIS;
lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf->lfQuality = DEFAULT_QUALITY;
lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
- wsprintfA(str, "SRMFont%d", i);
+ mir_snprintf(str, SIZEOF(str), "SRMFont%d", i);
if (db_get(NULL, SRMMMOD, str, &dbv))
lstrcpyA(lf->lfFaceName, "Verdana");
else {
diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
index 120024509c..7326240b77 100644
--- a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
+++ b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
@@ -115,12 +115,12 @@ void TabSRMMHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour)
int style;
DBVARIANT dbv;
if (colour) {
- wsprintfA(str, "Font%dCol", i);
+ mir_snprintf(str, SIZEOF(str), "Font%dCol", i);
*colour = db_get_dw(NULL, TABSRMM_FONTMODULE, str, 0x000000);
}
if (lf) {
HDC hdc = GetDC(NULL);
- wsprintfA(str, "Font%dSize", i);
+ mir_snprintf(str, SIZEOF(str), "Font%dSize", i);
// if(i == H_MSGFONTID_DIVIDERS)
// lf->lfHeight = 5;
// else {
@@ -131,19 +131,19 @@ void TabSRMMHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour)
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
- wsprintfA(str, "Font%dSty", i);
+ mir_snprintf(str, SIZEOF(str), "Font%dSty", i);
style = db_get_b(NULL, TABSRMM_FONTMODULE, str, 0);
lf->lfWeight = style & FONTF_BOLD ? FW_BOLD : FW_NORMAL;
lf->lfItalic = style & FONTF_ITALIC ? 1 : 0;
lf->lfUnderline = style & FONTF_UNDERLINE ? 1 : 0;
lf->lfStrikeOut = 0;
- wsprintfA(str, "Font%dSet", i);
+ mir_snprintf(str, SIZEOF(str), "Font%dSet", i);
lf->lfCharSet = db_get_b(NULL, TABSRMM_FONTMODULE, str, DEFAULT_CHARSET);
lf->lfOutPrecision = OUT_DEFAULT_PRECIS;
lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf->lfQuality = DEFAULT_QUALITY;
lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
- wsprintfA(str, "Font%d", i);
+ mir_snprintf(str, SIZEOF(str), "Font%d", i);
if (db_get(NULL, TABSRMM_FONTMODULE, str, &dbv))
lstrcpyA(lf->lfFaceName, "Verdana");
else {
diff --git a/plugins/IEView/src/Utils.cpp b/plugins/IEView/src/Utils.cpp
index 85a4f07be6..4c7b0ddf8d 100644
--- a/plugins/IEView/src/Utils.cpp
+++ b/plugins/IEView/src/Utils.cpp
@@ -74,7 +74,7 @@ void Utils::appendText(char **str, int *sizeAlloced, const char *fmt, ...)
}
p = *str + len;
va_start(vararg, fmt);
- while (_vsnprintf(p, size - 1, fmt, vararg) == -1) {
+ while (mir_vsnprintf(p, size - 1, fmt, vararg) == -1) {
size += 2048;
(*sizeAlloced) += 2048;
*str = (char *) realloc(*str, *sizeAlloced);
@@ -109,7 +109,7 @@ void Utils::appendText(wchar_t **str, int *sizeAlloced, const wchar_t *fmt, ...)
}
p = *str + len;
va_start(vararg, fmt);
- while (_vsnwprintf(p, size / sizeof(wchar_t) - 1, fmt, vararg) == -1) {
+ while (mir_vsnwprintf(p, size / sizeof(wchar_t) - 1, fmt, vararg) == -1) {
size += 2048;
(*sizeAlloced) += 2048;
*str = (wchar_t *) realloc(*str, *sizeAlloced);