summaryrefslogtreecommitdiff
path: root/protocols/Weather
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/Weather
parent62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff)
WORD -> uint16_t
Diffstat (limited to 'protocols/Weather')
-rw-r--r--protocols/Weather/src/stdafx.h22
-rw-r--r--protocols/Weather/src/weather_conv.cpp4
-rw-r--r--protocols/Weather/src/weather_data.cpp2
-rw-r--r--protocols/Weather/src/weather_opt.cpp2
-rw-r--r--protocols/Weather/src/weather_popup.cpp2
-rw-r--r--protocols/Weather/src/weather_update.cpp2
6 files changed, 17 insertions, 17 deletions
diff --git a/protocols/Weather/src/stdafx.h b/protocols/Weather/src/stdafx.h
index bb8f288541..5d8597247e 100644
--- a/protocols/Weather/src/stdafx.h
+++ b/protocols/Weather/src/stdafx.h
@@ -187,16 +187,16 @@ struct MYOPTIONS
uint8_t RemoveOldData;
uint8_t MakeItalic;
- WORD UpdateTime;
- WORD AvatarSize;
+ uint16_t UpdateTime;
+ uint16_t AvatarSize;
// units
- WORD tUnit;
- WORD wUnit;
- WORD vUnit;
- WORD pUnit;
- WORD dUnit;
- WORD eUnit;
+ uint16_t tUnit;
+ uint16_t wUnit;
+ uint16_t vUnit;
+ uint16_t pUnit;
+ uint16_t dUnit;
+ uint16_t eUnit;
wchar_t DegreeSign[4];
uint8_t DoNotAppendUnit;
uint8_t NoFrac;
@@ -407,7 +407,7 @@ int MapCondToStatus(MCONTACT hContact);
HICON GetStatusIcon(MCONTACT hContact);
HICON GetStatusIconBig(MCONTACT hContact);
-WORD GetIcon(const wchar_t* cond, WIDATA *Data);
+uint16_t GetIcon(const wchar_t* cond, WIDATA *Data);
void CaseConv(wchar_t *str);
void TrimString(char *str);
void TrimString(wchar_t *str);
@@ -437,7 +437,7 @@ void wSetData(wchar_t *&Data, const wchar_t *Value);
void wfree(char *&Data);
void wfree(wchar_t *&Data);
-void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM lParam);
+void DBDataManage(MCONTACT hContact, uint16_t Mode, WPARAM wParam, LPARAM lParam);
// functions in weather_http.c
int InternetDownloadFile (char *szUrl, char *cookie, char *userAgent, wchar_t** szData);
@@ -471,7 +471,7 @@ const wchar_t* GetDefaultText(int c);
// functions in weather_popup.c
int WeatherPopup(WPARAM wParam, LPARAM lParam);
int WeatherError(WPARAM wParam, LPARAM lParam);
-int WPShowMessage(const wchar_t* lpzText, WORD kind);
+int WPShowMessage(const wchar_t* lpzText, uint16_t kind);
LRESULT CALLBACK PopupWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
diff --git a/protocols/Weather/src/weather_conv.cpp b/protocols/Weather/src/weather_conv.cpp
index 2c29e1865f..dc1dfa4f03 100644
--- a/protocols/Weather/src/weather_conv.cpp
+++ b/protocols/Weather/src/weather_conv.cpp
@@ -317,9 +317,9 @@ void GetElev(wchar_t *tempchar, wchar_t *unit, wchar_t *str)
// return value = status for the icon (ONLINE, OFFLINE, etc)
static const wchar_t *statusStr[MAX_COND] = { L"Lightning", L"Fog", L"Snow", L"Rain", L"Partly Cloudy", L"Cloudy", L"Sunny", L"N/A", L"Rain Shower", L"Snow Shower"};
-static const WORD statusValue[MAX_COND] = { LIGHT, FOG, SNOW, RAIN, PCLOUDY, CLOUDY, SUNNY, NA, RSHOWER, SSHOWER };
+static const uint16_t statusValue[MAX_COND] = { LIGHT, FOG, SNOW, RAIN, PCLOUDY, CLOUDY, SUNNY, NA, RSHOWER, SSHOWER };
-WORD GetIcon(const wchar_t *cond, WIDATA *Data)
+uint16_t GetIcon(const wchar_t *cond, WIDATA *Data)
{
// set the icon using ini
for (int i = 0; i < _countof(statusValue); i++)
diff --git a/protocols/Weather/src/weather_data.cpp b/protocols/Weather/src/weather_data.cpp
index 69c92d8cda..0f3cf9ccc9 100644
--- a/protocols/Weather/src/weather_data.cpp
+++ b/protocols/Weather/src/weather_data.cpp
@@ -402,7 +402,7 @@ int GetWeatherDataFromDB(const char *szSetting, void *lparam)
// remove or display the weather information for a contact
// hContact - the contact in which the info is going to be removed
//
-void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM)
+void DBDataManage(MCONTACT hContact, uint16_t Mode, WPARAM wParam, LPARAM)
{
// get all the settings and store them in a temporary list
LIST<char> arSettings(10);
diff --git a/protocols/Weather/src/weather_opt.cpp b/protocols/Weather/src/weather_opt.cpp
index 3a8d7f26dd..9dd186f751 100644
--- a/protocols/Weather/src/weather_opt.cpp
+++ b/protocols/Weather/src/weather_opt.cpp
@@ -268,7 +268,7 @@ static INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l
// get update time and remove the old timer
GetDlgItemText(hdlg, IDC_UPDATETIME, str, _countof(str));
- opt.UpdateTime = (WORD)_wtoi(str);
+ opt.UpdateTime = (uint16_t)_wtoi(str);
if (opt.UpdateTime < 1) opt.UpdateTime = 1;
KillTimer(nullptr, timerId);
timerId = SetTimer(nullptr, 0, opt.UpdateTime * 60000, timerProc);
diff --git a/protocols/Weather/src/weather_popup.cpp b/protocols/Weather/src/weather_popup.cpp
index 94ed3508a4..f0be40f798 100644
--- a/protocols/Weather/src/weather_popup.cpp
+++ b/protocols/Weather/src/weather_popup.cpp
@@ -81,7 +81,7 @@ int WeatherError(WPARAM wParam, LPARAM lParam)
// (threaded)
// lpzText = error text
// kind = display type (see m_popup.h)
-int WPShowMessage(const wchar_t* lpzText, WORD kind)
+int WPShowMessage(const wchar_t* lpzText, uint16_t kind)
{
NotifyEventHooks(hHookWeatherError, (WPARAM)lpzText, (LPARAM)kind);
return 0;
diff --git a/protocols/Weather/src/weather_update.cpp b/protocols/Weather/src/weather_update.cpp
index 93a519f495..37d75a01f8 100644
--- a/protocols/Weather/src/weather_update.cpp
+++ b/protocols/Weather/src/weather_update.cpp
@@ -398,7 +398,7 @@ int GetWeatherData(MCONTACT hContact)
if (Data == nullptr)
return SVC_NOT_FOUND; // the ini for the station cannot be found
- WORD cond = NA;
+ uint16_t cond = NA;
char loc[256];
for (int i = 0; i < 4; ++i) {
// generate update URL