diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/FTPFileYM/src/job_packer.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
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
Diffstat (limited to 'plugins/FTPFileYM/src/job_packer.cpp')
-rw-r--r-- | plugins/FTPFileYM/src/job_packer.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/FTPFileYM/src/job_packer.cpp b/plugins/FTPFileYM/src/job_packer.cpp index 3a6b037d5a..135b06e665 100644 --- a/plugins/FTPFileYM/src/job_packer.cpp +++ b/plugins/FTPFileYM/src/job_packer.cpp @@ -35,20 +35,20 @@ PackerJob::PackerJob(MCONTACT hContact, int iFtpNum, EMode mode) : void PackerJob::getZipFilePath()
{
- TCHAR buff[256], stzFileName[256] = { 0 };
- TCHAR *pch;
+ wchar_t buff[256], stzFileName[256] = { 0 };
+ wchar_t *pch;
if (m_files.size() == 1) {
mir_tstrcpy(stzFileName, Utils::getFileNameFromPath(m_files[0]));
- pch = _tcsrchr(stzFileName, '.');
+ pch = wcsrchr(stzFileName, '.');
if (pch) *pch = 0;
}
else {
mir_tstrcpy(buff, m_files[0]);
- pch = _tcsrchr(buff, '\\');
+ pch = wcsrchr(buff, '\\');
if (pch) {
*pch = 0;
- pch = _tcsrchr(buff, '\\');
+ pch = wcsrchr(buff, '\\');
if (pch) mir_tstrcpy(stzFileName, pch + 1);
}
}
@@ -109,7 +109,7 @@ void PackerJob::pack() {
struct _stat fileInfo;
for (UINT i = 0; i < m_files.size(); i++) {
- if (_tstat(m_files[i], &fileInfo) == 0)
+ if (_wstat(m_files[i], &fileInfo) == 0)
m_uiFileSize += (UINT64)fileInfo.st_size;
}
@@ -161,7 +161,7 @@ int PackerJob::createZipFile() FREE(file);
if (err == ZIP_OK) {
- FILE *fin = _tfopen(m_files[i], L"rb");
+ FILE *fin = _wfopen(m_files[i], L"rb");
if (fin) {
do {
if (isCanceled()) {
@@ -209,7 +209,7 @@ Cleanup: return result;
}
-uLong PackerJob::getFileTime(TCHAR *file, tm_zip*, uLong *dt)
+uLong PackerJob::getFileTime(wchar_t *file, tm_zip*, uLong *dt)
{
FILETIME ftLocal;
HANDLE hFind;
@@ -238,7 +238,7 @@ void PackerJob::updateStats() double perc = m_uiFileSize ? ((double)m_uiReaded / m_uiFileSize) * 100 : 0;
mir_sntprintf(m_tab->m_stzComplet, TranslateT("%0.1f%% (%d kB/%d kB)"), perc, (int)m_uiReaded / 1024, (int)m_uiFileSize / 1024);
- TCHAR buff[256];
+ wchar_t buff[256];
long s = (m_uiFileSize - m_uiReaded) / (long)(speed * 1024);
int d = (s / 60 / 60 / 24);
int h = (s - d * 60 * 60 * 24) / 60 / 60;
|