summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-04 22:12:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-04 22:12:13 +0000
commitb7c74cd5b22618d544a3f4ae124985d4837e3a22 (patch)
tree468d9610a590685322ad2159a9bd2d9e2ba83f89 /plugins/UserInfoEx
parent7de513f180c429859e246d1033d745b394e1fc28 (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 'plugins/UserInfoEx')
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp8
-rw-r--r--plugins/UserInfoEx/src/ex_import/tinyxml.cpp10
-rw-r--r--plugins/UserInfoEx/src/svc_contactinfo.cpp2
3 files changed, 10 insertions, 10 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index f5f1e05bee..e968284786 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -292,9 +292,9 @@ void CExImContactBase::toIni(FILE* file, int modCount)
if (_pszProto == NULL || !loaded) {
if (_pszProto){
if (_pszNick)
- mir_snprintf(name, SIZEOF(name),"%s (%s)", _pszNick, _pszProto);
+ mir_snprintf(name,"%s (%s)", _pszNick, _pszProto);
else
- mir_snprintf(name, SIZEOF(name),"(UNKNOWN) (%s)", _pszProto);
+ mir_snprintf(name,"(UNKNOWN) (%s)", _pszProto);
}
else
strncpy_s(name, "(UNKNOWN)", _TRUNCATE);
@@ -316,9 +316,9 @@ void CExImContactBase::toIni(FILE* file, int modCount)
}
LPSTR pszUID = uid2String(FALSE);
if (_pszUIDKey && pszUID)
- mir_snprintf(name, SIZEOF(name), "%s *(%s)*<%s>*{%s}*", pszCI, _pszProto, _pszUIDKey, pszUID);
+ mir_snprintf(name, "%s *(%s)*<%s>*{%s}*", pszCI, _pszProto, _pszUIDKey, pszUID);
else
- mir_snprintf(name, SIZEOF(name), "%s (%s)", pszCI, _pszProto);
+ mir_snprintf(name, "%s (%s)", pszCI, _pszProto);
mir_free(pszCI);
mir_free(pszUID);
diff --git a/plugins/UserInfoEx/src/ex_import/tinyxml.cpp b/plugins/UserInfoEx/src/ex_import/tinyxml.cpp
index 27ba54d82a..b41bffa85e 100644
--- a/plugins/UserInfoEx/src/ex_import/tinyxml.cpp
+++ b/plugins/UserInfoEx/src/ex_import/tinyxml.cpp
@@ -110,7 +110,7 @@ void TiXmlBase::PutString(const TIXML_STRING& str, TIXML_STRING* outString)
// Easy pass at non-alpha/numeric/symbol
// Below 32 is symbolic.
char buf[32];
- mir_snprintf(buf, SIZEOF(buf), "&#x%02X;", (unsigned) (c & 0xff));
+ mir_snprintf(buf, "&#x%02X;", (unsigned) (c & 0xff));
//*ME: warning C4267: convert 'size_t' to 'int'
//*ME: Int-Cast to make compiler happy ...
@@ -758,7 +758,7 @@ int TiXmlElement::QueryDoubleAttribute(const char* name, double* dval) const
void TiXmlElement::SetAttribute(const char * name, int val)
{
char buf[64];
- mir_snprintf(buf, SIZEOF(buf), "%d", val);
+ mir_snprintf(buf, "%d", val);
SetAttribute(name, buf);
}
@@ -776,7 +776,7 @@ void TiXmlElement::SetAttribute(const std::string& name, int val)
void TiXmlElement::SetDoubleAttribute(const char * name, double val)
{
char buf[256];
- mir_snprintf(buf, SIZEOF(buf), "%f", val);
+ mir_snprintf(buf, "%f", val);
SetAttribute(name, buf);
}
@@ -1422,14 +1422,14 @@ int TiXmlAttribute::QueryDoubleValue(double* dval) const
void TiXmlAttribute::SetIntValue(int _value)
{
char buf[64];
- mir_snprintf(buf, SIZEOF(buf), "%d", _value);
+ mir_snprintf(buf, "%d", _value);
SetValue(buf);
}
void TiXmlAttribute::SetDoubleValue(double _value)
{
char buf[256];
- mir_snprintf(buf, SIZEOF(buf), "%lf", _value);
+ mir_snprintf(buf, "%lf", _value);
SetValue(buf);
}
diff --git a/plugins/UserInfoEx/src/svc_contactinfo.cpp b/plugins/UserInfoEx/src/svc_contactinfo.cpp
index f0faf6faaa..1219e9ec17 100644
--- a/plugins/UserInfoEx/src/svc_contactinfo.cpp
+++ b/plugins/UserInfoEx/src/svc_contactinfo.cpp
@@ -571,7 +571,7 @@ INT_PTR GetContactInfo(WPARAM wParam, LPARAM lParam)
int offset = tzi->Bias + tzi->StandardBias;
char str[80];
- mir_snprintf(str, SIZEOF(str), offset ? "UTC%+d:%02d" : "UTC", offset / -60, abs(offset % 60));
+ mir_snprintf(str, offset ? "UTC%+d:%02d" : "UTC", offset / -60, abs(offset % 60));
ci->pszVal = ci->dwFlag & CNF_UNICODE ? (TCHAR*)mir_a2u(str) : (TCHAR*)mir_strdup(str);
ci->type = CNFT_ASCIIZ;
return 0;