summaryrefslogtreecommitdiff
path: root/src/modules
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 /src/modules
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 'src/modules')
-rw-r--r--src/modules/chat/clist.cpp2
-rw-r--r--src/modules/clist/genmenu.cpp4
-rw-r--r--src/modules/clist/movetogroup.cpp2
-rw-r--r--src/modules/database/database.cpp4
-rw-r--r--src/modules/metacontacts/meta_addto.cpp2
-rw-r--r--src/modules/netlib/netlibsecurity.cpp2
-rw-r--r--src/modules/options/filter.cpp10
-rw-r--r--src/modules/options/filter.h2
-rw-r--r--src/modules/plugins/newplugins.cpp2
-rw-r--r--src/modules/utils/path.cpp2
10 files changed, 16 insertions, 16 deletions
diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp
index e86ad505fb..7d90bfe084 100644
--- a/src/modules/chat/clist.cpp
+++ b/src/modules/chat/clist.cpp
@@ -207,7 +207,7 @@ BOOL AddEvent(MCONTACT hContact, HICON hIcon, MEVENT hEvent, int type, TCHAR* fm
{
TCHAR szBuf[4096];
- if (!fmt || !fmt[0] || _tcslen(fmt) > 2000)
+ if (!fmt || !fmt[0] || mir_tstrlen(fmt) > 2000)
return FALSE;
va_list marker;
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp
index 7270447bcd..0193777539 100644
--- a/src/modules/clist/genmenu.cpp
+++ b/src/modules/clist/genmenu.cpp
@@ -936,7 +936,7 @@ HMENU BuildRecursiveMenu(HMENU hMenu, PMO_IntMenuItem pRootMenu, ListParam *para
// mi.pszName
mir_snprintf(DBString, SIZEOF(DBString), "%s_name", menuItemName);
if (!db_get_ts(NULL, MenuNameItems, DBString, &dbv)) {
- if (_tcslen(dbv.ptszVal) > 0)
+ if (mir_tstrlen(dbv.ptszVal) > 0)
replaceStrT(pmi->CustomName, dbv.ptszVal);
db_free(&dbv);
}
@@ -1073,7 +1073,7 @@ static int MO_RegisterIcon(PMO_IntMenuItem pmi, void*)
if ((p = _tcschr(p, '&')) == NULL)
break;
- memmove(p, p + 1, sizeof(TCHAR)*(_tcslen(p + 1) + 1));
+ memmove(p, p + 1, sizeof(TCHAR)*(mir_tstrlen(p + 1) + 1));
if (*p == '\0')
p++;
}
diff --git a/src/modules/clist/movetogroup.cpp b/src/modules/clist/movetogroup.cpp
index 12ec065367..5b9ca54af2 100644
--- a/src/modules/clist/movetogroup.cpp
+++ b/src/modules/clist/movetogroup.cpp
@@ -54,7 +54,7 @@ static TCHAR* PrepareGroupName(TCHAR* str)
if (p == NULL)
return mir_tstrdup(str);
- d = p = (TCHAR*)mir_alloc(sizeof(TCHAR)*(2*_tcslen(str)+1));
+ d = p = (TCHAR*)mir_alloc(sizeof(TCHAR)*(2*mir_tstrlen(str)+1));
while (*str) {
if (*str == '&')
*d++='&';
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp
index 28abf44605..292f0000ab 100644
--- a/src/modules/database/database.cpp
+++ b/src/modules/database/database.cpp
@@ -66,7 +66,7 @@ bool IsInsideRootDir(TCHAR* profiledir, bool exact)
if (exact)
return _tcsicmp(profiledir, pfd) == 0;
- return _tcsnicmp(profiledir, pfd, _tcslen(pfd)) == 0;
+ return _tcsnicmp(profiledir, pfd, mir_tstrlen(pfd)) == 0;
}
// returns 1 if the profile path was returned, without trailing slash
@@ -89,7 +89,7 @@ int getProfilePath(TCHAR *buf, size_t cch)
// returns 1 if *.dat spec is matched
int isValidProfileName(const TCHAR *name)
{
- size_t len = _tcslen(name) - 4;
+ size_t len = mir_tstrlen(name) - 4;
return len > 0 && _tcsicmp(&name[len], _T(".dat")) == 0;
}
diff --git a/src/modules/metacontacts/meta_addto.cpp b/src/modules/metacontacts/meta_addto.cpp
index 9311ff97d5..f974b2b3f8 100644
--- a/src/modules/metacontacts/meta_addto.cpp
+++ b/src/modules/metacontacts/meta_addto.cpp
@@ -52,7 +52,7 @@ static int FillList(HWND list, BOOL sort)
// get contact display name from clist
TCHAR *swzContactDisplayName = cli.pfnGetContactDisplayName(hMetaUser, 0);
// don't insert huge strings that we have to compare with later
- if (_tcslen(swzContactDisplayName) > 1023)
+ if (mir_tstrlen(swzContactDisplayName) > 1023)
swzContactDisplayName[1024] = 0;
int pos = -1;
diff --git a/src/modules/netlib/netlibsecurity.cpp b/src/modules/netlib/netlibsecurity.cpp
index 0e4151d1ad..10a322453d 100644
--- a/src/modules/netlib/netlibsecurity.cpp
+++ b/src/modules/netlib/netlibsecurity.cpp
@@ -292,7 +292,7 @@ char* NtlmCreateResponseFromChallenge(HANDLE hSecurity, const char *szChallenge,
else domainLen /= sizeof(wchar_t);
if (domainLen) {
- size_t newLoginLen = _tcslen(login) + domainLen + 1;
+ size_t newLoginLen = mir_tstrlen(login) + domainLen + 1;
TCHAR *newLogin = (TCHAR*)alloca(newLoginLen * sizeof(TCHAR));
_tcsncpy(newLogin, domainName, domainLen);
diff --git a/src/modules/options/filter.cpp b/src/modules/options/filter.cpp
index aa7e2ca7aa..982fe77399 100644
--- a/src/modules/options/filter.cpp
+++ b/src/modules/options/filter.cpp
@@ -62,7 +62,7 @@ void AddTreeViewNodes(HWND hWndDlg, PageHash key, HTREEITEM root)
item.cchTextMax = SIZEOF(title);
if (TreeView_GetItem(hWndDlg, &item))
- if (_tcslen(title) > 0)
+ if (mir_tstrlen(title) > 0)
AddFilterString(key, title);
HTREEITEM child = root;
@@ -79,7 +79,7 @@ void AddDialogString(HWND hWndDlg, const PageHash key)
{
TCHAR title[2048];
GetWindowText(hWndDlg, title, SIZEOF(title));
- if (_tcslen(title) > 0)
+ if (mir_tstrlen(title) > 0)
AddFilterString(key, title);
TCHAR szClass[64];
@@ -99,7 +99,7 @@ void AddDialogString(HWND hWndDlg, const PageHash key)
int res = ListBox_GetText(hWndDlg, i, title);
if (res != LB_ERR) {
title[SIZEOF(title) - 1] = 0;
- if (_tcslen(title) > 0)
+ if (mir_tstrlen(title) > 0)
AddFilterString(key, title);
}
}
@@ -113,7 +113,7 @@ void AddDialogString(HWND hWndDlg, const PageHash key)
title[0] = 0; //safety
ListView_GetItemText(hWndDlg, i, 0, title, SIZEOF(title));
- if (_tcslen(title) > 0)
+ if (mir_tstrlen(title) > 0)
AddFilterString(key, title);
}
return;
@@ -128,7 +128,7 @@ void AddDialogString(HWND hWndDlg, const PageHash key)
if (res != CB_ERR) {
title[SIZEOF(title) - 1] = 0;
- if (_tcslen(title) > 0)
+ if (mir_tstrlen(title) > 0)
AddFilterString(key, title);
}
}
diff --git a/src/modules/options/filter.h b/src/modules/options/filter.h
index 261c99b342..590f74a76f 100644
--- a/src/modules/options/filter.h
+++ b/src/modules/options/filter.h
@@ -36,7 +36,7 @@ void GetDialogStrings(int enableKeywordFiltering, const PageHash key, TCHAR *plu
_inline TCHAR *_tcslwr_locale(TCHAR *buf)
{
- LCMapString(Langpack_GetDefaultLocale() , LCMAP_LOWERCASE, buf, (int)_tcslen(buf), buf, (int)_tcslen(buf));
+ LCMapString(Langpack_GetDefaultLocale() , LCMAP_LOWERCASE, buf, (int)mir_tstrlen(buf), buf, (int)mir_tstrlen(buf));
return buf;
}
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp
index ff12e0d907..b2cabeecab 100644
--- a/src/modules/plugins/newplugins.cpp
+++ b/src/modules/plugins/newplugins.cpp
@@ -671,7 +671,7 @@ int LoadDefaultServiceModePlugin()
if (param == NULL || *param == 0)
return SERVICE_CONTINUE;
- size_t cbLen = _tcslen(param);
+ size_t cbLen = mir_tstrlen(param);
for (int i = 0; i < servicePlugins.getCount(); i++) {
pluginEntry *p = servicePlugins[i];
if (!_tcsnicmp(p->pluginname, param, cbLen)) {
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp
index f1fa55ea5c..0a2bccb038 100644
--- a/src/modules/utils/path.cpp
+++ b/src/modules/utils/path.cpp
@@ -194,7 +194,7 @@ static __forceinline char *GetPathVarX(char *, int code)
static __forceinline int _xcscmp(const TCHAR *s1, const TCHAR *s2) { return _tcscmp(s1, s2); }
static __forceinline int _xcsncmp(const TCHAR *s1, const TCHAR *s2, size_t n) { return _tcsncmp(s1, s2, n); }
-static __forceinline size_t _xcslen(const TCHAR *s1) { return _tcslen(s1); }
+static __forceinline size_t _xcslen(const TCHAR *s1) { return mir_tstrlen(s1); }
static __forceinline TCHAR *_xcscpy(TCHAR *s1, const TCHAR *s2) { return _tcscpy(s1, s2); }
static __forceinline TCHAR *_xcsncpy(TCHAR *s1, const TCHAR *s2, size_t n) { return _tcsncpy(s1, s2, n); }
static __forceinline TCHAR *_xstrselect(TCHAR *, char *s1, TCHAR *s2) { return s2; }