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 --- plugins/BasicHistory/src/ExportManager.cpp | 6 +++--- plugins/BasicHistory/src/HistoryWindow.cpp | 4 ++-- plugins/BasicHistory/src/Options.cpp | 12 ++++++------ plugins/BasicHistory/src/RichHtmlExport.cpp | 2 +- plugins/BasicHistory/src/Searcher.cpp | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'plugins/BasicHistory/src') diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index 734ef0971d..36fc670db7 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -42,15 +42,15 @@ std::wstring GetFile(const TCHAR* ext, HWND hwnd, bool open) _tcscpy_s(extUpper, ext); extUpper[0] = std::toupper(ext[0], loc); mir_sntprintf(filter, SIZEOF(filter), TranslateT("%s Files (*.%s)"), extUpper, ext); - size_t len = _tcslen(filter) + 1; + size_t len = mir_tstrlen(filter) + 1; mir_sntprintf(filter + len, SIZEOF(filter) - len, _T("*.%s"), ext); - len += _tcslen(filter + len); + len += mir_tstrlen(filter + len); filter[++len] = 0; TCHAR stzFilePath[1024]; _tcscpy_s(stzFilePath, TranslateT("History")); _tcscat_s(stzFilePath, _T(".")); _tcscat_s(stzFilePath, ext); - len = _tcslen(stzFilePath) + 1; + len = mir_tstrlen(stzFilePath) + 1; stzFilePath[len] = 0; OPENFILENAME ofn = {0}; ofn.lStructSize = sizeof(ofn); diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 74fe25d110..5c18fcf4a5 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -1488,7 +1488,7 @@ void HistoryWindow::SelectEventGroup(int sel) } tmi.printTimeStamp(NULL, data.timestamp, formatDate, str, MAXSELECTSTR, 0); - *strLen = (unsigned int)_tcslen(str) * sizeof(TCHAR); + *strLen = (unsigned int)mir_tstrlen(str) * sizeof(TCHAR); TextSelection->SetStart(MAXLONG); TextSelection->GetFont(&TextFont); SetFontFromOptions(TextFont, caps, lastMe ? Options::OutTimestamp : Options::InTimestamp); @@ -1501,7 +1501,7 @@ void HistoryWindow::SelectEventGroup(int sel) mir_sntprintf(str, MAXSELECTSTR, _T("%s\n"), myName); else mir_sntprintf(str, MAXSELECTSTR, _T("%s\n"), contactName); - *strLen = (unsigned int)_tcslen(str) * sizeof(TCHAR); + *strLen = (unsigned int)mir_tstrlen(str) * sizeof(TCHAR); TextSelection->SetStart(MAXLONG); TextSelection->GetFont(&TextFont); SetFontFromOptions(TextFont, caps, lastMe ? Options::OutName : Options::InName); diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index 6307b9bffc..f5994e4d2c 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -806,24 +806,24 @@ bool OpenFileDlg(HWND hwndDlg, HWND hwndEdit, const TCHAR* defName, const TCHAR* _tcscpy_s(extUpper, ext); extUpper[0] = std::toupper(ext[0], loc); mir_sntprintf(filter, SIZEOF(filter), TranslateT("%s Files (*.%s)"), extUpper, ext); - size_t len = _tcslen(filter) + 1; + size_t len = mir_tstrlen(filter) + 1; mir_sntprintf(filter + len, SIZEOF(filter) - len, _T("*.%s"), ext); - len += _tcslen(filter + len) + 1; + len += mir_tstrlen(filter + len) + 1; _tcscpy_s(filter + len, 1024 - len, TranslateT("All Files (*.*)")); - len += _tcslen(filter + len) + 1; + len += mir_tstrlen(filter + len) + 1; _tcscpy_s(filter + len, 1024 - len, _T("*.*")); - len += _tcslen(filter + len) + 1; + len += mir_tstrlen(filter + len) + 1; filter[len] = 0; TCHAR stzFilePath[1024]; Edit_GetText(hwndEdit, stzFilePath, 1023); if (stzFilePath[0] == 0) { _tcscpy_s(stzFilePath, defName); - len = _tcslen(stzFilePath) + 1; + len = mir_tstrlen(stzFilePath) + 1; stzFilePath[len] = 0; } else { - len = _tcslen(stzFilePath) + 1; + len = mir_tstrlen(stzFilePath) + 1; stzFilePath[len] = 0; } diff --git a/plugins/BasicHistory/src/RichHtmlExport.cpp b/plugins/BasicHistory/src/RichHtmlExport.cpp index c9552f7cb8..c3c0cefbc2 100644 --- a/plugins/BasicHistory/src/RichHtmlExport.cpp +++ b/plugins/BasicHistory/src/RichHtmlExport.cpp @@ -256,7 +256,7 @@ void IcoSave(const std::wstring &fileName, HICON hicon) bool DeleteDirectory(LPCTSTR lpszDir, bool noRecycleBin = true) { - size_t len = _tcslen(lpszDir); + size_t len = mir_tstrlen(lpszDir); TCHAR *pszFrom = new TCHAR[len+2]; _tcscpy_s(pszFrom, len+2, lpszDir); pszFrom[len] = 0; diff --git a/plugins/BasicHistory/src/Searcher.cpp b/plugins/BasicHistory/src/Searcher.cpp index 6370ce783e..88a7355350 100644 --- a/plugins/BasicHistory/src/Searcher.cpp +++ b/plugins/BasicHistory/src/Searcher.cpp @@ -75,7 +75,7 @@ bool Searcher::CompareStr(std::wstring str, TCHAR *strFind) return str.find(strFind) < str.length(); size_t findid = str.find(strFind); - size_t findLen = _tcslen(strFind); + size_t findLen = mir_tstrlen(strFind); while(findid < str.length()) { if ((findid == 0 || std::isspace(str[findid - 1], loc) || std::ispunct(str[findid - 1], loc)) && (findid + findLen >= str.length() || std::isspace(str[findid + findLen], loc) || std::ispunct(str[findid + findLen], loc))) @@ -111,7 +111,7 @@ void Searcher::Find() } if (!matchCase) { std::locale loc; - std::transform(str, str + _tcslen(str), str, std::bind2nd(std::ptr_fun(mytoupper), &loc)); + std::transform(str, str + mir_tstrlen(str), str, std::bind2nd(std::ptr_fun(mytoupper), &loc)); } bool findBack1 = findBack ^ !searchForInMes; -- cgit v1.2.3