summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM/src/job_packer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FTPFileYM/src/job_packer.cpp')
-rw-r--r--plugins/FTPFileYM/src/job_packer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/FTPFileYM/src/job_packer.cpp b/plugins/FTPFileYM/src/job_packer.cpp
index 11fe8c22fe..13b3b80844 100644
--- a/plugins/FTPFileYM/src/job_packer.cpp
+++ b/plugins/FTPFileYM/src/job_packer.cpp
@@ -55,9 +55,9 @@ void PackerJob::getZipFilePath()
if (stzFileName[0] == '\0')
mir_tstrcpy(stzFileName, _T("archive"));
- GetTempPath(SIZEOF(buff), buff);
+ GetTempPath(_countof(buff), buff);
- mir_sntprintf(this->stzFilePath, SIZEOF(this->stzFilePath), _T("%s%s.zip"), buff, stzFileName);
+ mir_sntprintf(this->stzFilePath, _countof(this->stzFilePath), _T("%s%s.zip"), buff, stzFileName);
mir_tstrcpy(this->stzFileName, Utils::getFileNameFromPath(this->stzFilePath));
if (opt.bSetZipName)
@@ -254,10 +254,10 @@ void PackerJob::updateStats()
this->lastUpdateTick = dwNewTick;
double speed = ((double)this->uiReaded / 1024)/(time(NULL) - this->startTS);
- mir_sntprintf(this->tab->stzSpeed, SIZEOF(this->tab->stzSpeed), TranslateT("%0.1f kB/s"), speed);
+ mir_sntprintf(this->tab->stzSpeed, _countof(this->tab->stzSpeed), TranslateT("%0.1f kB/s"), speed);
double perc = this->uiFileSize ? ((double)this->uiReaded / this->uiFileSize) * 100 : 0;
- mir_sntprintf(this->tab->stzComplet, SIZEOF(this->tab->stzComplet), TranslateT("%0.1f%% (%d kB/%d kB)"), perc, (int)this->uiReaded/1024, (int)this->uiFileSize/1024);
+ mir_sntprintf(this->tab->stzComplet, _countof(this->tab->stzComplet), TranslateT("%0.1f%% (%d kB/%d kB)"), perc, (int)this->uiReaded/1024, (int)this->uiFileSize/1024);
TCHAR buff[256];
long s = (this->uiFileSize - this->uiReaded) / (long)(speed * 1024);
@@ -268,7 +268,7 @@ void PackerJob::updateStats()
if (d > 0) mir_sntprintf(buff, _T("%dd %02d:%02d:%02d"), d, h, m, s);
else mir_sntprintf(buff, _T("%02d:%02d:%02d"), h, m, s);
- mir_sntprintf(this->tab->stzRemain, SIZEOF(this->tab->stzRemain), TranslateT("%s (%d kB/%d kB)"), buff, (this->uiFileSize - this->uiReaded)/1024, this->uiFileSize/1024);
+ mir_sntprintf(this->tab->stzRemain, _countof(this->tab->stzRemain), TranslateT("%s (%d kB/%d kB)"), buff, (this->uiFileSize - this->uiReaded)/1024, this->uiFileSize/1024);
this->refreshTab(false);
}
@@ -338,7 +338,7 @@ void PackerJob::closeAllTabs()
void PackerJob::createToolTip()
{
TCHAR *server = mir_a2t(this->ftp->szServer);
- mir_sntprintf(uDlg->stzToolTipText, SIZEOF(uDlg->stzToolTipText),
+ mir_sntprintf(uDlg->stzToolTipText, _countof(uDlg->stzToolTipText),
TranslateT("Status: %s\r\nFile: %s\r\nServer: %s"),
this->getStatusString(),
this->stzFileName,