summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-22 10:18:21 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-22 10:18:21 +0000
commitb499ebc740aa5480be013d40e0d8097066800642 (patch)
treeed410ee863f4afc0c579599741bf38b4e3ffb706 /protocols/JabberG/src
parent5a17c9299e03bebf46169927abdeee34aaf8e854 (diff)
replace _tcslen to mir_tstrlen
git-svn-id: http://svn.miranda-ng.org/main/trunk@13748 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r--protocols/JabberG/src/jabber_caps.cpp2
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp2
-rw-r--r--protocols/JabberG/src/jabber_form.cpp2
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp2
-rw-r--r--protocols/JabberG/src/jabber_iq_handlers.cpp2
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp6
-rw-r--r--protocols/JabberG/src/jabber_misc.cpp4
-rw-r--r--protocols/JabberG/src/jabber_opt.cpp4
-rw-r--r--protocols/JabberG/src/jabber_privacy.cpp8
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp6
-rw-r--r--protocols/JabberG/src/jabber_svc.cpp2
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp10
-rw-r--r--protocols/JabberG/src/jabber_userinfo.cpp4
-rw-r--r--protocols/JabberG/src/jabber_util.cpp2
-rw-r--r--protocols/JabberG/src/jabber_xml.cpp2
15 files changed, 29 insertions, 29 deletions
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp
index aaab23b6f8..7b1cfe11ff 100644
--- a/protocols/JabberG/src/jabber_caps.cpp
+++ b/protocols/JabberG/src/jabber_caps.cpp
@@ -671,7 +671,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con
mir_tstrncpy(szOsBuffer, _T(""), SIZEOF(szOsBuffer));
else {
TCHAR *szOsWindows = _T("Microsoft Windows");
- size_t nOsWindowsLength = _tcslen(szOsWindows);
+ size_t nOsWindowsLength = mir_tstrlen(szOsWindows);
if (!_tcsnicmp(szOsBuffer, szOsWindows, nOsWindowsLength))
os += nOsWindowsLength + 1;
}
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index db1e38287b..c156b2b0dc 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -456,7 +456,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg)
}
else {
sttBrowseMode = SD_BROWSE_NORMAL;
- CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(szJid, _tcslen(szNode) ? szNode : NULL, NULL);
+ CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(szJid, mir_tstrlen(szNode) ? szNode : NULL, NULL);
SendBothRequests(pNode, NULL);
}
lck.unlock();
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp
index 7d1fc2de63..0da167336d 100644
--- a/protocols/JabberG/src/jabber_form.cpp
+++ b/protocols/JabberG/src/jabber_form.cpp
@@ -485,7 +485,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp
if (!v)
break;
if (xmlGetName(v) && !mir_tstrcmp(xmlGetName(v), _T("value")) && xmlGetText(v))
- size += _tcslen(xmlGetText(v)) + 2;
+ size += mir_tstrlen(xmlGetText(v)) + 2;
}
valueStr = (TCHAR*)mir_alloc(sizeof(TCHAR)*size);
valueStr[0] = '\0';
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp
index db120aa0de..65fbced241 100644
--- a/protocols/JabberG/src/jabber_groupchat.cpp
+++ b/protocols/JabberG/src/jabber_groupchat.cpp
@@ -1080,7 +1080,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node)
if (resource == NULL)
gcd.iType = GC_EVENT_INFORMATION;
- else if (_tcsncmp(msgText, _T("/me "), 4) == 0 && _tcslen(msgText) > 4) {
+ else if (_tcsncmp(msgText, _T("/me "), 4) == 0 && mir_tstrlen(msgText) > 4) {
msgText += 4;
gcd.iType = GC_EVENT_ACTION;
}
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp
index c382e37d38..c8222b05d7 100644
--- a/protocols/JabberG/src/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/src/jabber_iq_handlers.cpp
@@ -305,7 +305,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
// Include service pack (if any) and build number.
- if (_tcslen(osvi.szCSDVersion) > 0) {
+ if (mir_tstrlen(osvi.szCSDVersion) > 0) {
StringCchCat(pszOS, BUFSIZE, TEXT(" "));
StringCchCat(pszOS, BUFSIZE, osvi.szCSDVersion);
}
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index 0000b7b6d1..3567c46592 100644
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -403,8 +403,8 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo)
TCHAR *szPos = NULL;
while (szPos = _tcsstr(item->group, szGroupDelimeter)) {
*szPos = 0;
- szPos += _tcslen(szGroupDelimeter);
- TCHAR *szNewGroup = (TCHAR *)mir_alloc(sizeof(TCHAR) * (_tcslen(item->group) + _tcslen(szPos) + 2));
+ szPos += mir_tstrlen(szGroupDelimeter);
+ TCHAR *szNewGroup = (TCHAR *)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(item->group) + mir_tstrlen(szPos) + 2));
_tcscpy(szNewGroup, item->group);
_tcscat(szNewGroup, _T("\\"));
_tcscat(szNewGroup, szPos);
@@ -680,7 +680,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*)
return;
}
- size_t len = _tcslen(m_szJabberJID);
+ size_t len = mir_tstrlen(m_szJabberJID);
if (!_tcsnicmp(jid, m_szJabberJID, len) && (jid[len] == '/' || jid[len] == '\0')) {
hContact = NULL;
debugLogA("Vcard for myself");
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index 5159477d75..7072c507db 100644
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -119,14 +119,14 @@ MCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL
*q = '/';
// We can't use JabberHContactFromJID() here because of the stripResource option
- size_t len = _tcslen(s);
+ size_t len = mir_tstrlen(s);
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT jid( getTStringA(hContact, "jid"));
if (jid == NULL)
continue;
TCHAR *p = jid;
- if (p && _tcslen(p) >= len && (p[len]=='\0'||p[len]=='/') && !_tcsnicmp(p, s, len))
+ if (p && mir_tstrlen(p) >= len && (p[len]=='\0'||p[len]=='/') && !_tcsnicmp(p, s, len))
return hContact;
}
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp
index 4116d1ac6b..6b08ffc451 100644
--- a/protocols/JabberG/src/jabber_opt.cpp
+++ b/protocols/JabberG/src/jabber_opt.cpp
@@ -1088,9 +1088,9 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*)
}
if (bPushed) {
HXML item = query << XCHILD(_T("item"));
- if (_tcslen(group))
+ if (mir_tstrlen(group))
item << XCHILD(_T("group"), group);
- if (_tcslen(name))
+ if (mir_tstrlen(name))
item << XATTR(_T("name"), name);
item << XATTR(_T("jid"), jid) << XATTR(_T("subscription"), subscr[0] ? subscr : _T("none"));
itemCount++;
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp
index f20c678d00..dbaea138f8 100644
--- a/protocols/JabberG/src/jabber_privacy.cpp
+++ b/protocols/JabberG/src/jabber_privacy.cpp
@@ -1016,17 +1016,17 @@ void CJabberDlgPrivacyLists::ShowAdvancedList(CPrivacyList *pList)
if (dwPackets & JABBER_PL_RULE_TYPE_MESSAGE)
_tcscat(szPackets, _T("messages"));
if (dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_IN) {
- if (_tcslen(szPackets))
+ if (mir_tstrlen(szPackets))
_tcscat(szPackets, _T(", "));
_tcscat(szPackets, _T("presence-in"));
}
if (dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_OUT) {
- if (_tcslen(szPackets))
+ if (mir_tstrlen(szPackets))
_tcscat(szPackets, _T(", "));
_tcscat(szPackets, _T("presence-out"));
}
if (dwPackets & JABBER_PL_RULE_TYPE_IQ) {
- if (_tcslen(szPackets))
+ if (mir_tstrlen(szPackets))
_tcscat(szPackets, _T(", "));
_tcscat(szPackets, _T("queries"));
}
@@ -1837,7 +1837,7 @@ void CJabberDlgPrivacyLists::btnAddList_OnClick(CCtrlButton*)
// FIXME: line length is hard coded in dialog procedure
CJabberDlgPrivacyAddList dlgPrivacyAddList(m_proto, m_hwnd);
int nRetVal = dlgPrivacyAddList.DoModal();
- if (nRetVal && _tcslen(dlgPrivacyAddList.szLine)) {
+ if (nRetVal && mir_tstrlen(dlgPrivacyAddList.szLine)) {
mir_cslockfull lck(m_proto->m_privacyListManager.m_cs);
CPrivacyList *pList = m_proto->m_privacyListManager.FindList(dlgPrivacyAddList.szLine);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 0df2add95a..a471b49703 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -471,7 +471,7 @@ HANDLE __cdecl CJabberProto::FileAllow(MCONTACT /*hContact*/, HANDLE hTransfer,
filetransfer *ft = (filetransfer*)hTransfer;
ft->std.tszWorkingDir = mir_tstrdup(szPath);
- size_t len = _tcslen(ft->std.tszWorkingDir)-1;
+ size_t len = mir_tstrlen(ft->std.tszWorkingDir)-1;
if (ft->std.tszWorkingDir[len] == '/' || ft->std.tszWorkingDir[len] == '\\')
ft->std.tszWorkingDir[len] = 0;
@@ -623,7 +623,7 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/)
bool bHasResource = _tcscmp(jid, szBareJid) != 0;
JABBER_LIST_ITEM *tmpItem = NULL;
if (bHasResource && (tmpItem = ListGetItemPtr(LIST_CHATROOM, szBareJid))) {
- pResourceStatus him(tmpItem->findResource(szBareJid+_tcslen(szBareJid)+1));
+ pResourceStatus him(tmpItem->findResource(szBareJid+mir_tstrlen(szBareJid)+1));
if (him) {
item = ListAdd(LIST_VCARD_TEMP, jid);
ListAddResource(LIST_VCARD_TEMP, jid, him->m_iStatus, him->m_tszStatusMessage, him->m_iPriority);
@@ -1143,7 +1143,7 @@ void __cdecl CJabberProto::GetAwayMsgThread(void *param)
JABBER_RESOURCE_STATUS *r = item->arResources[i];
if (r->m_tszStatusMessage) {
msgCount++;
- len += (_tcslen(r->m_tszResourceName) + _tcslen(r->m_tszStatusMessage) + 8);
+ len += (mir_tstrlen(r->m_tszResourceName) + mir_tstrlen(r->m_tszStatusMessage) + 8);
}
}
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp
index f78b97abe9..968ec55fab 100644
--- a/protocols/JabberG/src/jabber_svc.cpp
+++ b/protocols/JabberG/src/jabber_svc.cpp
@@ -347,7 +347,7 @@ static void appendString(bool bIsTipper, const TCHAR *tszTitle, const TCHAR *tsz
out.AppendFormat(_T("<b>%s</b>\t%s"), TranslateTS(tszTitle), tszValue);
else {
TCHAR *p = TranslateTS(tszTitle);
- out.AppendFormat(_T("%s%s\t%s"), p, _tcslen(p) <= 7 ? _T("\t") : _T(""), tszValue);
+ out.AppendFormat(_T("%s%s\t%s"), p, mir_tstrlen(p) <= 7 ? _T("\t") : _T(""), tszValue);
}
}
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 66ef740ca8..7e55a4e57b 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -392,7 +392,7 @@ LBL_FatalError:
// User may change status to OFFLINE while we are connecting above
if (m_iDesiredStatus != ID_STATUS_OFFLINE || info.bIsReg) {
if (!info.bIsReg) {
- size_t len = _tcslen(info.conn.username) + mir_strlen(info.conn.server) + 1;
+ size_t len = mir_tstrlen(info.conn.username) + mir_strlen(info.conn.server) + 1;
m_szJabberJID = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1));
mir_sntprintf(m_szJabberJID, len + 1, _T("%s@%S"), info.conn.username, info.conn.server);
m_bSendKeepAlive = m_options.KeepAlive != 0;
@@ -1066,7 +1066,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
LPCTSTR ptszSubject = xmlGetText(xmlGetChild(node, "subject"));
if (ptszSubject && *ptszSubject) {
- size_t cbLen = (szMessage ? _tcslen(szMessage) : 0) + _tcslen(ptszSubject) + 128;
+ size_t cbLen = (szMessage ? mir_tstrlen(szMessage) : 0) + mir_tstrlen(ptszSubject) + 128;
TCHAR *szTmp = (TCHAR *)alloca(sizeof(TCHAR) * cbLen);
szTmp[0] = 0;
if (szMessage)
@@ -1084,7 +1084,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
if (addressNode) {
const TCHAR *szJid = xmlGetAttrValue(addressNode, _T("jid"));
if (szJid) {
- size_t cbLen = _tcslen(szMessage) + 1000;
+ size_t cbLen = mir_tstrlen(szMessage) + 1000;
TCHAR *p = (TCHAR*)alloca(sizeof(TCHAR) * cbLen);
mir_sntprintf(p, cbLen, TranslateT("Message redirected from: %s\r\n%s"), from, szMessage);
szMessage = p;
@@ -1204,7 +1204,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
TCHAR *prolog = _T("-----BEGIN PGP MESSAGE-----\r\n\r\n");
TCHAR *epilog = _T("\r\n-----END PGP MESSAGE-----\r\n");
- size_t len = _tcslen(prolog) + _tcslen(ptszText) + _tcslen(epilog) + 3;
+ size_t len = mir_tstrlen(prolog) + mir_tstrlen(ptszText) + mir_tstrlen(epilog) + 3;
TCHAR *tempstring = (TCHAR*)_alloca(sizeof(TCHAR)*len);
mir_sntprintf(tempstring, len, _T("%s%s%s"), prolog, ptszText, epilog);
szMessage = tempstring;
@@ -1265,7 +1265,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
else if (!_tcscmp(ptszXmlns, JABBER_FEAT_OOB2)) {
LPCTSTR ptszUrl = xmlGetText(xmlGetChild(xNode, "url"));
if (ptszUrl != NULL && *ptszUrl) {
- size_t cbLen = (szMessage ? _tcslen(szMessage) : 0) + _tcslen(ptszUrl) + 32;
+ size_t cbLen = (szMessage ? mir_tstrlen(szMessage) : 0) + mir_tstrlen(ptszUrl) + 32;
TCHAR *szTmp = (TCHAR *)alloca(sizeof(TCHAR)* cbLen);
_tcscpy(szTmp, ptszUrl);
if (szMessage) {
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index 68a08b7449..91cbcd76b9 100644
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -257,7 +257,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti
// Idle
if (r->m_dwIdleStartTime > 0) {
mir_tstrncpy(buf, _tctime(&r->m_dwIdleStartTime), SIZEOF(buf));
- size_t len = _tcslen(buf);
+ size_t len = mir_tstrlen(buf);
if (len > 0)
buf[len-1] = 0;
}
@@ -366,7 +366,7 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM
JABBER_RESOURCE_STATUS *r = item->getTemp();
if (r->m_dwIdleStartTime > 0) {
mir_tstrncpy(buf, _tctime(&r->m_dwIdleStartTime), SIZEOF(buf));
- size_t len = _tcslen(buf);
+ size_t len = mir_tstrlen(buf);
if (len > 0)
buf[len-1] = 0;
}
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index 5416ffa74f..e82202ade2 100644
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -75,7 +75,7 @@ MCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, BOOL bStripResource)
if (bIsChat)
result = mir_tstrcmpi(jid, dbJid); // for chat room we have to have full contact matched
else if (TRUE)
- result = _tcsnicmp(jid, dbJid, _tcslen(dbJid));
+ result = _tcsnicmp(jid, dbJid, mir_tstrlen(dbJid));
else
result = JabberCompareJids(jid, dbJid);
}
diff --git a/protocols/JabberG/src/jabber_xml.cpp b/protocols/JabberG/src/jabber_xml.cpp
index 813a6c5cea..616ee41f0f 100644
--- a/protocols/JabberG/src/jabber_xml.cpp
+++ b/protocols/JabberG/src/jabber_xml.cpp
@@ -246,7 +246,7 @@ HXML __fastcall xmlGetNthChild(HXML hXml, LPCTSTR tag, int nth)
{
int i, num;
- if (!hXml || tag == NULL || _tcslen(tag) <= 0 || nth < 1)
+ if (!hXml || tag == NULL || mir_tstrlen(tag) <= 0 || nth < 1)
return NULL;
num = 1;