summaryrefslogtreecommitdiff
path: root/protocols/NewsAggregator/Src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
commitcddcd7483a7c472598af098e759e5d309024f606 (patch)
treeb0a227d6e087c41958cc84d27bc323353248aae5 /protocols/NewsAggregator/Src
parent1039b2829a264280493ba0fa979214fe024dc70c (diff)
DWORD -> uint32_t
Diffstat (limited to 'protocols/NewsAggregator/Src')
-rw-r--r--protocols/NewsAggregator/Src/CheckFeed.cpp14
-rw-r--r--protocols/NewsAggregator/Src/Services.cpp2
-rw-r--r--protocols/NewsAggregator/Src/Utils.cpp6
3 files changed, 11 insertions, 11 deletions
diff --git a/protocols/NewsAggregator/Src/CheckFeed.cpp b/protocols/NewsAggregator/Src/CheckFeed.cpp
index e8724f0c60..e5a545ba6b 100644
--- a/protocols/NewsAggregator/Src/CheckFeed.cpp
+++ b/protocols/NewsAggregator/Src/CheckFeed.cpp
@@ -159,7 +159,7 @@ static void XmlToMsg(MCONTACT hContact, CMStringW &title, CMStringW &link, CMStr
DBEVENTINFO olddbei = {};
bool MesExist = false;
T2Utf pszTemp(message);
- DWORD cbMemoLen = 10000, cbOrigLen = (DWORD)mir_strlen(pszTemp);
+ uint32_t cbMemoLen = 10000, cbOrigLen = (uint32_t)mir_strlen(pszTemp);
uint8_t *pbBuffer = (uint8_t*)mir_alloc(cbMemoLen);
DB::ECPTR pCursor(DB::EventsRev(hContact));
@@ -171,10 +171,10 @@ static void XmlToMsg(MCONTACT hContact, CMStringW &title, CMStringW &link, CMStr
db_event_get(hDbEvent, &olddbei);
// there's no need to look for the elder events
- if (stamp > 0 && olddbei.timestamp < (DWORD)stamp)
+ if (stamp > 0 && olddbei.timestamp < (uint32_t)stamp)
break;
- if ((DWORD)mir_strlen((char*)olddbei.pBlob) == cbOrigLen && !mir_strcmp((char*)olddbei.pBlob, pszTemp)) {
+ if ((uint32_t)mir_strlen((char*)olddbei.pBlob) == cbOrigLen && !mir_strcmp((char*)olddbei.pBlob, pszTemp)) {
MesExist = true;
break;
}
@@ -188,7 +188,7 @@ static void XmlToMsg(MCONTACT hContact, CMStringW &title, CMStringW &link, CMStr
T2Utf pszMessage(message);
PROTORECVEVENT recv = { 0 };
- recv.timestamp = (DWORD)stamp;
+ recv.timestamp = (uint32_t)stamp;
recv.szMessage = pszMessage;
ProtoChainRecvMsg(hContact, &recv);
}
@@ -286,7 +286,7 @@ void CheckCurrentFeed(MCONTACT hContact)
double deltaupd = difftime(time(0), stamp);
double deltacheck = difftime(time(0), (time_t)g_plugin.getDword(hContact, "LastCheck"));
if (deltaupd - deltacheck >= 0) {
- g_plugin.setDword(hContact, "LastCheck", (DWORD)time(0));
+ g_plugin.setDword(hContact, "LastCheck", (uint32_t)time(0));
return;
}
}
@@ -375,7 +375,7 @@ void CheckCurrentFeed(MCONTACT hContact)
double deltaupd = difftime(time(0), stamp);
double deltacheck = difftime(time(0), (time_t)g_plugin.getDword(hContact, "LastCheck"));
if (deltaupd - deltacheck >= 0) {
- g_plugin.setDword(hContact, "LastCheck", (DWORD)time(0));
+ g_plugin.setDword(hContact, "LastCheck", (uint32_t)time(0));
return;
}
}
@@ -431,7 +431,7 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
}
- g_plugin.setDword(hContact, "LastCheck", (DWORD)time(0));
+ g_plugin.setDword(hContact, "LastCheck", (uint32_t)time(0));
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/NewsAggregator/Src/Services.cpp b/protocols/NewsAggregator/Src/Services.cpp
index 96410b14c9..a05231779a 100644
--- a/protocols/NewsAggregator/Src/Services.cpp
+++ b/protocols/NewsAggregator/Src/Services.cpp
@@ -38,7 +38,7 @@ int NewsAggrInit(WPARAM, LPARAM)
for (auto &hContact : Contacts(MODULENAME)) {
if (!g_plugin.getByte("StartupRetrieve", 1))
- g_plugin.setDword(hContact, "LastCheck", (DWORD)time(0));
+ g_plugin.setDword(hContact, "LastCheck", (uint32_t)time(0));
g_plugin.setWord(hContact, "Status", ID_STATUS_ONLINE);
}
diff --git a/protocols/NewsAggregator/Src/Utils.cpp b/protocols/NewsAggregator/Src/Utils.cpp
index c64981e58f..1a78f35be2 100644
--- a/protocols/NewsAggregator/Src/Utils.cpp
+++ b/protocols/NewsAggregator/Src/Utils.cpp
@@ -266,7 +266,7 @@ bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal)
if (modtime > filemodtime && buf.st_size != _wtoi(tsize)) {
DWORD dwBytes;
HANDLE hFile = CreateFile(tszLocal, GENERIC_READ | GENERIC_WRITE, NULL, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
- WriteFile(hFile, pReply->pData, (DWORD)pReply->dataLength, &dwBytes, nullptr);
+ WriteFile(hFile, pReply->pData, (uint32_t)pReply->dataLength, &dwBytes, nullptr);
ret = true;
if (hFile)
CloseHandle(hFile);
@@ -276,7 +276,7 @@ bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal)
else {
DWORD dwBytes;
HANDLE hFile = CreateFile(tszLocal, GENERIC_READ | GENERIC_WRITE, NULL, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
- WriteFile(hFile, pReply->pData, (DWORD)pReply->dataLength, &dwBytes, nullptr);
+ WriteFile(hFile, pReply->pData, (uint32_t)pReply->dataLength, &dwBytes, nullptr);
ret = true;
if (hFile)
CloseHandle(hFile);
@@ -286,7 +286,7 @@ bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal)
else {
DWORD dwBytes;
HANDLE hFile = CreateFile(tszLocal, GENERIC_READ | GENERIC_WRITE, NULL, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
- WriteFile(hFile, pReply->pData, (DWORD)pReply->dataLength, &dwBytes, nullptr);
+ WriteFile(hFile, pReply->pData, (uint32_t)pReply->dataLength, &dwBytes, nullptr);
ret = true;
if (hFile)
CloseHandle(hFile);