summaryrefslogtreecommitdiff
path: root/plugins/Weather/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/Weather/src
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather/src')
-rw-r--r--plugins/Weather/src/stdafx.h2
-rw-r--r--plugins/Weather/src/weather.cpp4
-rw-r--r--plugins/Weather/src/weather_addstn.cpp30
-rw-r--r--plugins/Weather/src/weather_contacts.cpp12
-rw-r--r--plugins/Weather/src/weather_conv.cpp144
-rw-r--r--plugins/Weather/src/weather_data.cpp48
-rw-r--r--plugins/Weather/src/weather_http.cpp4
-rw-r--r--plugins/Weather/src/weather_info.cpp72
-rw-r--r--plugins/Weather/src/weather_ini.cpp60
-rw-r--r--plugins/Weather/src/weather_mwin.cpp12
-rw-r--r--plugins/Weather/src/weather_opt.cpp2
-rw-r--r--plugins/Weather/src/weather_popup.cpp8
-rw-r--r--plugins/Weather/src/weather_svcs.cpp6
-rw-r--r--plugins/Weather/src/weather_update.cpp38
-rw-r--r--plugins/Weather/src/weather_userinfo.cpp8
15 files changed, 225 insertions, 225 deletions
diff --git a/plugins/Weather/src/stdafx.h b/plugins/Weather/src/stdafx.h
index a6b155d5f5..a0bced3797 100644
--- a/plugins/Weather/src/stdafx.h
+++ b/plugins/Weather/src/stdafx.h
@@ -145,7 +145,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// 505 HTTP Version Not Supported
// defaults constants
-#define C_DEFAULT _T("%n [%t, %c]")
+#define C_DEFAULT L"%n [%t, %c]"
#define N_DEFAULT TranslateT("%c\\nTemperature: %t\\nFeel-Like: %f\\nPressure: %p\\nWind: %i %w\\nHumidity: %m\\nDew Point: %e\\nVisibility: %v\\n\\nSun Rise: %r\\nSun Set: %y\\n\\n5 Days Forecast:\\n%[Forecast Day 1]\\n%[Forecast Day 2]\\n%[Forecast Day 3]\\n%[Forecast Day 4]\\n%[Forecast Day 5]")
#define B_DEFAULT TranslateT("Feel-Like: %f\\nPressure: %p\\nWind: %i %w\\nHumidity: %m\\nDew Point: %e\\nVisibility: %v\\n\\nSun Rise: %r\\nSun Set: %y\\n\\n5 Days Forecast:\\n%[Forecast Day 1]\\n%[Forecast Day 2]\\n%[Forecast Day 3]\\n%[Forecast Day 4]\\n%[Forecast Day 5]")
#define b_DEFAULT TranslateT("Weather Condition for %n as of %u")
diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp
index 0e52a477e0..00d6b0baee 100644
--- a/plugins/Weather/src/weather.cpp
+++ b/plugins/Weather/src/weather.cpp
@@ -231,8 +231,8 @@ extern "C" int __declspec(dllexport) Load(void)
// window needed for popup commands
TCHAR SvcFunc[100];
- mir_sntprintf(SvcFunc, _T("%s__PopupWindow"), _T(WEATHERPROTONAME));
- hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), SvcFunc, 0, CW_USEDEFAULT, CW_USEDEFAULT,
+ mir_sntprintf(SvcFunc, L"%s__PopupWindow", _T(WEATHERPROTONAME));
+ hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", SvcFunc, 0, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
SetWindowLongPtr(hPopupWindow, GWLP_WNDPROC, (LONG_PTR)PopupWndProc);
return 0;
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp
index 5ab2d661a5..304f1d2641 100644
--- a/plugins/Weather/src/weather_addstn.cpp
+++ b/plugins/Weather/src/weather_addstn.cpp
@@ -251,13 +251,13 @@ int IDSearchProc(TCHAR *sID, const int searchId, WIIDSEARCH *sData, TCHAR *svc,
// give no station name but only ID if the search is unavailable
else _tcsncpy(str, TranslateT("<Enter station name here>"), MAX_DATA_LEN - 1);
- mir_sntprintf(newID, _T("%s/%s"), svc, sID);
+ mir_sntprintf(newID, L"%s/%s", svc, sID);
// set the search result and broadcast it
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
psr.nick.t = str;
- psr.firstName.t = _T(" ");
+ psr.firstName.t = L" ";
psr.lastName.t = svcname;
psr.email.t = newID;
ProtoBroadcastAck(WEATHERPROTONAME, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)searchId, (LPARAM)&psr);
@@ -272,7 +272,7 @@ int IDSearchProc(TCHAR *sID, const int searchId, WIIDSEARCH *sData, TCHAR *svc,
int IDSearch(TCHAR *sID, const int searchId)
{
// for a normal ID search (ID != #)
- if (mir_tstrcmp(sID, _T("#"))) {
+ if (mir_tstrcmp(sID, L"#")) {
WIDATALIST *Item = WIHead;
// search every weather service using the search station ID
@@ -288,8 +288,8 @@ int IDSearch(TCHAR *sID, const int searchId)
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
psr.nick.t = TranslateT("<Enter station name here>"); // to be entered
- psr.firstName.t = _T(" ");
- psr.lastName.t = _T("");
+ psr.firstName.t = L" ";
+ psr.lastName.t = L"";
psr.email.t = TranslateT("<Enter station ID here>"); // to be entered
ProtoBroadcastAck(WEATHERPROTONAME, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)searchId, (LPARAM)&psr);
}
@@ -322,16 +322,16 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR *
// for single result
if (sData->Single.Available && (search != NULL || !sData->Multiple.Available)) { // single result
// if station ID appears first in the downloaded data
- if (!mir_tstrcmpi(sData->Single.First, _T("ID"))) {
+ if (!mir_tstrcmpi(sData->Single.First, L"ID")) {
GetDataValue(&sData->Single.ID, str, &szInfo);
- mir_sntprintf(sID, _T("%s/%s"), svc, str);
+ mir_sntprintf(sID, L"%s/%s", svc, str);
GetDataValue(&sData->Single.Name, Name, &szInfo);
}
// if station name appears first in the downloaded data
- else if (!mir_tstrcmpi(sData->Single.First, _T("NAME"))) {
+ else if (!mir_tstrcmpi(sData->Single.First, L"NAME")) {
GetDataValue(&sData->Single.Name, Name, &szInfo);
GetDataValue(&sData->Single.ID, str, &szInfo);
- mir_sntprintf(sID, _T("%s/%s"), svc, str);
+ mir_sntprintf(sID, L"%s/%s", svc, str);
}
else
str[0] = 0;
@@ -350,7 +350,7 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR *
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
psr.nick.t = Name;
- psr.firstName.t = _T(" ");
+ psr.firstName.t = L" ";
psr.lastName.t = svcname;
psr.email.t = sID;
psr.id.t = sID;
@@ -363,16 +363,16 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR *
// search for the next occurrence of the string
while (true) {
// if station ID appears first in the downloaded data
- if (!mir_tstrcmpi(sData->Multiple.First, _T("ID"))) {
+ if (!mir_tstrcmpi(sData->Multiple.First, L"ID")) {
GetDataValue(&sData->Multiple.ID, str, &szInfo);
- mir_sntprintf(sID, _T("%s/%s"), svc, str);
+ mir_sntprintf(sID, L"%s/%s", svc, str);
GetDataValue(&sData->Multiple.Name, Name, &szInfo);
}
// if station name appears first in the downloaded data
- else if (!mir_tstrcmpi(sData->Multiple.First, _T("NAME"))) {
+ else if (!mir_tstrcmpi(sData->Multiple.First, L"NAME")) {
GetDataValue(&sData->Multiple.Name, Name, &szInfo);
GetDataValue(&sData->Multiple.ID, str, &szInfo);
- mir_sntprintf(sID, _T("%s/%s"), svc, str);
+ mir_sntprintf(sID, L"%s/%s", svc, str);
}
else
break;
@@ -388,7 +388,7 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR *
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
psr.nick.t = Name;
- psr.firstName.t = _T("");
+ psr.firstName.t = L"";
psr.lastName.t = svcname;
psr.email.t = sID;
psr.id.t = sID;
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp
index 60919e5b43..447837c76e 100644
--- a/plugins/Weather/src/weather_contacts.cpp
+++ b/plugins/Weather/src/weather_contacts.cpp
@@ -43,7 +43,7 @@ INT_PTR ViewLog(WPARAM wParam, LPARAM lParam)
DBVARIANT dbv;
if (!db_get_ts(wParam, WEATHERPROTONAME, "Log", &dbv)) {
if (dbv.pszVal[0] != 0)
- ShellExecute((HWND)lParam, _T("open"), dbv.ptszVal, _T(""), _T(""), SW_SHOW);
+ ShellExecute((HWND)lParam, L"open", dbv.ptszVal, L"", L"", SW_SHOW);
db_free(&dbv);
}
else // display warning dialog if no path is specified
@@ -205,7 +205,7 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
// check if there are 2 parts in the ID (svc/id) seperated by "/"
// if not, don't let user change the setting
GetDlgItemText(hwndDlg, IDC_ID, str, _countof(str));
- chop = _tcsstr(str, _T("/"));
+ chop = _tcsstr(str, L"/");
if (chop == NULL)
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE), FALSE);
else
@@ -272,14 +272,14 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
ofn.nMaxFile = _countof(str);
// set filters
_tcsncpy(filter, TranslateT("Text Files"), _countof(filter) - 1);
- mir_tstrncat(filter, _T(" (*.txt)"), _countof(filter) - mir_tstrlen(filter));
+ mir_tstrncat(filter, L" (*.txt)", _countof(filter) - mir_tstrlen(filter));
pfilter = filter + mir_tstrlen(filter) + 1;
- _tcsncpy(pfilter, _T("*.txt"), _countof(filter) - 1);
+ _tcsncpy(pfilter, L"*.txt", _countof(filter) - 1);
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
_tcsncpy(pfilter, TranslateT("All Files"), _countof(filter) - 1);
- mir_tstrncat(pfilter, _T(" (*.*)"), _countof(filter) - mir_tstrlen(filter));
+ mir_tstrncat(pfilter, L" (*.*)", _countof(filter) - mir_tstrlen(filter));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- _tcsncpy(pfilter, _T("*.*"), _countof(filter) - 1);
+ _tcsncpy(pfilter, L"*.*", _countof(filter) - 1);
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp
index bc3f523d8c..ec5cd06521 100644
--- a/plugins/Weather/src/weather_conv.cpp
+++ b/plugins/Weather/src/weather_conv.cpp
@@ -64,9 +64,9 @@ static void numToStr(double num, TCHAR *str, size_t strSize)
if (i < 0 && (w || r)) w = -w;
if (r)
- mir_sntprintf(str, strSize, _T("%i.%i"), w, r);
+ mir_sntprintf(str, strSize, L"%i.%i", w, r);
else
- mir_sntprintf(str, strSize, _T("%i"), w);
+ mir_sntprintf(str, strSize, L"%i", w);
}
//============ UNIT CONVERSIONS ============
@@ -86,7 +86,7 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str)
memmove(&tempchar[1], &tempchar[2], sizeof(TCHAR)*(mir_tstrlen(&tempchar[2]) + 1));
// quit if the value obtained is N/A or not a number
- if (!mir_tstrcmp(tempchar, NODATA) || !mir_tstrcmp(tempchar, _T("N/A"))) {
+ if (!mir_tstrcmp(tempchar, NODATA) || !mir_tstrcmp(tempchar, L"N/A")) {
mir_tstrcpy(str, tempchar);
return;
}
@@ -99,8 +99,8 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str)
temp = _ttof(tempchar);
// convert all to F first
- if (!mir_tstrcmpi(unit, _T("C"))) temp = (temp * 9 / 5) + 32;
- else if (!mir_tstrcmpi(unit, _T("K"))) temp = ((temp - 273.15) * 9 / 5) + 32;
+ if (!mir_tstrcmpi(unit, L"C")) temp = (temp * 9 / 5) + 32;
+ else if (!mir_tstrcmpi(unit, L"K")) temp = ((temp - 273.15) * 9 / 5) + 32;
// convert to apporiate unit
switch (opt.tUnit) {
@@ -110,7 +110,7 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str)
if (opt.DoNotAppendUnit)
_tcsncpy_s(str, MAX_DATA_LEN, tstr, _TRUNCATE);
else
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s%sC"), tstr, opt.DegreeSign);
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s%sC", tstr, opt.DegreeSign);
break;
case 2:
@@ -118,7 +118,7 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str)
if (opt.DoNotAppendUnit)
_tcsncpy_s(str, MAX_DATA_LEN, tstr, _TRUNCATE);
else
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s%sF"), tstr, opt.DegreeSign);
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s%sF", tstr, opt.DegreeSign);
break;
}
}
@@ -142,36 +142,36 @@ void GetPressure(TCHAR *tempchar, TCHAR *unit, TCHAR* str)
}
// convert all to mb first
- if (!mir_tstrcmpi(unit, _T("KPA")))
+ if (!mir_tstrcmpi(unit, L"KPA"))
tempunit = (double)output * 10;
- else if (!mir_tstrcmpi(unit, _T("HPA")))
+ else if (!mir_tstrcmpi(unit, L"HPA"))
tempunit = (double)output;
- else if (!mir_tstrcmpi(unit, _T("MB")))
+ else if (!mir_tstrcmpi(unit, L"MB"))
tempunit = (double)output;
- else if (!mir_tstrcmpi(unit, _T("IN")))
+ else if (!mir_tstrcmpi(unit, L"IN"))
tempunit = (double)output * 33.86388;
- else if (!mir_tstrcmpi(unit, _T("MM")))
+ else if (!mir_tstrcmpi(unit, L"MM"))
tempunit = (double)output * 1.33322;
- else if (!mir_tstrcmpi(unit, _T("TORR")))
+ else if (!mir_tstrcmpi(unit, L"TORR"))
tempunit = (double)output * 1.33322;
// convert to apporiate unit
switch (opt.pUnit) {
case 1:
intunit = (int)(tempunit + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("kPa"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("kPa"));
break;
case 2:
intunit = (int)(tempunit + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i %s"), intunit, opt.DoNotAppendUnit ? _T("") : TranslateT("mb"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i %s", intunit, opt.DoNotAppendUnit ? L"" : TranslateT("mb"));
break;
case 3:
intunit = (int)((tempunit * 10 / 33.86388) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("in"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("in"));
break;
case 4:
intunit = (int)((tempunit * 10 / 1.33322) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("mm"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("mm"));
break;
default:
mir_tstrcpy(str, tempchar);
@@ -199,32 +199,32 @@ void GetSpeed(TCHAR *tempchar, TCHAR *unit, TCHAR *str)
return;
// convert all to m/s first
- if (!mir_tstrcmpi(unit, _T("KM/H")))
+ if (!mir_tstrcmpi(unit, L"KM/H"))
tempunit /= 3.6;
- // else if ( !mir_tstrcmpi(unit, _T("M/S"))
+ // else if ( !mir_tstrcmpi(unit, L"M/S")
// tempunit = tempunit;
- else if (!mir_tstrcmpi(unit, _T("MPH")))
+ else if (!mir_tstrcmpi(unit, L"MPH"))
tempunit *= 0.44704;
- else if (!mir_tstrcmpi(unit, _T("KNOTS")))
+ else if (!mir_tstrcmpi(unit, L"KNOTS"))
tempunit *= 0.514444;
// convert to apporiate unit
switch (opt.wUnit) {
case 1:
numToStr(tempunit * 3.6, tstr, _countof(tstr));
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s %s"), tstr, opt.DoNotAppendUnit ? _T("") : TranslateT("km/h"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s %s", tstr, opt.DoNotAppendUnit ? L"" : TranslateT("km/h"));
break;
case 2:
numToStr(tempunit, tstr, _countof(tstr));
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s %s"), tstr, opt.DoNotAppendUnit ? _T("") : TranslateT("m/s"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s %s", tstr, opt.DoNotAppendUnit ? L"" : TranslateT("m/s"));
break;
case 3:
numToStr(tempunit / 0.44704, tstr, _countof(tstr));
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s %s"), tstr, opt.DoNotAppendUnit ? _T("") : TranslateT("mph"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s %s", tstr, opt.DoNotAppendUnit ? L"" : TranslateT("mph"));
break;
case 4:
numToStr(tempunit / 0.514444, tstr, _countof(tstr));
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s %s"), tstr, opt.DoNotAppendUnit ? _T("") : TranslateT("knots"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s %s", tstr, opt.DoNotAppendUnit ? L"" : TranslateT("knots"));
break;
}
}
@@ -248,20 +248,20 @@ void GetDist(TCHAR *tempchar, TCHAR *unit, TCHAR *str)
}
// convert all to km first
- if (!mir_tstrcmpi(unit, _T("KM")))
+ if (!mir_tstrcmpi(unit, L"KM"))
tempunit = (double)output;
- else if (!mir_tstrcmpi(unit, _T("MILES")))
+ else if (!mir_tstrcmpi(unit, L"MILES"))
tempunit = (double)output * 1.609;
// convert to apporiate unit
switch (opt.vUnit) {
case 1:
intunit = (int)((tempunit * 10) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("km"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("km"));
break;
case 2:
intunit = (int)((tempunit * 10 / 1.609) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("miles"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("miles"));
break;
default:
mir_tstrcpy(str, tempchar);
@@ -288,20 +288,20 @@ void GetElev(TCHAR *tempchar, TCHAR *unit, TCHAR *str)
}
// convert all to m first
- if (!mir_tstrcmpi(unit, _T("M")))
+ if (!mir_tstrcmpi(unit, L"M"))
tempunit = (double)output;
- else if (!mir_tstrcmpi(unit, _T("FT")))
+ else if (!mir_tstrcmpi(unit, L"FT"))
tempunit = (double)output / 3.28;
// convert to apporiate unit
switch (opt.eUnit) {
case 1:
intunit = (int)((tempunit * 10 * 3.28) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("ft"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("ft"));
break;
case 2:
intunit = (int)((tempunit * 10) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("m"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("m"));
break;
default:
mir_tstrcpy(str, tempchar);
@@ -316,7 +316,7 @@ void GetElev(TCHAR *tempchar, TCHAR *unit, TCHAR *str)
// cond = the string for weather condition
// return value = status for the icon (ONLINE, OFFLINE, etc)
-static const TCHAR *statusStr[10] = { _T("Lightning"), _T("Fog"), _T("Snow Shower"), _T("Snow"), _T("Rain Shower"), _T("Rain"), _T("Partly Cloudy"), _T("Cloudy"), _T("Sunny"), _T("N/A") };
+static const TCHAR *statusStr[10] = { L"Lightning", L"Fog", L"Snow Shower", L"Snow", L"Rain Shower", L"Rain", L"Partly Cloudy", L"Cloudy", L"Sunny", L"N/A" };
static const WORD statusValue[10] = { LIGHT, FOG, SSHOWER, SNOW, RSHOWER, RAIN, PCLOUDY, CLOUDY, SUNNY, NA };
WORD GetIcon(const TCHAR* cond, WIDATA *Data)
@@ -328,58 +328,58 @@ WORD GetIcon(const TCHAR* cond, WIDATA *Data)
// internal detection
if (
- _tcsstr(cond, _T("mainy sunny")) != NULL ||
- _tcsstr(cond, _T("mainy clear")) != NULL ||
- _tcsstr(cond, _T("partly cloudy")) != NULL ||
- _tcsstr(cond, _T("mostly")) != NULL ||
- _tcsstr(cond, _T("clouds")) != NULL) {
+ _tcsstr(cond, L"mainy sunny") != NULL ||
+ _tcsstr(cond, L"mainy clear") != NULL ||
+ _tcsstr(cond, L"partly cloudy") != NULL ||
+ _tcsstr(cond, L"mostly") != NULL ||
+ _tcsstr(cond, L"clouds") != NULL) {
return PCLOUDY;
}
else if (
- _tcsstr(cond, _T("sunny")) != NULL ||
- _tcsstr(cond, _T("clear")) != NULL ||
- _tcsstr(cond, _T("fair")) != NULL) {
+ _tcsstr(cond, L"sunny") != NULL ||
+ _tcsstr(cond, L"clear") != NULL ||
+ _tcsstr(cond, L"fair") != NULL) {
return SUNNY;
}
else if (
- _tcsstr(cond, _T("thunder")) != NULL ||
- _tcsstr(cond, _T("t-storm")) != NULL) {
+ _tcsstr(cond, L"thunder") != NULL ||
+ _tcsstr(cond, L"t-storm") != NULL) {
return LIGHT;
}
else if (
- _tcsstr(cond, _T("cloud")) != NULL ||
- _tcsstr(cond, _T("overcast")) != NULL) {
+ _tcsstr(cond, L"cloud") != NULL ||
+ _tcsstr(cond, L"overcast") != NULL) {
return CLOUDY;
}
else if (
- _tcsstr(cond, _T("fog")) != NULL ||
- _tcsstr(cond, _T("mist")) != NULL ||
- _tcsstr(cond, _T("smoke")) != NULL ||
- _tcsstr(cond, _T("sand")) != NULL ||
- _tcsstr(cond, _T("dust")) != NULL ||
- _tcsstr(cond, _T("haze")) != NULL) {
+ _tcsstr(cond, L"fog") != NULL ||
+ _tcsstr(cond, L"mist") != NULL ||
+ _tcsstr(cond, L"smoke") != NULL ||
+ _tcsstr(cond, L"sand") != NULL ||
+ _tcsstr(cond, L"dust") != NULL ||
+ _tcsstr(cond, L"haze") != NULL) {
return FOG;
}
else if (
- (_tcsstr(cond, _T("shower")) != NULL && _tcsstr(cond, _T("snow")) != NULL) ||
- _tcsstr(cond, _T("flurries")) != NULL) {
+ (_tcsstr(cond, L"shower") != NULL && _tcsstr(cond, L"snow") != NULL) ||
+ _tcsstr(cond, L"flurries") != NULL) {
return SSHOWER;
}
else if (
- _tcsstr(cond, _T("rain shower")) != NULL ||
- _tcsstr(cond, _T("shower")) != NULL) {
+ _tcsstr(cond, L"rain shower") != NULL ||
+ _tcsstr(cond, L"shower") != NULL) {
return RSHOWER;
}
else if (
- _tcsstr(cond, _T("snow")) != NULL ||
- _tcsstr(cond, _T("ice")) != NULL ||
- _tcsstr(cond, _T("freezing")) != NULL ||
- _tcsstr(cond, _T("wintry")) != NULL) {
+ _tcsstr(cond, L"snow") != NULL ||
+ _tcsstr(cond, L"ice") != NULL ||
+ _tcsstr(cond, L"freezing") != NULL ||
+ _tcsstr(cond, L"wintry") != NULL) {
return SNOW;
}
else if (
- _tcsstr(cond, _T("drizzle")) != NULL ||
- _tcsstr(cond, _T("rain")) != NULL) {
+ _tcsstr(cond, L"drizzle") != NULL ||
+ _tcsstr(cond, L"rain") != NULL) {
return RAIN;
}
@@ -390,7 +390,7 @@ WORD GetIcon(const TCHAR* cond, WIDATA *Data)
do {
j++;
// using the format _T("# Weather <condition name> <counter> #"
- mir_sntprintf(LangPackStr, _T("# Weather %s %i #"), statusStr[i], j);
+ mir_sntprintf(LangPackStr, L"# Weather %s %i #", statusStr[i], j);
_tcsncpy_s(LangPackStr1, TranslateTS(LangPackStr), _TRUNCATE);
CharLowerBuff(LangPackStr1, (DWORD)mir_tstrlen(LangPackStr1));
if (_tcsstr(cond, LangPackStr1) != NULL)
@@ -470,7 +470,7 @@ char *GetSearchStr(char *dis)
while (*pstr != 0) {
if (*pstr == ' ') {
memmove(pstr + 3, pstr + 1, len);
- memcpy(pstr, _T("%20"), 3);
+ memcpy(pstr, L"%20", 3);
pstr += 2;
}
pstr++;
@@ -502,10 +502,10 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str)
i++;
chr = dis[i];
switch (chr) {
- case '%': mir_tstrcat(str, _T("%")); break;
- case 't': mir_tstrcat(str, _T("\t")); break;
- case 'n': mir_tstrcat(str, _T("\r\n")); break;
- case '\\': mir_tstrcat(str, _T("\\")); break;
+ case '%': mir_tstrcat(str, L"%"); break;
+ case 't': mir_tstrcat(str, L"\t"); break;
+ case 'n': mir_tstrcat(str, L"\r\n"); break;
+ case '\\': mir_tstrcat(str, L"\\"); break;
}
}
@@ -538,7 +538,7 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str)
case 'v': mir_tstrcat(str, w->vis); break;
case 'w': mir_tstrcat(str, w->wind); break;
case 'y': mir_tstrcat(str, w->sunset); break;
- case '%': mir_tstrcat(str, _T("%")); break;
+ case '%': mir_tstrcat(str, L"%"); break;
case '[': // custom variables
i++;
name[0] = 0;
@@ -558,7 +558,7 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str)
}
// if the character is not a variable, write the original character to the new string
else {
- mir_sntprintf(lpzDate, _T("%c"), dis[i]);
+ mir_sntprintf(lpzDate, L"%c", dis[i]);
mir_tstrcat(str, lpzDate);
}
}
@@ -580,7 +580,7 @@ INT_PTR GetDisplaySvcFunc(WPARAM wParam, LPARAM lParam)
// pszID = original 2-part id, return the service internal name
void GetSvc(TCHAR *pszID)
{
- TCHAR *chop = _tcsstr(pszID, _T("/"));
+ TCHAR *chop = _tcsstr(pszID, L"/");
if (chop != NULL) *chop = '\0';
else pszID[0] = 0;
}
@@ -590,7 +590,7 @@ void GetSvc(TCHAR *pszID)
// pszID = original 2-part id, return the single part id
void GetID(TCHAR *pszID)
{
- TCHAR *chop = _tcsstr(pszID, _T("/"));
+ TCHAR *chop = _tcsstr(pszID, L"/");
if (chop != NULL) mir_tstrcpy(pszID, chop + 1);
else pszID[0] = 0;
}
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp
index 24554f2f4f..2fdd74ec15 100644
--- a/plugins/Weather/src/weather_data.cpp
+++ b/plugins/Weather/src/weather_data.cpp
@@ -185,54 +185,54 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data)
// convert the unit
if (mir_tstrcmp(Data, TranslateT("<Error>")) && mir_tstrcmp(Data, NODATA) && mir_tstrcmp(Data, TranslateTS(NODATA))) {
// temperature
- if (!mir_tstrcmp(UpdateData->Name, _T("Temperature")) || !mir_tstrcmp(UpdateData->Name, _T("High")) ||
- !mir_tstrcmp(UpdateData->Name, _T("Low")) || !mir_tstrcmp(UpdateData->Name, _T("Feel")) ||
- !mir_tstrcmp(UpdateData->Name, _T("Dewpoint")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("C")) || !mir_tstrcmpi(UpdateData->Unit, _T("F")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("K"))) {
+ if (!mir_tstrcmp(UpdateData->Name, L"Temperature") || !mir_tstrcmp(UpdateData->Name, L"High") ||
+ !mir_tstrcmp(UpdateData->Name, L"Low") || !mir_tstrcmp(UpdateData->Name, L"Feel") ||
+ !mir_tstrcmp(UpdateData->Name, L"Dewpoint") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"C") || !mir_tstrcmpi(UpdateData->Unit, L"F") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"K")) {
GetTemp(Data, UpdateData->Unit, str);
mir_tstrcpy(Data, str);
}
// pressure
- else if (!mir_tstrcmp(UpdateData->Name, _T("Pressure")) || !mir_tstrcmpi(UpdateData->Unit, _T("HPA")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("KPA")) || !mir_tstrcmpi(UpdateData->Unit, _T("MB")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("TORR")) || !mir_tstrcmpi(UpdateData->Unit, _T("IN")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("MM"))) {
+ else if (!mir_tstrcmp(UpdateData->Name, L"Pressure") || !mir_tstrcmpi(UpdateData->Unit, L"HPA") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"KPA") || !mir_tstrcmpi(UpdateData->Unit, L"MB") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"TORR") || !mir_tstrcmpi(UpdateData->Unit, L"IN") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"MM")) {
GetPressure(Data, UpdateData->Unit, str);
mir_tstrcpy(Data, str);
}
// speed
- else if (!mir_tstrcmp(UpdateData->Name, _T("Wind Speed")) || !mir_tstrcmpi(UpdateData->Unit, _T("KM/H")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("M/S")) || !mir_tstrcmpi(UpdateData->Unit, _T("MPH")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("KNOTS"))) {
+ else if (!mir_tstrcmp(UpdateData->Name, L"Wind Speed") || !mir_tstrcmpi(UpdateData->Unit, L"KM/H") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"M/S") || !mir_tstrcmpi(UpdateData->Unit, L"MPH") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"KNOTS")) {
GetSpeed(Data, UpdateData->Unit, str);
mir_tstrcpy(Data, str);
}
// visibility
- else if (!mir_tstrcmp(UpdateData->Name, _T("Visibility")) || !mir_tstrcmpi(UpdateData->Unit, _T("KM")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("MILES"))) {
+ else if (!mir_tstrcmp(UpdateData->Name, L"Visibility") || !mir_tstrcmpi(UpdateData->Unit, L"KM") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"MILES")) {
GetDist(Data, UpdateData->Unit, str);
mir_tstrcpy(Data, str);
}
// elevation
- else if (!mir_tstrcmp(UpdateData->Name, _T("Elevation")) || !mir_tstrcmpi(UpdateData->Unit, _T("FT")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("M"))) {
+ else if (!mir_tstrcmp(UpdateData->Name, L"Elevation") || !mir_tstrcmpi(UpdateData->Unit, L"FT") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"M")) {
GetElev(Data, UpdateData->Unit, str);
mir_tstrcpy(Data, str);
}
// converting case for condition to the upper+lower format
- else if (!mir_tstrcmpi(UpdateData->Unit, _T("COND")))
+ else if (!mir_tstrcmpi(UpdateData->Unit, L"COND"))
CaseConv(Data);
// degree sign
- else if (!mir_tstrcmpi(UpdateData->Unit, _T("DEG"))) {
+ else if (!mir_tstrcmpi(UpdateData->Unit, L"DEG")) {
if (!opt.DoNotAppendUnit) mir_tstrcat(Data, opt.DegreeSign);
}
// percent sign
- else if (!mir_tstrcmpi(UpdateData->Unit, _T("%"))) {
- if (!opt.DoNotAppendUnit) mir_tstrcat(Data, _T("%"));
+ else if (!mir_tstrcmpi(UpdateData->Unit, L"%")) {
+ if (!opt.DoNotAppendUnit) mir_tstrcat(Data, L"%");
}
// truncating strings for day/month to 2 or 3 characters
- else if (!mir_tstrcmpi(UpdateData->Unit, _T("DAY")) || !mir_tstrcmpi(UpdateData->Unit, _T("MONTH")))
+ else if (!mir_tstrcmpi(UpdateData->Unit, L"DAY") || !mir_tstrcmpi(UpdateData->Unit, L"MONTH"))
if (opt.dUnit > 1 && mir_tstrlen(Data) > opt.dUnit)
Data[opt.dUnit] = '\0';
}
@@ -270,7 +270,7 @@ void GetDataValue(WIDATAITEM *UpdateData, TCHAR *Data, TCHAR** szData)
if (UpdateData->End[0] != 0)
end = _tcsstr(szInfo, UpdateData->End);
else
- end = _tcsstr(szInfo, _T(" "));
+ end = _tcsstr(szInfo, L" ");
if (end != NULL) {
// set the ending location
@@ -291,7 +291,7 @@ void GetDataValue(WIDATAITEM *UpdateData, TCHAR *Data, TCHAR** szData)
(szInfo[startloc + 1] == ';' || szInfo[startloc + 2] == ';' || szInfo[startloc + 3] == ';' ||
szInfo[startloc + 4] == ';' || szInfo[startloc + 5] == ';' || szInfo[startloc + 6] == ';')) {
// ...but do NOT strip &minus;
- if ((endloc - startloc) > 7 && _tcsncmp(szInfo + startloc, _T("&minus;"), 7) == 0) {
+ if ((endloc - startloc) > 7 && _tcsncmp(szInfo + startloc, L"&minus;", 7) == 0) {
Data[respos++] = '-';
startloc += 7;
continue;
@@ -315,7 +315,7 @@ void GetDataValue(WIDATAITEM *UpdateData, TCHAR *Data, TCHAR** szData)
++startloc;
// prevent crashes if the string go over maximun length -> generate an error
if (respos >= MAX_DATA_LEN) {
- if (opt.ShowWarnings && UpdateData->Name[0] != 0 && mir_tstrcmp(UpdateData->Name, _T("Ignore"))) {
+ if (opt.ShowWarnings && UpdateData->Name[0] != 0 && mir_tstrcmp(UpdateData->Name, L"Ignore")) {
mir_sntprintf(Data, MAX_DATA_LEN, TranslateT("Error when obtaining data: %s"), UpdateData->Name);
WPShowMessage(Data, SM_WARNING);
}
diff --git a/plugins/Weather/src/weather_http.cpp b/plugins/Weather/src/weather_http.cpp
index 4171440bc9..429f8f654c 100644
--- a/plugins/Weather/src/weather_http.cpp
+++ b/plugins/Weather/src/weather_http.cpp
@@ -79,7 +79,7 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szD
// if the data does not downloaded successfully (ie. disconnected), then return 1000 as error code
*szData = (TCHAR*)mir_alloc(512);
// store the error code in szData
- mir_tstrcpy(*szData, _T("NetLib error occurred!!"));
+ mir_tstrcpy(*szData, L"NetLib error occurred!!");
hNetlibHttp = NULL;
return NLHRF_REDIRECT;
}
@@ -137,7 +137,7 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szD
else {
*szData = (TCHAR*)mir_alloc(512);
// store the error code in szData
- mir_sntprintf(*szData, 512, _T("Error occured! HTTP Error: %i\n"), nlhrReply->resultCode);
+ mir_sntprintf(*szData, 512, L"Error occured! HTTP Error: %i\n", nlhrReply->resultCode);
result = nlhrReply->resultCode;
}
diff --git a/plugins/Weather/src/weather_info.cpp b/plugins/Weather/src/weather_info.cpp
index 1e5e982c9d..3372d4d3ce 100644
--- a/plugins/Weather/src/weather_info.cpp
+++ b/plugins/Weather/src/weather_info.cpp
@@ -56,14 +56,14 @@ static void INIInfo(HWND hwndDlg)
ListView_SetItem(hIniList, &lvi);
lvi.iSubItem = 3;
switch (Item->Data.InternalVer) {
- case 1: lvi.pszText = _T("1.0"); break;
- case 2: lvi.pszText = _T("1.1"); break;
- case 3: lvi.pszText = _T("1.1a"); break;
- case 4: lvi.pszText = _T("1.2"); break;
- case 5: lvi.pszText = _T("1.3"); break;
- case 6: lvi.pszText = _T("1.4"); break;
- case 7: lvi.pszText = _T("1.5"); break;
- default: lvi.pszText = _T(""); break;
+ case 1: lvi.pszText = L"1.0"; break;
+ case 2: lvi.pszText = L"1.1"; break;
+ case 3: lvi.pszText = L"1.1a"; break;
+ case 4: lvi.pszText = L"1.2"; break;
+ case 5: lvi.pszText = L"1.3"; break;
+ case 6: lvi.pszText = L"1.4"; break;
+ case 7: lvi.pszText = L"1.5"; break;
+ default: lvi.pszText = L""; break;
}
ListView_SetItem(hIniList, &lvi);
lvi.iSubItem = 4;
@@ -153,47 +153,47 @@ void GetINIInfo(TCHAR *pszSvc)
// if exist, get the information
else {
mir_sntprintf(str2, TranslateT("Weather INI information for \"%s\":"), pszSvc);
- mir_tstrncat(str2, _T("\n\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Name:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t\t", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->DisplayName, _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Internal Name:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->InternalName, _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Author:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t\t", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->Author, _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Version:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t\t", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->Version, _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("INI Version:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t", _countof(str2) - mir_tstrlen(str2));
switch (sData->InternalVer) {
- case 1: mir_tstrncat(str2, _T("1.0"), _countof(str2) - mir_tstrlen(str2)); break;
- case 2: mir_tstrncat(str2, _T("1.1"), _countof(str2) - mir_tstrlen(str2)); break;
- case 3: mir_tstrncat(str2, _T("1.1a"), _countof(str2) - mir_tstrlen(str2)); break;
- case 4: mir_tstrncat(str2, _T("1.2"), _countof(str2) - mir_tstrlen(str2)); break;
- case 5: mir_tstrncat(str2, _T("1.3"), _countof(str2) - mir_tstrlen(str2)); break;
- case 6: mir_tstrncat(str2, _T("1.4"), _countof(str2) - mir_tstrlen(str2)); break;
- case 7: mir_tstrncat(str2, _T("1.5"), _countof(str2) - mir_tstrlen(str2)); break;
+ case 1: mir_tstrncat(str2, L"1.0", _countof(str2) - mir_tstrlen(str2)); break;
+ case 2: mir_tstrncat(str2, L"1.1", _countof(str2) - mir_tstrlen(str2)); break;
+ case 3: mir_tstrncat(str2, L"1.1a", _countof(str2) - mir_tstrlen(str2)); break;
+ case 4: mir_tstrncat(str2, L"1.2", _countof(str2) - mir_tstrlen(str2)); break;
+ case 5: mir_tstrncat(str2, L"1.3", _countof(str2) - mir_tstrlen(str2)); break;
+ case 6: mir_tstrncat(str2, L"1.4", _countof(str2) - mir_tstrlen(str2)); break;
+ case 7: mir_tstrncat(str2, L"1.5", _countof(str2) - mir_tstrlen(str2)); break;
}
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("File Name:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->ShortFileName, _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Item Count:"), _countof(str2) - mir_tstrlen(str2));
- mir_sntprintf(str2, _T("%s\t%i\n"), str2, sData->UpdateDataCount);
+ mir_sntprintf(str2, L"%s\t%i\n", str2, sData->UpdateDataCount);
mir_tstrncat(str2, TranslateT("Memory Used:"), _countof(str2) - mir_tstrlen(str2));
- mir_sntprintf(str2, _T("%s\t%i "), str2, sData->MemUsed);
+ mir_sntprintf(str2, L"%s\t%i ", str2, sData->MemUsed);
mir_tstrncat(str2, TranslateT("bytes"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Description:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->Description, _countof(str2) - mir_tstrlen(str2));
// display the message box and quit
@@ -211,20 +211,20 @@ void MoreVarList(void)
// heading
_tcsncpy(str, VARS_LIST, _countof(str) - 1);
- mir_tstrncat(str, _T("\n\n"), _countof(str) - mir_tstrlen(str));
+ mir_tstrncat(str, L"\n\n", _countof(str) - mir_tstrlen(str));
// loop through all weather services to find custom variables
for (WIDATALIST *Item = WIHead; Item != NULL; Item = Item->next) {
// loop through all update items in a service
for (WIDATAITEMLIST *WItem = Item->Data.UpdateData; WItem != NULL; WItem = WItem->Next) {
// the custom variable is defined as "%[<variable name>]"
// ignore the "hi" item and hidden items
- if (mir_tstrcmp(WItem->Item.Name, _T("Ignore")) && WItem->Item.Name[0] != '#') {
- mir_sntprintf(tempstr, _T("%c[%s]"), '%', WItem->Item.Name);
+ if (mir_tstrcmp(WItem->Item.Name, L"Ignore") && WItem->Item.Name[0] != '#') {
+ mir_sntprintf(tempstr, L"%c[%s]", '%', WItem->Item.Name);
TCHAR *find = _tcsstr(str, tempstr);
// if the custom variable does not exist in the list, add it to the list
if (find == NULL) {
mir_tstrncat(str, tempstr, _countof(str) - mir_tstrlen(str));
- mir_tstrncat(str, _T(", "), _countof(str) - mir_tstrlen(str));
+ mir_tstrncat(str, L", ", _countof(str) - mir_tstrlen(str));
}
}
}
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp
index 4bc8be70fe..df49fe4d80 100644
--- a/plugins/Weather/src/weather_ini.cpp
+++ b/plugins/Weather/src/weather_ini.cpp
@@ -79,11 +79,11 @@ void WIItemListAdd(WIDATAITEM *DataItem, WIDATA *Data)
void ResetDataItem(WIDATAITEM *Item, const TCHAR *name)
{
Item->Name = mir_tstrdup(name);
- Item->Start = _T("");
- Item->End = _T("");
- Item->Unit = _T("");
+ Item->Start = L"";
+ Item->End = L"";
+ Item->Unit = L"";
Item->Url = "";
- Item->Break = _T("");
+ Item->Break = L"";
Item->Type = 0;
}
@@ -183,9 +183,9 @@ static INT_PTR CALLBACK DlgProcSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
TCHAR *chop = _tcsrchr(szPath, '\\');
if (chop) {
*chop = '\0';
- mir_tstrncat(szPath, _T("\\Plugins\\weather\\"), _countof(szPath) - mir_tstrlen(szPath));
+ mir_tstrncat(szPath, L"\\Plugins\\weather\\", _countof(szPath) - mir_tstrlen(szPath));
if (_tmkdir(szPath) == 0)
- ShellExecute((HWND)lParam, _T("open"), szPath, _T(""), _T(""), SW_SHOW);
+ ShellExecute((HWND)lParam, L"open", szPath, L"", L"", SW_SHOW);
}
break;
}
@@ -247,7 +247,7 @@ static void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data)
Data->Enabled = FALSE;
// open the ini file
- FILE *pfile = _tfsopen(pszFile, _T("rt"), _SH_DENYWR);
+ FILE *pfile = _tfsopen(pszFile, L"rt", _SH_DENYWR);
if (pfile != NULL) {
char Line[4096];
fgets(Line, _countof(Line), pfile);
@@ -279,13 +279,13 @@ static void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data)
// initialize all data fields
Group = "";
- Data->DisplayName = _T("");
- Data->InternalName = _T("");
- Data->Description = _T("");
- Data->Author = _T("");
- Data->Version = _T("");
+ Data->DisplayName = L"";
+ Data->InternalName = L"";
+ Data->Description = L"";
+ Data->Author = L"";
+ Data->Version = L"";
Data->DefaultURL = "";
- Data->DefaultMap = _T("");
+ Data->DefaultMap = L"";
Data->UpdateURL = "";
Data->UpdateURL2 = "";
Data->UpdateURL3 = "";
@@ -293,30 +293,30 @@ static void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data)
Data->Cookie = "";
Data->UserAgent = "";
Data->IDSearch.SearchURL = "";
- Data->IDSearch.NotFoundStr = _T("");
+ Data->IDSearch.NotFoundStr = L"";
Data->NameSearch.SearchURL = "";
- Data->NameSearch.NotFoundStr = _T("");
- Data->NameSearch.SingleStr = _T("");
- Data->NameSearch.Single.First = _T("");
- Data->NameSearch.Multiple.First = _T("");
+ Data->NameSearch.NotFoundStr = L"";
+ Data->NameSearch.SingleStr = L"";
+ Data->NameSearch.Single.First = L"";
+ Data->NameSearch.Multiple.First = L"";
Data->IDSearch.Available = FALSE;
Data->NameSearch.Single.Available = FALSE;
Data->NameSearch.Multiple.Available = FALSE;
wSetData(&Data->FileName, pszFile);
wSetData(&Data->ShortFileName, pszShortFile);
- ResetDataItem(&Data->IDSearch.Name, _T("ID Search - Station Name"));
- ResetDataItem(&Data->NameSearch.Single.Name, _T("Name Search Single Result - Station Name"));
- ResetDataItem(&Data->NameSearch.Single.ID, _T("Name Search Single Result - Station ID"));
- ResetDataItem(&Data->NameSearch.Multiple.Name, _T("Name Search Multiple Result - Station Name"));
- ResetDataItem(&Data->NameSearch.Multiple.ID, _T("Name Search Multiple Result - Station ID"));
+ ResetDataItem(&Data->IDSearch.Name, L"ID Search - Station Name");
+ ResetDataItem(&Data->NameSearch.Single.Name, L"Name Search Single Result - Station Name");
+ ResetDataItem(&Data->NameSearch.Single.ID, L"Name Search Single Result - Station ID");
+ ResetDataItem(&Data->NameSearch.Multiple.Name, L"Name Search Multiple Result - Station Name");
+ ResetDataItem(&Data->NameSearch.Multiple.ID, L"Name Search Multiple Result - Station ID");
- DataItem.Name = _T("");
- DataItem.Start = _T("");
- DataItem.End = _T("");
- DataItem.Unit = _T("");
+ DataItem.Name = L"";
+ DataItem.Start = L"";
+ DataItem.End = L"";
+ DataItem.Unit = L"";
DataItem.Url = "";
- DataItem.Break = _T("");
+ DataItem.Break = L"";
DataItem.Type = 0;
Temp = "";
@@ -491,7 +491,7 @@ bool LoadWIData(bool dial)
if (chop == NULL)
return false;
*chop = '\0';
- mir_tstrncat(szSearchPath, _T("\\Plugins\\Weather\\*.ini"), _countof(szSearchPath) - mir_tstrlen(szSearchPath));
+ mir_tstrncat(szSearchPath, L"\\Plugins\\Weather\\*.ini", _countof(szSearchPath) - mir_tstrlen(szSearchPath));
_tcsncpy(FileName, szSearchPath, MAX_PATH - 1);
WIN32_FIND_DATA fd;
@@ -504,7 +504,7 @@ bool LoadWIData(bool dial)
chop = _tcsrchr(FileName, '\\');
chop[1] = '\0';
mir_tstrncat(FileName, fd.cFileName, _countof(FileName) - mir_tstrlen(FileName));
- if (mir_tstrcmpi(fd.cFileName, _T("SAMPLE_INI.INI"))) {
+ if (mir_tstrcmpi(fd.cFileName, L"SAMPLE_INI.INI")) {
WIDATA Data;
LoadStationData(FileName, fd.cFileName, &Data);
if (Data.Enabled)
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp
index bb57c61fa8..61f323d8d9 100644
--- a/plugins/Weather/src/weather_mwin.cpp
+++ b/plugins/Weather/src/weather_mwin.cpp
@@ -200,7 +200,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
TCHAR *nick = (TCHAR*)pcli->pfnGetContactDisplayName(data->hContact, 0);
SIZE fontSize;
- GetTextExtentPoint32(hdc, _T("|"), 1, &fontSize);
+ GetTextExtentPoint32(hdc, L"|", 1, &fontSize);
rc.top += 1;
rc.left += picSize + fontSize.cx;
@@ -242,10 +242,10 @@ static void addWindow(MCONTACT hContact)
return;
TCHAR winname[512];
- mir_sntprintf(winname, _T("Weather: %s"), dbv.ptszVal);
+ mir_sntprintf(winname, L"Weather: %s", dbv.ptszVal);
db_free(&dbv);
- HWND hWnd = CreateWindow(_T("WeatherFrame"), _T(""), WS_CHILD | WS_VISIBLE,
+ HWND hWnd = CreateWindow(L"WeatherFrame", L"", WS_CHILD | WS_VISIBLE,
0, 0, 10, 10, pcli->hwndContactList, NULL, hInst, (void*)hContact);
WindowList_Add(hMwinWindowList, hWnd, hContact);
@@ -321,7 +321,7 @@ void InitMwin(void)
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = 0; //(HBRUSH)(COLOR_3DFACE+1);
wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = _T("WeatherFrame");
+ wndclass.lpszClassName = L"WeatherFrame";
RegisterClass(&wndclass);
ColourIDT colourid = { 0 };
@@ -346,7 +346,7 @@ void InitMwin(void)
ReleaseDC(0, hdc);
fontid.deffontsettings.charset = DEFAULT_CHARSET;
- mir_tstrcpy(fontid.deffontsettings.szFace, _T("Verdana"));
+ mir_tstrcpy(fontid.deffontsettings.szFace, L"Verdana");
mir_tstrcpy(fontid.backgroundGroup, _T(WEATHERPROTONAME));
mir_tstrcpy(fontid.backgroundName, LPGENT("Frame Background"));
FontRegisterT(&fontid);
@@ -370,7 +370,7 @@ void DestroyMwin(void)
if (frameId)
CallService(MS_CLIST_FRAMES_REMOVEFRAME, frameId, 0);
}
- UnregisterClass(_T("WeatherFrame"), hInst);
+ UnregisterClass(L"WeatherFrame", hInst);
WindowList_Destroy(hMwinWindowList);
UnhookEvent(hFontHook);
}
diff --git a/plugins/Weather/src/weather_opt.cpp b/plugins/Weather/src/weather_opt.cpp
index 9377bf7339..48d275e12b 100644
--- a/plugins/Weather/src/weather_opt.cpp
+++ b/plugins/Weather/src/weather_opt.cpp
@@ -115,7 +115,7 @@ void LoadOptions(void)
opt.eUnit = db_get_w(NULL, WEATHERPROTONAME, "eUnit", 2);
ptrT szValue(db_get_tsa(NULL, WEATHERPROTONAME, "DegreeSign"));
- _tcsncpy_s(opt.DegreeSign, (szValue == NULL) ? _T("") : szValue, _TRUNCATE);
+ _tcsncpy_s(opt.DegreeSign, (szValue == NULL) ? L"" : szValue, _TRUNCATE);
opt.DoNotAppendUnit = db_get_b(NULL, WEATHERPROTONAME, "DoNotAppendUnit", 0);
opt.NoFrac = db_get_b(NULL, WEATHERPROTONAME, "NoFractions", 0);
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp
index 14583fb843..fcd891e70c 100644
--- a/plugins/Weather/src/weather_popup.cpp
+++ b/plugins/Weather/src/weather_popup.cpp
@@ -368,13 +368,13 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam)
case IDC_PD1:
// Popup delay setting from Popup plugin
- SetDlgItemText(hdlg, IDC_DELAY, _T("0"));
+ SetDlgItemText(hdlg, IDC_DELAY, L"0");
CheckRadioButton(hdlg, IDC_PD1, IDC_PD3, IDC_PD1);
break;
case IDC_PD2:
// Popup delay = permanent
- SetDlgItemText(hdlg, IDC_DELAY, _T("-1"));
+ SetDlgItemText(hdlg, IDC_DELAY, L"-1");
CheckRadioButton(hdlg, IDC_PD1, IDC_PD3, IDC_PD2);
break;
@@ -394,9 +394,9 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam)
case IDC_VAR3:
// display variable list
- _tcsncpy(str, _T(" \n"), _countof(str) - 1); // to make the message box wider
+ _tcsncpy(str, L" \n", _countof(str) - 1); // to make the message box wider
mir_tstrncat(str, VAR_LIST_POPUP, _countof(str) - mir_tstrlen(str));
- mir_tstrncat(str, _T("\n"), _countof(str) - mir_tstrlen(str));
+ mir_tstrncat(str, L"\n", _countof(str) - mir_tstrlen(str));
mir_tstrncat(str, CUSTOM_VARS, _countof(str) - mir_tstrlen(str));
MessageBox(NULL, str, TranslateT("Variable List"), MB_OK | MB_ICONASTERISK | MB_TOPMOST);
break;
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp
index 5576693063..753c91c1e8 100644
--- a/plugins/Weather/src/weather_svcs.cpp
+++ b/plugins/Weather/src/weather_svcs.cpp
@@ -123,7 +123,7 @@ INT_PTR WeatherGetInfo(WPARAM, LPARAM lParam)
}
// avatars
-static const TCHAR *statusStr[] = { _T("Light"), _T("Fog"), _T("SShower"), _T("Snow"), _T("RShower"), _T("Rain"), _T("PCloudy"), _T("Cloudy"), _T("Sunny"), _T("NA") };
+static const TCHAR *statusStr[] = { L"Light", L"Fog", L"SShower", L"Snow", L"RShower", L"Rain", L"PCloudy", L"Cloudy", L"Sunny", L"NA" };
static const WORD statusValue[] = { LIGHT, FOG, SSHOWER, SNOW, RSHOWER, RAIN, PCLOUDY, CLOUDY, SUNNY, NA };
INT_PTR WeatherGetAvatarInfo(WPARAM, LPARAM lParam)
@@ -147,12 +147,12 @@ INT_PTR WeatherGetAvatarInfo(WPARAM, LPARAM lParam)
return GAIR_NOAVATAR;
pai->format = PA_FORMAT_PNG;
- mir_sntprintf(pai->filename, _T("%s\\Plugins\\Weather\\%s.png"), szSearchPath, statusStr[i]);
+ mir_sntprintf(pai->filename, L"%s\\Plugins\\Weather\\%s.png", szSearchPath, statusStr[i]);
if (_taccess(pai->filename, 4) == 0)
return GAIR_SUCCESS;
pai->format = PA_FORMAT_GIF;
- mir_sntprintf(pai->filename, _T("%s\\Plugins\\Weather\\%s.gif"), szSearchPath, statusStr[i]);
+ mir_sntprintf(pai->filename, L"%s\\Plugins\\Weather\\%s.gif", szSearchPath, statusStr[i]);
if (_taccess(pai->filename, 4) == 0)
return GAIR_SUCCESS;
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp
index be95d9e56e..6a6403dbdd 100644
--- a/plugins/Weather/src/weather_update.cpp
+++ b/plugins/Weather/src/weather_update.cpp
@@ -44,10 +44,10 @@ int UpdateWeather(MCONTACT hContact)
dbv.pszVal = "";
// log to netlib log for debug purpose
- Netlib_LogfT(hNetlibUser, _T("************************************************************************"));
+ Netlib_LogfT(hNetlibUser, L"************************************************************************");
int dbres = db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv);
- Netlib_LogfT(hNetlibUser, _T("<-- Start update for station -->"));
+ Netlib_LogfT(hNetlibUser, L"<-- Start update for station -->");
// download the info and parse it
// result are stored in database
@@ -58,15 +58,15 @@ int UpdateWeather(MCONTACT hContact)
// show warnings by popup
mir_sntprintf(str, _countof(str) - 105,
TranslateT("Unable to retrieve weather information for %s"), dbv.ptszVal);
- mir_tstrncat(str, _T("\n"), _countof(str) - mir_tstrlen(str));
+ mir_tstrncat(str, L"\n", _countof(str) - mir_tstrlen(str));
TCHAR *tszError = GetError(code);
mir_tstrncat(str, tszError, _countof(str) - mir_tstrlen(str));
WPShowMessage(str, SM_WARNING);
mir_free(tszError);
}
// log to netlib
- Netlib_LogfT(hNetlibUser, _T("Error! Update cannot continue... Start to free memory"));
- Netlib_LogfT(hNetlibUser, _T("<-- Error occurs while updating station: %s -->"), dbv.ptszVal);
+ Netlib_LogfT(hNetlibUser, L"Error! Update cannot continue... Start to free memory");
+ Netlib_LogfT(hNetlibUser, L"<-- Error occurs while updating station: %s -->", dbv.ptszVal);
if (!dbres) db_free(&dbv);
return 1;
}
@@ -104,7 +104,7 @@ int UpdateWeather(MCONTACT hContact)
if (!dbres && dbv.ptszVal[0] != 0) {
if (opt.AlertPopup && !db_get_b(hContact, WEATHERPROTONAME, "DPopUp", 0) && Ch) {
// display alert popup
- mir_sntprintf(str, _T("Alert for %s%c%s"), winfo.city, 255, dbv.ptszVal);
+ mir_sntprintf(str, L"Alert for %s%c%s", winfo.city, 255, dbv.ptszVal);
WPShowMessage(str, SM_WEATHERALERT);
}
// alert issued, set display to italic
@@ -172,7 +172,7 @@ int UpdateWeather(MCONTACT hContact)
DeleteFile(dbv.ptszVal);
// open the file and set point to the end of file
- FILE *file = _tfopen(dbv.ptszVal, _T("a"));
+ FILE *file = _tfopen(dbv.ptszVal, L"a");
db_free(&dbv);
if (file != NULL) {
// write data to the file and close
@@ -203,8 +203,8 @@ int UpdateWeather(MCONTACT hContact)
NotifyEventHooks(hHookWeatherUpdated, hContact, (LPARAM)Ch);
}
- Netlib_LogfT(hNetlibUser, _T("Update Completed - Start to free memory"));
- Netlib_LogfT(hNetlibUser, _T("<-- Update successful for station -->"));
+ Netlib_LogfT(hNetlibUser, L"Update Completed - Start to free memory");
+ Netlib_LogfT(hNetlibUser, L"<-- Update successful for station -->");
// Update frame data
UpdateMwinData(hContact);
@@ -437,7 +437,7 @@ int GetWeatherData(MCONTACT hContact)
mir_free(szData);
return retval;
}
- if (_tcsstr(szData, _T("Document Not Found")) != NULL) {
+ if (_tcsstr(szData, L"Document Not Found") != NULL) {
mir_free(szData);
return DOC_NOT_FOUND;
}
@@ -458,7 +458,7 @@ int GetWeatherData(MCONTACT hContact)
// if it is a normal item with start= and end=, then parse through the downloaded string
// to get a data value.
GetDataValue(&Item->Item, DataValue, &szInfo);
- if (mir_tstrcmp(Item->Item.Name, _T("Condition")) && mir_tstrcmpi(Item->Item.Unit, _T("Cond")))
+ if (mir_tstrcmp(Item->Item.Name, L"Condition") && mir_tstrcmpi(Item->Item.Unit, L"Cond"))
_tcsncpy(DataValue, TranslateTS(DataValue), MAX_DATA_LEN - 1);
break;
@@ -476,7 +476,7 @@ int GetWeatherData(MCONTACT hContact)
// go through each part of the operation string seperated by the & operator
do {
// the end of the string, last item
- chop = _tcsstr(str, _T(" & "));
+ chop = _tcsstr(str, L" & ");
if (chop == NULL)
chop = _tcschr(str, '\0');
@@ -543,17 +543,17 @@ int GetWeatherData(MCONTACT hContact)
// don't store data if it is not available
if ((DataValue[0] != 0 && mir_tstrcmp(DataValue, NODATA) &&
- mir_tstrcmp(DataValue, TranslateTS(NODATA)) && mir_tstrcmp(Item->Item.Name, _T("Ignore"))) ||
- (!mir_tstrcmp(Item->Item.Name, _T("Alert")) && i == 0)) {
+ mir_tstrcmp(DataValue, TranslateTS(NODATA)) && mir_tstrcmp(Item->Item.Name, L"Ignore")) ||
+ (!mir_tstrcmp(Item->Item.Name, L"Alert") && i == 0)) {
// temporary workaround for mToolTip to show feel-like temperature
- if (!mir_tstrcmp(Item->Item.Name, _T("Feel")))
+ if (!mir_tstrcmp(Item->Item.Name, L"Feel"))
db_set_ts(hContact, WEATHERCONDITION, "Heat Index", DataValue);
GetStationID(hContact, Svc, _countof(Svc));
if (!mir_tstrcmp(Svc, opt.Default))
db_set_ts(NULL, DEFCURRENTWEATHER, _T2A(Item->Item.Name), DataValue);
- if (!mir_tstrcmp(Item->Item.Name, _T("Condition"))) {
+ if (!mir_tstrcmp(Item->Item.Name, L"Condition")) {
TCHAR buf[128], *cbuf;
- mir_sntprintf(buf, _T("#%s Weather"), DataValue);
+ mir_sntprintf(buf, L"#%s Weather", DataValue);
cbuf = TranslateTS(buf);
if (cbuf[0] == '#')
cbuf = TranslateTS(DataValue);
@@ -561,9 +561,9 @@ int GetWeatherData(MCONTACT hContact)
CharLowerBuff(DataValue, (DWORD)mir_tstrlen(DataValue));
cond = GetIcon(DataValue, Data);
}
- else if (mir_tstrcmpi(Item->Item.Unit, _T("Cond")) == 0) {
+ else if (mir_tstrcmpi(Item->Item.Unit, L"Cond") == 0) {
TCHAR buf[128], *cbuf;
- mir_sntprintf(buf, _T("#%s Weather"), DataValue);
+ mir_sntprintf(buf, L"#%s Weather", DataValue);
cbuf = TranslateTS(buf);
if (cbuf[0] == '#')
cbuf = TranslateTS(DataValue);
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp
index 22b185c261..b1538f332e 100644
--- a/plugins/Weather/src/weather_userinfo.cpp
+++ b/plugins/Weather/src/weather_userinfo.cpp
@@ -67,7 +67,7 @@ static void LoadBriefInfoText(HWND hwndDlg, MCONTACT hContact)
GetDisplay(&winfo, opt.bText, str);
SetDlgItemText(hwndDlg, IDC_MTEXT, str);
- GetDisplay(&winfo, _T("%c, %t"), str);
+ GetDisplay(&winfo, L"%c, %t", str);
SetWindowText(hwndDlg, winfo.city);
SetDlgItemText(hwndDlg, IDC_HEADERBAR, str);
}
@@ -177,7 +177,7 @@ static INT_PTR CALLBACK DlgProcMoreData(HWND hwndDlg, UINT msg, WPARAM wParam, L
LV_ITEM lvi = { 0 };
lvi.mask = LVIF_TEXT | LVIF_PARAM;
lvi.lParam = 1;
- lvi.pszText = _T("");
+ lvi.pszText = L"";
lvi.iItem = ListView_InsertItem(hList, &lvi);
lvi.pszText = TranslateT("Retrieving new data, please wait...");
ListView_SetItemText(hList, lvi.iItem, 1, lvi.pszText);
@@ -267,11 +267,11 @@ static INT_PTR CALLBACK DlgProcUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
SendDlgItemMessage(hwndDlg, IDC_INFO2, WM_SETFONT, (WPARAM)CreateFontIndirect(&lf), 0);
}
// set the text for displaying other current weather conditions data
- GetDisplay(&w, _T("%c %t"), str);
+ GetDisplay(&w, L"%c %t", str);
SetDlgItemText(hwndDlg, IDC_INFO2, str);
SetDlgItemText(hwndDlg, IDC_INFO3, w.feel);
SetDlgItemText(hwndDlg, IDC_INFO4, w.pressure);
- GetDisplay(&w, _T("%i %w"), str);
+ GetDisplay(&w, L"%i %w", str);
SetDlgItemText(hwndDlg, IDC_INFO5, str);
SetDlgItemText(hwndDlg, IDC_INFO6, w.dewpoint);
SetDlgItemText(hwndDlg, IDC_INFO7, w.sunrise);