From 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Jul 2016 09:20:25 +0000 Subject: less TCHARs: - TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BasicHistory/src/ExportManager.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'plugins/BasicHistory/src/ExportManager.cpp') diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index d783fde17f..c2168d861c 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -33,23 +33,23 @@ ExportManager::ExportManager(HWND hwnd, MCONTACT hContact, int filter) : { } -std::wstring GetFile(const TCHAR* ext, HWND hwnd, bool open) +std::wstring GetFile(const wchar_t* ext, HWND hwnd, bool open) { - TCHAR filter[512]; + wchar_t filter[512]; std::locale loc; - TCHAR extUpper[32]; + wchar_t extUpper[32]; - _tcscpy_s(extUpper, ext); + wcscpy_s(extUpper, ext); extUpper[0] = std::toupper(ext[0], loc); mir_sntprintf(filter, TranslateT("%s Files (*.%s)"), extUpper, ext); size_t len = mir_tstrlen(filter) + 1; mir_sntprintf(filter + len, _countof(filter) - len, L"*.%s", ext); len += mir_tstrlen(filter + len); filter[++len] = 0; - TCHAR stzFilePath[1024]; - _tcscpy_s(stzFilePath, TranslateT("History")); - _tcscat_s(stzFilePath, L"."); - _tcscat_s(stzFilePath, ext); + wchar_t stzFilePath[1024]; + wcscpy_s(stzFilePath, TranslateT("History")); + wcscat_s(stzFilePath, L"."); + wcscat_s(stzFilePath, ext); len = mir_tstrlen(stzFilePath) + 1; stzFilePath[len] = 0; OPENFILENAME ofn = {0}; @@ -75,7 +75,7 @@ std::wstring GetFile(const TCHAR* ext, HWND hwnd, bool open) return L""; } -std::wstring ReplaceExt(const std::wstring& file, const TCHAR* ext) +std::wstring ReplaceExt(const std::wstring& file, const wchar_t* ext) { size_t pos = file.find(L""); if (pos < file.length()) { @@ -178,7 +178,7 @@ bool ExportManager::Export(IExport::ExportType type) return true; } -const TCHAR* ExportManager::GetExt(IImport::ImportType type) +const wchar_t* ExportManager::GetExt(IImport::ImportType type) { IImport *imp = NULL; switch(type) { @@ -192,7 +192,7 @@ const TCHAR* ExportManager::GetExt(IImport::ImportType type) return L""; } - const TCHAR *ext = imp->GetExt(); + const wchar_t *ext = imp->GetExt(); delete imp; return ext; } @@ -294,7 +294,7 @@ void ExportManager::AddGroup(bool isMe, const std::wstring &time, const std::wst return; m_exp->WriteGroup(isMe, time, user, eventText); - TCHAR str[MAXSELECTSTR + 8]; // for safety reason + wchar_t str[MAXSELECTSTR + 8]; // for safety reason str[0] = 0; bool isFirst = true; bool lastMe = false; @@ -312,8 +312,8 @@ void ExportManager::AddGroup(bool isMe, const std::wstring &time, const std::wst if (GetEventData(hDbEvent, data)) { lastMe = data.isMe; - TCHAR* formatDate = Options::instance->messagesShowSec ? L"d s" : L"d t"; - TCHAR* longFormatDate = Options::instance->messagesShowSec ? L"d s" : L"d t"; + wchar_t* formatDate = Options::instance->messagesShowSec ? L"d s" : L"d t"; + wchar_t* longFormatDate = Options::instance->messagesShowSec ? L"d s" : L"d t"; if (!Options::instance->messagesShowDate) { if (isFirst) { isFirst = false; -- cgit v1.2.3