diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 17:06:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 17:06:04 +0300 |
commit | 1039b2829a264280493ba0fa979214fe024dc70c (patch) | |
tree | 8fa6a60eb46627582c372b56a4a1d4754d6732c3 /plugins/TabSRMM/src | |
parent | 62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff) |
WORD -> uint16_t
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/TSButton.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_log.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_manager.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_options.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/containeroptions.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/controls.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/eventpopups.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/nen.h | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/themes.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/typingnotify.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/utils.cpp | 8 |
16 files changed, 36 insertions, 36 deletions
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp index 865604457f..7102c19efd 100644 --- a/plugins/TabSRMM/src/TSButton.cpp +++ b/plugins/TabSRMM/src/TSButton.cpp @@ -439,7 +439,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L bct->stateId = PBS_PRESSED;
else if (LOWORD(lParam) > rc.right - 12) {
if (GetDlgCtrlID(hwndDlg) == IDOK || bct->stateId != PBS_DISABLED) {
- WORD w = LOWORD((INT_PTR)bct->arrow);
+ uint16_t w = LOWORD((INT_PTR)bct->arrow);
SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKELONG(w, BN_CLICKED), (LPARAM)hwndDlg);
}
}
diff --git a/plugins/TabSRMM/src/chat_log.cpp b/plugins/TabSRMM/src/chat_log.cpp index d7dd0eb440..cd733f019c 100644 --- a/plugins/TabSRMM/src/chat_log.cpp +++ b/plugins/TabSRMM/src/chat_log.cpp @@ -214,7 +214,7 @@ static void Log_AppendRTF(LOGSTREAMDATA *streamData, bool simpleMode, CMStringA else if (*line > 0 && *line < 128) {
res.AppendChar((char)*line);
}
- else res.AppendFormat("\\u%u ?", (WORD)*line);
+ else res.AppendFormat("\\u%u ?", (uint16_t)*line);
}
str += res;
diff --git a/plugins/TabSRMM/src/chat_manager.cpp b/plugins/TabSRMM/src/chat_manager.cpp index 4219dd649b..0cf8c324c6 100644 --- a/plugins/TabSRMM/src/chat_manager.cpp +++ b/plugins/TabSRMM/src/chat_manager.cpp @@ -46,8 +46,8 @@ static int sttCompareNicknames(const wchar_t *s1, const wchar_t *s2) int UM_CompareItem(const USERINFO *u1, const USERINFO *u2)
{
- WORD dw1 = u1->Status;
- WORD dw2 = u2->Status;
+ uint16_t dw1 = u1->Status;
+ uint16_t dw2 = u2->Status;
for (int i = 0; i < 8; i++) {
if ((dw1 & 1) && !(dw2 & 1))
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp index 7720be1954..a08f5effc6 100644 --- a/plugins/TabSRMM/src/chat_options.cpp +++ b/plugins/TabSRMM/src/chat_options.cpp @@ -677,7 +677,7 @@ public: g_chatApi.SM_InvalidateLogDirectories();
iLen = SendDlgItemMessage(m_hwnd, IDC_CHAT_SPIN4, UDM_GETPOS, 0, 0);
- db_set_w(0, CHAT_MODULE, "LoggingLimit", (WORD)iLen);
+ db_set_w(0, CHAT_MODULE, "LoggingLimit", (uint16_t)iLen);
iLen = SendDlgItemMessage(m_hwnd, IDC_CHAT_SPIN3, UDM_GETPOS, 0, 0);
if (iLen > 0)
@@ -722,7 +722,7 @@ public: db_set_b(0, CHAT_MODULE, "LogSymbols", lr == 2);
iLen = SendDlgItemMessage(m_hwnd, IDC_CHAT_SPIN2, UDM_GETPOS, 0, 0);
- db_set_w(0, CHAT_MODULE, "LogLimit", (WORD)iLen);
+ db_set_w(0, CHAT_MODULE, "LogLimit", (uint16_t)iLen);
mir_free(pszText);
if (g_chatApi.hListBkgBrush)
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 5656f3c263..b66b923f18 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -131,7 +131,7 @@ void CContactCache::updateMeta() MCONTACT hOldSub = m_hSub; m_hSub = db_mc_getSrmmSub(cc->contactID); m_szMetaProto = Proto_GetBaseAccountName(m_hSub); - m_iMetaStatus = (WORD)db_get_w(m_hSub, m_szMetaProto, "Status", ID_STATUS_OFFLINE); + m_iMetaStatus = (uint16_t)db_get_w(m_hSub, m_szMetaProto, "Status", ID_STATUS_OFFLINE); PROTOACCOUNT *pa = Proto_GetAccount(m_szMetaProto); if (pa) m_szAccount = pa->tszAccountName; diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index e56b3f0aed..f38dcb48c2 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -271,11 +271,11 @@ static INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM w case IDC_APPLY:
SendMessage(hwndDlg, DM_SC_BUILDLIST, 0, (LPARAM)pContainer->m_pSettings);
- pContainer->m_pSettings->dwTransparency = MAKELONG((WORD)SendDlgItemMessage(hwndDlg, IDC_TRANSPARENCY_ACTIVE, TBM_GETPOS, 0, 0),
- (WORD)SendDlgItemMessage(hwndDlg, IDC_TRANSPARENCY_INACTIVE, TBM_GETPOS, 0, 0));
+ pContainer->m_pSettings->dwTransparency = MAKELONG((uint16_t)SendDlgItemMessage(hwndDlg, IDC_TRANSPARENCY_ACTIVE, TBM_GETPOS, 0, 0),
+ (uint16_t)SendDlgItemMessage(hwndDlg, IDC_TRANSPARENCY_INACTIVE, TBM_GETPOS, 0, 0));
- pContainer->m_pSettings->avatarMode = (WORD)SendDlgItemMessage(hwndDlg, IDC_AVATARMODE, CB_GETCURSEL, 0, 0);
- pContainer->m_pSettings->ownAvatarMode = (WORD)SendDlgItemMessage(hwndDlg, IDC_OWNAVATARMODE, CB_GETCURSEL, 0, 0);
+ pContainer->m_pSettings->avatarMode = (uint16_t)SendDlgItemMessage(hwndDlg, IDC_AVATARMODE, CB_GETCURSEL, 0, 0);
+ pContainer->m_pSettings->ownAvatarMode = (uint16_t)SendDlgItemMessage(hwndDlg, IDC_OWNAVATARMODE, CB_GETCURSEL, 0, 0);
GetDlgItemText(hwndDlg, IDC_TITLEFORMAT, pContainer->m_pSettings->szTitleFormat, TITLE_FORMATLEN);
pContainer->m_pSettings->szTitleFormat[TITLE_FORMATLEN - 1] = 0;
@@ -503,7 +503,7 @@ do_apply: Utils::enableDlgControl(hwndDlg, IDC_APPLY, true); cs->flags = newFlags;
cs->flagsEx = newFlagsEx;
- cs->autoCloseSeconds = (WORD)SendDlgItemMessage(hwndDlg, IDC_AUTOCLOSETABSPIN, UDM_GETPOS, 0, 0);
+ cs->autoCloseSeconds = (uint16_t)SendDlgItemMessage(hwndDlg, IDC_AUTOCLOSETABSPIN, UDM_GETPOS, 0, 0);
}
break;
diff --git a/plugins/TabSRMM/src/controls.h b/plugins/TabSRMM/src/controls.h index 5def6f0335..7a1c083d92 100644 --- a/plugins/TabSRMM/src/controls.h +++ b/plugins/TabSRMM/src/controls.h @@ -40,7 +40,7 @@ public: ~CMenuBar();
const RECT& getClientRect();
- void Resize(WORD wWidth) const
+ void Resize(uint16_t wWidth) const
{
::SetWindowPos(m_hwndToolbar, nullptr, 4, 0, wWidth, m_size_y, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS | SWP_NOREDRAW);
}
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 975d3fa5d4..82caf1009b 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -247,7 +247,7 @@ static wchar_t* ShortenPreview(DBEVENTINFO *dbe) return buf;
}
-static wchar_t* GetPreviewT(WORD eventType, DBEVENTINFO *dbe)
+static wchar_t* GetPreviewT(uint16_t eventType, DBEVENTINFO *dbe)
{
char *pBlob = (char*)dbe->pBlob;
@@ -415,7 +415,7 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, MEVENT hEve else
wcsncpy_s(pud.lpwzContactName, _A2T(dbe.szModule), _TRUNCATE);
- wchar_t *szPreview = GetPreviewT((WORD)eventType, &dbe);
+ wchar_t *szPreview = GetPreviewT((uint16_t)eventType, &dbe);
if (szPreview) {
wcsncpy_s(pud.lpwzText, szPreview, _TRUNCATE);
mir_free(szPreview);
@@ -708,7 +708,7 @@ void Popup_Options(WPARAM wParam) g_plugin.addOptions(wParam, &odp);
}
-int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto)
+int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, uint16_t eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto)
{
if (nen_options.iDisable) // no popups at all. Period
return 0;
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 26ba257f8e..d80846dc20 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -519,7 +519,7 @@ void CMsgDialog::DM_InitRichEdit() cf2.crBackColor = m_pContainer->m_theme.inputbg; wcsncpy_s(cf2.szFaceName, lf.lfFaceName, _TRUNCATE); cf2.dwEffects = 0; - cf2.wWeight = (WORD)lf.lfWeight; + cf2.wWeight = (uint16_t)lf.lfWeight; cf2.bPitchAndFamily = lf.lfPitchAndFamily; cf2.yHeight = abs(lf.lfHeight) * 15; } @@ -536,7 +536,7 @@ void CMsgDialog::DM_InitRichEdit() cf2.bCharSet = lf.lfCharSet; wcsncpy_s(cf2.szFaceName, lf.lfFaceName, _TRUNCATE); cf2.dwEffects = ((lf.lfWeight >= FW_BOLD) ? CFE_BOLD : 0) | (lf.lfItalic ? CFE_ITALIC : 0) | (lf.lfUnderline ? CFE_UNDERLINE : 0) | (lf.lfStrikeOut ? CFE_STRIKEOUT : 0); - cf2.wWeight = (WORD)lf.lfWeight; + cf2.wWeight = (uint16_t)lf.lfWeight; cf2.bPitchAndFamily = lf.lfPitchAndFamily; cf2.yHeight = abs(lf.lfHeight) * 15; } @@ -608,7 +608,7 @@ void CMsgDialog::DM_SetDBButtonStates() result = (db_get_b(hFinalContact, szModule, szSetting, 0) == buttonItem->bValuePush[0]); break; case DBVT_WORD: - result = (db_get_w(hFinalContact, szModule, szSetting, 0) == *((WORD *)&buttonItem->bValuePush)); + result = (db_get_w(hFinalContact, szModule, szSetting, 0) == *((uint16_t *)&buttonItem->bValuePush)); break; case DBVT_DWORD: result = (db_get_dw(hFinalContact, szModule, szSetting, 0) == *((DWORD *)&buttonItem->bValuePush)); diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 150faf6c00..b8ba8a3202 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -509,8 +509,8 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c) if (Proto_GetStatus(c->getProto()) == ID_STATUS_OFFLINE || db_get_b(hContact, c->getProto(), "ChatRoom", 0))
return;
- WORD wStatus = LOWORD(wParam);
- WORD wOldStatus = HIWORD(wParam);
+ uint16_t wStatus = LOWORD(wParam);
+ uint16_t wOldStatus = HIWORD(wParam);
if (wStatus == wOldStatus)
return;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 41ad17acfc..58a44987f9 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -1517,7 +1517,7 @@ void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb) db_set_b(0, cb->dbModule, cb->dbSetting, (uint8_t)value);
break;
case DBVT_WORD:
- db_set_w(0, cb->dbModule, cb->dbSetting, (WORD)value);
+ db_set_w(0, cb->dbModule, cb->dbSetting, (uint16_t)value);
break;
case DBVT_DWORD:
db_set_dw(0, cb->dbModule, cb->dbSetting, (DWORD)value);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index e1d57835c1..90f2a5e9ad 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -268,9 +268,9 @@ struct TContainerSettings DWORD panelheight;
int iSplitterX, iSplitterY;
wchar_t szTitleFormat[TITLE_FORMATLEN + 2];
- WORD avatarMode;
- WORD ownAvatarMode;
- WORD autoCloseSeconds;
+ uint16_t avatarMode;
+ uint16_t ownAvatarMode;
+ uint16_t autoCloseSeconds;
bool fPrivate;
};
@@ -324,7 +324,7 @@ struct TContainerData : public MZeroedObject HBITMAP m_hbmToolbarBG, m_oldhbmToolbarBG;
SIZE m_szOldToolbarSize;
SIZE m_oldSize, m_preSIZE;
- WORD m_avatarMode, m_ownAvatarMode;
+ uint16_t m_avatarMode, m_ownAvatarMode;
uint8_t m_bTBRenderingMode;
TLogTheme m_theme;
CMenuBar *m_pMenuBar;
@@ -477,7 +477,7 @@ class CMsgDialog : public CSrmmBaseDialog void VerifyProxy(void);
LRESULT WMCopyHandler(UINT uMsg, WPARAM wParam, LPARAM lParam);
- WORD m_wStatus, m_wOldStatus;
+ uint16_t m_wStatus, m_wOldStatus;
size_t m_iSendBufferSize;
int m_iSendLength; // message length in utf-8 octets
HICON m_hSmileyIcon;
diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h index f31509589f..d5e33c1b3a 100644 --- a/plugins/TabSRMM/src/nen.h +++ b/plugins/TabSRMM/src/nen.h @@ -39,7 +39,7 @@ #define MODULE "tabSRMM_NEN"
-int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto);
+int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, uint16_t eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto);
#define DEFAULT_COLBACK RGB(255,255,128)
#define DEFAULT_COLTEXT RGB(0,0,0)
@@ -117,8 +117,8 @@ struct NEN_OPTIONS BOOL iNoAutoPopup;
BOOL bWindowCheck;
int iLimitPreview;
- WORD wMaxRecent;
- WORD wMaxFavorites;
+ uint16_t wMaxRecent;
+ uint16_t wMaxFavorites;
DWORD dwRemoveMask;
COLORREF colBackMsg;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index b7c79b2421..9dc47521f3 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -1390,7 +1390,7 @@ void CSkin::Load(void) db_set_dw(0, SRMSGMOD_T, _tagSettings[i].szSetting, data);
break;
case 2:
- db_set_w(0, SRMSGMOD_T, _tagSettings[i].szSetting, (WORD)data);
+ db_set_w(0, SRMSGMOD_T, _tagSettings[i].szSetting, (uint16_t)data);
break;
case 5:
GetPrivateProfileString(_tagSettings[i].szIniKey, _tagSettings[i].szIniName, L"000000",
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index 82338386cc..14b00bea61 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -170,7 +170,7 @@ void TN_TypingMessage(MCONTACT hContact, int iMode) static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- WORD idCtrl, wNotifyCode;
+ uint16_t idCtrl, wNotifyCode;
switch (msg) {
case WM_INITDIALOG:
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index f9ccd23e20..c902b8ee9a 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -393,7 +393,7 @@ int CMsgDialog::FindRTLLocale() HKL layouts[20];
int i, result = 0;
LCID lcid;
- WORD wCtype2[5];
+ uint16_t wCtype2[5];
if (m_iHaveRTLLang == 0) {
memset(layouts, 0, sizeof(layouts));
@@ -474,9 +474,9 @@ struct TOldContainerSettings DWORD panelheight;
int iSplitterY;
wchar_t szTitleFormat[32];
- WORD avatarMode;
- WORD ownAvatarMode;
- WORD autoCloseSeconds;
+ uint16_t avatarMode;
+ uint16_t ownAvatarMode;
+ uint16_t autoCloseSeconds;
uint8_t reserved[10];
};
|