From b499ebc740aa5480be013d40e0d8097066800642 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 10:18:21 +0000 Subject: replace _tcslen to mir_tstrlen git-svn-id: http://svn.miranda-ng.org/main/trunk@13748 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdfile/src/fileexistsdlg.cpp | 4 ++-- src/core/stdfile/src/fileopts.cpp | 2 +- src/core/stdfile/src/filexferdlg.cpp | 6 +++--- src/core/stdmsg/src/msgdialog.cpp | 6 +++--- src/core/stdmsg/src/msglog.cpp | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/core') diff --git a/src/core/stdfile/src/fileexistsdlg.cpp b/src/core/stdfile/src/fileexistsdlg.cpp index 3c15484676..959a14ccdd 100644 --- a/src/core/stdfile/src/fileexistsdlg.cpp +++ b/src/core/stdfile/src/fileexistsdlg.cpp @@ -289,9 +289,9 @@ INT_PTR CALLBACK DlgProcFileExists(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY; _tcsncpy(filter, TranslateT("All files"),SIZEOF(filter)-1); _tcscat(filter, _T(" (*)")); - pfilter = filter + _tcslen(filter) + 1; + pfilter = filter + mir_tstrlen(filter) + 1; _tcscpy(pfilter, _T("*")); - pfilter = pfilter + _tcslen(pfilter) + 1; + pfilter = pfilter + mir_tstrlen(pfilter) + 1; *pfilter = '\0'; ofn.lpstrFilter = filter; ofn.lpstrFile = str; diff --git a/src/core/stdfile/src/fileopts.cpp b/src/core/stdfile/src/fileopts.cpp index 8fc3cfc8b3..63c1cdcec1 100644 --- a/src/core/stdfile/src/fileopts.cpp +++ b/src/core/stdfile/src/fileopts.cpp @@ -180,7 +180,7 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L TCHAR *pszQuote = _tcschr(str + 1, '"'); if (pszQuote) *pszQuote = 0; - memmove(str, str + 1, (_tcslen(str) * sizeof(TCHAR))); + memmove(str, str + 1, (mir_tstrlen(str) * sizeof(TCHAR))); } else { TCHAR *pszSpace = _tcschr(str, ' '); diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp index c89c518fa4..2af724720a 100644 --- a/src/core/stdfile/src/filexferdlg.cpp +++ b/src/core/stdfile/src/filexferdlg.cpp @@ -102,8 +102,8 @@ static void __cdecl RunVirusScannerThread(struct virusscanthreadstartinfo *info) TCHAR *pszReplace = _tcsstr(dbv.ptszVal, _T("%f")); TCHAR szCmdLine[768]; if (pszReplace) { - if (info->szFile[_tcslen(info->szFile) - 1] == '\\') - info->szFile[_tcslen(info->szFile) - 1] = '\0'; + if (info->szFile[mir_tstrlen(info->szFile) - 1] == '\\') + info->szFile[mir_tstrlen(info->szFile) - 1] = '\0'; *pszReplace = 0; mir_sntprintf(szCmdLine, SIZEOF(szCmdLine), _T("%s\"%s\"%s"), dbv.ptszVal, info->szFile, pszReplace + 2); } else @@ -414,7 +414,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR pszFilename++; if (pszFilename) { - size_t cbFileNameLen = _tcslen(pszFilename); + size_t cbFileNameLen = mir_tstrlen(pszFilename); pszNewFileName = (TCHAR*)mir_alloc(cbFileNameLen * 2 * sizeof(TCHAR)); TCHAR *p = pszNewFileName; diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index af2c574587..64a8ec7625 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -55,7 +55,7 @@ static void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type) static int RTL_Detect(const TCHAR *ptszText) { - int iLen = (int)_tcslen(ptszText); + int iLen = (int)mir_tstrlen(ptszText); WORD *infoTypeC2 = (WORD*)alloca(sizeof(WORD)* (iLen + 2)); GetStringTypeEx(LOCALE_USER_DEFAULT, CT_CTYPE2, ptszText, iLen, infoTypeC2); @@ -965,7 +965,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP } if (buf[0] && OpenClipboard(hwndDlg)) { EmptyClipboard(); - HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, _tcslen(buf) * sizeof(TCHAR)+1); + HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, mir_tstrlen(buf) * sizeof(TCHAR)+1); _tcscpy((TCHAR*)GlobalLock(hData), buf); GlobalUnlock(hData); SetClipboardData(CF_UNICODETEXT, hData); @@ -1617,7 +1617,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case IDM_COPYLINK: if (OpenClipboard(hwndDlg)) { EmptyClipboard(); - HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (_tcslen(tr.lpstrText) + 1) * sizeof(TCHAR)); + HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (mir_tstrlen(tr.lpstrText) + 1) * sizeof(TCHAR)); _tcscpy((TCHAR*)GlobalLock(hData), tr.lpstrText); GlobalUnlock(hData); SetClipboardData(CF_UNICODETEXT, hData); diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index aa8cf996f3..f3e13ccd9d 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -78,7 +78,7 @@ static int AppendToBufferWithRTF(char *&buffer, size_t &cbBufferEnd, size_t &cbB if (line == NULL) return 0; - size_t lineLen = _tcslen(line) * 9 + 8; + size_t lineLen = mir_tstrlen(line) * 9 + 8; if (cbBufferEnd + lineLen > cbBufferAlloced) { cbBufferAlloced += lineLen + 1024 - lineLen % 1024; buffer = (char*)mir_realloc(buffer, cbBufferAlloced); @@ -110,7 +110,7 @@ static int AppendToBufferWithRTF(char *&buffer, size_t &cbBufferEnd, size_t &cbB int i, found = 0; for (i = 0; i < SIZEOF(bbcodes); ++i) { if (line[1] == bbcodes[i][1]) { - size_t lenb = _tcslen(bbcodes[i]); + size_t lenb = mir_tstrlen(bbcodes[i]); if (!_tcsnicmp(line, bbcodes[i], lenb)) { size_t len = mir_strlen(bbcodefmt[i]); memcpy(d, bbcodefmt[i], len); -- cgit v1.2.3