summaryrefslogtreecommitdiff
path: root/protocols/YAMN/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
commit1039b2829a264280493ba0fa979214fe024dc70c (patch)
tree8fa6a60eb46627582c372b56a4a1d4754d6732c3 /protocols/YAMN/src
parent62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff)
WORD -> uint16_t
Diffstat (limited to 'protocols/YAMN/src')
-rw-r--r--protocols/YAMN/src/account.cpp10
-rw-r--r--protocols/YAMN/src/browser/mailbrowser.cpp2
-rw-r--r--protocols/YAMN/src/proto/pop3/pop3comm.cpp6
-rw-r--r--protocols/YAMN/src/proto/pop3/pop3comm.h2
-rw-r--r--protocols/YAMN/src/proto/pop3/pop3opt.cpp4
-rw-r--r--protocols/YAMN/src/stdafx.h2
-rw-r--r--protocols/YAMN/src/synchro.cpp2
-rw-r--r--protocols/YAMN/src/yamn.cpp2
8 files changed, 15 insertions, 15 deletions
diff --git a/protocols/YAMN/src/account.cpp b/protocols/YAMN/src/account.cpp
index 43af27579c..302249841e 100644
--- a/protocols/YAMN/src/account.cpp
+++ b/protocols/YAMN/src/account.cpp
@@ -505,8 +505,8 @@ DWORD ReadAccountFromMemory(CAccount *Which, char **Parser, char *End)
if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Name))
#endif
return Stat;
- Which->Server->Port = *(WORD *)(*Parser);
- (*Parser) += sizeof(WORD);
+ Which->Server->Port = *(uint16_t *)(*Parser);
+ (*Parser) += sizeof(uint16_t);
if (*Parser >= End)
return EACC_FILECOMPATIBILITY;
#ifdef DEBUG_FILEREAD
@@ -550,9 +550,9 @@ DWORD ReadAccountFromMemory(CAccount *Which, char **Parser, char *End)
#endif
//Read account miscellaneous parameters
- Which->Interval = *(WORD *)(*Parser);
+ Which->Interval = *(uint16_t *)(*Parser);
Which->TimeLeft = Which->Interval; //check on loading
- (*Parser) += sizeof(WORD);
+ (*Parser) += sizeof(uint16_t);
if (*Parser >= End)
return EACC_FILECOMPATIBILITY;
#ifdef DEBUG_FILEREAD
@@ -885,7 +885,7 @@ static INT_PTR PerformAccountWriting(HYAMNPROTOPLUGIN Plugin, HANDLE File)
(!WriteFile(File, (char *)&ActualAccount->PluginFlags, sizeof(DWORD), &WrittenBytes, nullptr))))
throw (DWORD)EACC_SYSTEM;
- if (!WriteFile(File, (char *)&ActualAccount->Interval, sizeof(WORD), &WrittenBytes, nullptr))
+ if (!WriteFile(File, (char *)&ActualAccount->Interval, sizeof(uint16_t), &WrittenBytes, nullptr))
throw (DWORD)EACC_SYSTEM;
if ((!WriteFile(File, (char *)&ActualAccount->NewMailN.Flags, sizeof(DWORD), &WrittenBytes, nullptr)) ||
diff --git a/protocols/YAMN/src/browser/mailbrowser.cpp b/protocols/YAMN/src/browser/mailbrowser.cpp
index 4c0b3c285f..80b379d2f2 100644
--- a/protocols/YAMN/src/browser/mailbrowser.cpp
+++ b/protocols/YAMN/src/browser/mailbrowser.cpp
@@ -1084,7 +1084,7 @@ void FileTimeToLocalizedDateTime(LONGLONG filetime, wchar_t *dateout, int lendat
return;
}
SYSTEMTIME st;
- WORD wTodayYear = 0, wTodayMonth = 0, wTodayDay = 0;
+ uint16_t wTodayYear = 0, wTodayMonth = 0, wTodayDay = 0;
FILETIME ft;
BOOL willShowDate = !(optDateTime&SHOWDATENOTODAY);
if (!willShowDate) {
diff --git a/protocols/YAMN/src/proto/pop3/pop3comm.cpp b/protocols/YAMN/src/proto/pop3/pop3comm.cpp
index 526ffaad03..bd6b72bd11 100644
--- a/protocols/YAMN/src/proto/pop3/pop3comm.cpp
+++ b/protocols/YAMN/src/proto/pop3/pop3comm.cpp
@@ -354,7 +354,7 @@ DWORD WINAPI WritePOP3Options(HANDLE File, CAccount *Which)
DWORD Ver = POP3_FILEVERSION;
if ((!WriteFile(File, (char *)&Ver, sizeof(DWORD), &WrittenBytes, nullptr)) ||
- (!WriteFile(File, (char *)&((HPOP3ACCOUNT)Which)->CP, sizeof(WORD), &WrittenBytes, nullptr)))
+ (!WriteFile(File, (char *)&((HPOP3ACCOUNT)Which)->CP, sizeof(uint16_t), &WrittenBytes, nullptr)))
return EACC_SYSTEM;
return 0;
}
@@ -372,8 +372,8 @@ DWORD WINAPI ReadPOP3Options(CAccount *Which, char **Parser, char *End)
if (Ver != POP3_FILEVERSION)
return EACC_FILECOMPATIBILITY;
- ((HPOP3ACCOUNT)Which)->CP = *(WORD *)(*Parser);
- (*Parser) += sizeof(WORD);
+ ((HPOP3ACCOUNT)Which)->CP = *(uint16_t *)(*Parser);
+ (*Parser) += sizeof(uint16_t);
if (*Parser >= End)
return EACC_FILECOMPATIBILITY;
#ifdef DEBUG_FILEREAD
diff --git a/protocols/YAMN/src/proto/pop3/pop3comm.h b/protocols/YAMN/src/proto/pop3/pop3comm.h
index 3d98675d3c..4abae49281 100644
--- a/protocols/YAMN/src/proto/pop3/pop3comm.h
+++ b/protocols/YAMN/src/proto/pop3/pop3comm.h
@@ -15,7 +15,7 @@ typedef struct CPOP3Account: public CAccount
class CPop3Client Client;
// This member is usefull for MIME headers. It is default codepage, if no other codepage found
- WORD CP; //access only through AccountAccessSO
+ uint16_t CP; //access only through AccountAccessSO
// In this memeber last error code is stored
DWORD SystemError; //access through UseInternetFree
diff --git a/protocols/YAMN/src/proto/pop3/pop3opt.cpp b/protocols/YAMN/src/proto/pop3/pop3opt.cpp
index a24eba24e2..dd85484a37 100644
--- a/protocols/YAMN/src/proto/pop3/pop3opt.cpp
+++ b/protocols/YAMN/src/proto/pop3/pop3opt.cpp
@@ -78,7 +78,7 @@ INT_PTR CALLBACK DlgProcPluginOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM)
case WM_COMMAND:
{
- WORD wNotifyCode = HIWORD(wParam);
+ uint16_t wNotifyCode = HIWORD(wParam);
switch (LOWORD(wParam)) {
case IDC_COMBOPLUGINS:
if (wNotifyCode == CBN_SELCHANGE) {
@@ -1158,7 +1158,7 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
case WM_COMMAND:
{
- WORD wNotifyCode = HIWORD(wParam);
+ uint16_t wNotifyCode = HIWORD(wParam);
switch (LOWORD(wParam)) {
LONG Result;
case IDC_COMBOACCOUNT:
diff --git a/protocols/YAMN/src/stdafx.h b/protocols/YAMN/src/stdafx.h
index 3c9f07cd79..1925042acb 100644
--- a/protocols/YAMN/src/stdafx.h
+++ b/protocols/YAMN/src/stdafx.h
@@ -134,7 +134,7 @@ INT_PTR UnloadMailDataSvc(WPARAM wParam, LPARAM);
INT_PTR SaveMailDataSvc(WPARAM wParam, LPARAM lParam);
//From mime.cpp
-//void WINAPI ExtractHeaderFcn(char *,int,WORD,HYAMNMAIL); //already in MailExported
+//void WINAPI ExtractHeaderFcn(char *,int,uint16_t,HYAMNMAIL); //already in MailExported
struct _tcptable
{
char *NameBase, *NameSub;
diff --git a/protocols/YAMN/src/synchro.cpp b/protocols/YAMN/src/synchro.cpp
index 433f0768b6..b6007d992d 100644
--- a/protocols/YAMN/src/synchro.cpp
+++ b/protocols/YAMN/src/synchro.cpp
@@ -59,7 +59,7 @@ void WINAPI ReadDoneFcn(PSWMRG SObject);
// Note you must not read the number from memory directly, because
// CPU can stop reading thread when it has read HI-Word, then another thread
// can change the value and then OS starts the previous thread, that reads the
-// LO-WORD of DWORD. And the return value HI+LO-WORD is corrupted
+// LO-uint16_t of DWORD. And the return value HI+LO-uint16_t is corrupted
DWORD WINAPI SCGetNumberFcn(PSCOUNTER SCounter);
// Increments SCOUNTER and unsets event
diff --git a/protocols/YAMN/src/yamn.cpp b/protocols/YAMN/src/yamn.cpp
index d355ed3b13..ff5ddfceee 100644
--- a/protocols/YAMN/src/yamn.cpp
+++ b/protocols/YAMN/src/yamn.cpp
@@ -224,7 +224,7 @@ ChangeIsCountingStatusLabel:
#endif
if (((ActualAccount->isCounting) != 0) != isAccountCounting) {
ActualAccount->isCounting=isAccountCounting;
- WORD cStatus = g_plugin.getWord(ActualAccount->hContact, "Status");
+ uint16_t cStatus = g_plugin.getWord(ActualAccount->hContact, "Status");
switch (cStatus) {
case ID_STATUS_ONLINE:
case ID_STATUS_OFFLINE: