From 5aed15a8d8d8e4f913539761be496e0d1ba2c4f0 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 24 May 2015 12:20:50 +0000 Subject: replace wcslen to mir_wstrlen git-svn-id: http://svn.miranda-ng.org/main/trunk@13813 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/IEView/src/TextToken.cpp | 10 +++++----- plugins/IEView/src/Utils.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/IEView') diff --git a/plugins/IEView/src/TextToken.cpp b/plugins/IEView/src/TextToken.cpp index e44dc5e35b..ad08ee7856 100644 --- a/plugins/IEView/src/TextToken.cpp +++ b/plugins/IEView/src/TextToken.cpp @@ -78,7 +78,7 @@ static int countNoWhitespace(const wchar_t *str) TextToken* TextToken::tokenizeBBCodes(const wchar_t *text) { - return tokenizeBBCodes(text, (int)wcslen(text)); + return tokenizeBBCodes(text, (int)mir_wstrlen(text)); } // TODO: Add the following BBCodes: code @@ -239,7 +239,7 @@ TextToken* TextToken::tokenizeLinks(const wchar_t *text) { TextToken *firstToken = NULL, *lastToken = NULL; int textLen = 0; - int l = (int)wcslen(text); + int l = (int)mir_wstrlen(text); for (int i = 0; i <= l;) { int newTokenType, newTokenSize; int urlLen = Utils::detectURL(text + i); @@ -295,7 +295,7 @@ TextToken* TextToken::tokenizeLinks(const wchar_t *text) TextToken* TextToken::tokenizeSmileys(MCONTACT hContact, const char *proto, const wchar_t *text, bool isSent) { TextToken *firstToken = NULL, *lastToken = NULL; - int l = (int)wcslen(text); + int l = (int)mir_wstrlen(text); if (!Options::isSmileyAdd()) return new TextToken(TEXT, text, l); @@ -352,7 +352,7 @@ TextToken* TextToken::tokenizeChatFormatting(const wchar_t *text) { TextToken *firstToken = NULL, *lastToken = NULL; int textLen = 0; - int l = (int)wcslen(text); + int l = (int)mir_wstrlen(text); wchar_t* tokenBuffer = new wchar_t[l + 1]; for (int i = 0; i <= l;) { int newTokenType = TEXT; @@ -521,7 +521,7 @@ void TextToken::toString(CMStringW &str) if (match != NULL) { match += 2; wchar_t *match2 = wcsstr(match, L"&"); - int len = match2 != NULL ? match2 - match : (int)wcslen(match); + int len = match2 != NULL ? match2 - match : (int)mir_wstrlen(match); match = mir_wstrdup(match); match[len] = 0; int width = 0; diff --git a/plugins/IEView/src/Utils.cpp b/plugins/IEView/src/Utils.cpp index 77def5af4b..1655b06c95 100644 --- a/plugins/IEView/src/Utils.cpp +++ b/plugins/IEView/src/Utils.cpp @@ -32,8 +32,8 @@ const wchar_t *Utils::getBaseDir() wchar_t* Utils::toAbsolute(wchar_t* relative) { const wchar_t* bdir = getBaseDir(); - long len = (int)wcslen(bdir); - long tlen = len + (int)wcslen(relative); + long len = (int)mir_wstrlen(bdir); + long tlen = len + (int)mir_wstrlen(relative); wchar_t* result = (wchar_t*)mir_alloc(sizeof(wchar_t)*(tlen + 1)); if (result) { wcscpy(result, bdir); -- cgit v1.2.3