From 8ae3679aa1339ce9abee53adb69902bd6b7513dc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Jul 2016 10:31:04 +0000 Subject: hello, Unix. phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BasicHistory/src/Scheduler.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/BasicHistory/src/Scheduler.cpp') diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index 1dc8a3b79f..2185cb8212 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -176,7 +176,7 @@ bool IsValidTask(TaskOptions& to, std::list* top, std::wstring* err *errDescr = TranslateT("FTP path must contain '/' instead '\\' and start with '/'."); return false; } - if (isImportTask && to.filePath.find(_T("")) < to.filePath.length()) { + if (isImportTask && to.filePath.find(L"") < to.filePath.length()) { if (err != NULL) *err = TranslateT("Path to file"); if (errDescr != NULL) @@ -560,7 +560,7 @@ bool DoTask(TaskOptions& to) std::wstring GetFileName(const std::wstring &baseName, std::wstring contactName, std::map& existingContacts, bool replaceContact) { std::wstring str = baseName; - size_t pos = baseName.find(_T("")); + size_t pos = baseName.find(L""); if (replaceContact && pos < baseName.length()) { str = baseName.substr(0, pos); std::wstring baseName1 = contactName; @@ -581,12 +581,12 @@ std::wstring GetFileName(const std::wstring &baseName, std::wstring contactName, str += baseName.substr(pos + 9); } - pos = str.find(_T("")); + pos = str.find(L""); if (pos < str.length()) { TCHAR time[256]; SYSTEMTIME st; GetLocalTime(&st); - mir_sntprintf(time, _T("%d-%02d-%02d %02d%02d"), st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute); + mir_sntprintf(time, L"%d-%02d-%02d %02d%02d", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute); std::wstring str1 = str.substr(0, pos); str1 += time; str1 += str.substr(pos + 6); @@ -608,7 +608,7 @@ std::wstring GetDirectoryName(const std::wstring &path) void ListDirectory(const std::wstring &basePath, const std::wstring &path, std::list& files) { WIN32_FIND_DATA findFileData; - HANDLE hFind = FindFirstFile((basePath + path + _T("*")).c_str(), &findFileData); + HANDLE hFind = FindFirstFile((basePath + path + L"*").c_str(), &findFileData); if (hFind == INVALID_HANDLE_VALUE) return; @@ -617,7 +617,7 @@ void ListDirectory(const std::wstring &basePath, const std::wstring &path, std:: if (findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { std::wstring name = findFileData.cFileName; if (name != L"." && name != L"..") - ListDirectory(basePath, path + findFileData.cFileName + _T("\\"), files); + ListDirectory(basePath, path + findFileData.cFileName + L"\\", files); } else files.push_back(path + findFileData.cFileName); } @@ -1098,7 +1098,7 @@ bool FtpFiles(const std::wstring& dir, const std::wstring& filePath, const std:: std::map existingContacts; ListDirectory(dir, L"\\", files); if (files.size() > 0) { - std::wofstream stream((dir + _T("\\script.sc")).c_str()); + std::wofstream stream((dir + L"\\script.sc").c_str()); if (stream.is_open()) { std::wstring ftpDir = GetDirectoryName(filePath); ftpDir = GetFileName(ftpDir, L"", existingContacts, false); @@ -1129,7 +1129,7 @@ bool FtpFiles(const std::wstring& dir, const std::wstring& filePath, const std:: DeleteFile(log.c_str()); TCHAR cmdLine[MAX_PATH]; - mir_sntprintf(cmdLine, _T("\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc"), Options::instance->ftpExePath.c_str(), log.c_str()); + mir_sntprintf(cmdLine, L"\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc", Options::instance->ftpExePath.c_str(), log.c_str()); STARTUPINFO startupInfo = { 0 }; startupInfo.cb = sizeof(STARTUPINFO); @@ -1196,7 +1196,7 @@ bool FtpFiles(const std::wstring& dir, const std::wstring& filePath, const std:: bool FtpGetFiles(const std::wstring& dir, const std::list& files, const std::wstring& ftpName) { - std::wstring script = dir + _T("\\script.sc"); + std::wstring script = dir + L"\\script.sc"; std::wofstream stream(script.c_str()); if (stream.is_open()) { stream << "option batch continue\noption confirm off\nopen \"" @@ -1220,7 +1220,7 @@ bool FtpGetFiles(const std::wstring& dir, const std::list& files, CreateDirectory(GetDirectoryName(log).c_str(), NULL); DeleteFile(log.c_str()); TCHAR cmdLine[MAX_PATH]; - mir_sntprintf(cmdLine, _T("\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc"), Options::instance->ftpExePath.c_str(), log.c_str()); + mir_sntprintf(cmdLine, L"\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc", Options::instance->ftpExePath.c_str(), log.c_str()); STARTUPINFO startupInfo = { 0 }; PROCESS_INFORMATION processInfo; startupInfo.cb = sizeof(STARTUPINFO); -- cgit v1.2.3