diff options
Diffstat (limited to 'plugins/Weather')
-rw-r--r-- | plugins/Weather/src/weather_contacts.cpp | 2 | ||||
-rw-r--r-- | plugins/Weather/src/weather_conv.cpp | 18 | ||||
-rw-r--r-- | plugins/Weather/src/weather_data.cpp | 10 | ||||
-rw-r--r-- | plugins/Weather/src/weather_http.cpp | 2 | ||||
-rw-r--r-- | plugins/Weather/src/weather_ini.cpp | 2 | ||||
-rw-r--r-- | plugins/Weather/src/weather_mwin.cpp | 22 | ||||
-rw-r--r-- | plugins/Weather/src/weather_popup.cpp | 4 | ||||
-rw-r--r-- | plugins/Weather/src/weather_update.cpp | 2 |
8 files changed, 31 insertions, 31 deletions
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp index a00ce32d04..669a9bf560 100644 --- a/plugins/Weather/src/weather_contacts.cpp +++ b/plugins/Weather/src/weather_contacts.cpp @@ -363,7 +363,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa GetDlgItemText(hwndDlg, IDC_ID, str, SIZEOF(str));
db_set_ts(hContact, WEATHERPROTONAME, "ID", str);
if ((BYTE)IsDlgButtonChecked(hwndDlg, IDC_DEFA)) { // if default station is set
- _tcscpy(opt.Default, str);
+ mir_tstrcpy(opt.Default, str);
opt.DefStn = hContact;
db_set_ts(NULL, WEATHERPROTONAME, "Default", opt.Default);
}
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index 7d73d76fed..001e0a1396 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -88,11 +88,11 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str) // quit if the value obtained is N/A or not a number
if ( !mir_tstrcmp(tempchar, NODATA) || !mir_tstrcmp(tempchar, _T("N/A"))) {
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
return;
}
if ( !is_number(tempchar)) {
- _tcscpy(str, NODATA);
+ mir_tstrcpy(str, NODATA);
return;
}
@@ -138,7 +138,7 @@ void GetPressure(TCHAR *tempchar, TCHAR *unit, TCHAR* str) // if it end up with 0, then it's not a number, return the original string and quit
output = _ttof(tempchar);
if (output == 0) {
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
return;
}
@@ -175,7 +175,7 @@ void GetPressure(TCHAR *tempchar, TCHAR *unit, TCHAR* str) mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit/10, intunit%10, opt.DoNotAppendUnit ? _T("") : TranslateT("mm"));
break;
default:
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
break;
}
@@ -244,7 +244,7 @@ void GetDist(TCHAR *tempchar, TCHAR *unit, TCHAR *str) // if it end up with 0, then it's not a number, return the original string and quit
output = _ttof(tempchar);
if (output == 0) {
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
return;
}
@@ -265,7 +265,7 @@ void GetDist(TCHAR *tempchar, TCHAR *unit, TCHAR *str) mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit/10, intunit%10, opt.DoNotAppendUnit ? _T("") : TranslateT("miles"));
break;
default:
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
break;
}
}
@@ -284,7 +284,7 @@ void GetElev(TCHAR *tempchar, TCHAR *unit, TCHAR *str) // if it end up with 0, then it's not a number, return the original string and quit
output = _ttof(tempchar);
if (output == 0) {
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
return;
}
@@ -305,7 +305,7 @@ void GetElev(TCHAR *tempchar, TCHAR *unit, TCHAR *str) mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit/10, intunit%10, opt.DoNotAppendUnit ? _T("") : TranslateT("m"));
break;
default:
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
break;
}
}
@@ -594,7 +594,7 @@ void GetSvc(TCHAR *pszID) void GetID(TCHAR *pszID)
{
TCHAR *chop = _tcsstr(pszID, _T("/"));
- if (chop != NULL) _tcscpy(pszID, chop+1);
+ 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 76f0bb70af..dd01691fc3 100644 --- a/plugins/Weather/src/weather_data.cpp +++ b/plugins/Weather/src/weather_data.cpp @@ -204,7 +204,7 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) !mir_tstrcmpi(UpdateData->Unit, _T("K")))
{
GetTemp(Data, UpdateData->Unit, str);
- _tcscpy(Data, str);
+ mir_tstrcpy(Data, str);
}
// pressure
else if ( !mir_tstrcmp(UpdateData->Name, _T("Pressure")) || !mir_tstrcmpi(UpdateData->Unit, _T("HPA")) ||
@@ -213,7 +213,7 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) !mir_tstrcmpi(UpdateData->Unit, _T("MM")))
{
GetPressure(Data, UpdateData->Unit, str);
- _tcscpy(Data, str);
+ mir_tstrcpy(Data, str);
}
// speed
else if ( !mir_tstrcmp(UpdateData->Name, _T("Wind Speed")) || !mir_tstrcmpi(UpdateData->Unit, _T("KM/H")) ||
@@ -221,21 +221,21 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) !mir_tstrcmpi(UpdateData->Unit, _T("KNOTS")))
{
GetSpeed(Data, UpdateData->Unit, str);
- _tcscpy(Data, 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")))
{
GetDist(Data, UpdateData->Unit, str);
- _tcscpy(Data, 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")))
{
GetElev(Data, UpdateData->Unit, str);
- _tcscpy(Data, str);
+ mir_tstrcpy(Data, str);
}
// converting case for condition to the upper+lower format
else if ( !mir_tstrcmpi(UpdateData->Unit, _T("COND")))
diff --git a/plugins/Weather/src/weather_http.cpp b/plugins/Weather/src/weather_http.cpp index c59ee3bdfc..add11a1e1c 100644 --- a/plugins/Weather/src/weather_http.cpp +++ b/plugins/Weather/src/weather_http.cpp @@ -83,7 +83,7 @@ int InternetDownloadFile (char *szUrl, char *cookie, char *userAgent, TCHAR **sz // 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
- _tcscpy(*szData, _T("NetLib error occurred!!"));
+ mir_tstrcpy(*szData, _T("NetLib error occurred!!"));
hNetlibHttp = NULL;
return NLHRF_REDIRECT;
}
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp index 812ec987f3..41eb87c70d 100644 --- a/plugins/Weather/src/weather_ini.cpp +++ b/plugins/Weather/src/weather_ini.cpp @@ -96,7 +96,7 @@ void ResetDataItem(WIDATAITEM *Item, const TCHAR *name) {
TCHAR str[] = _T("ID Search - Station Name");
Item->Name = ( TCHAR* )mir_alloc( sizeof(str));
- _tcscpy(Item->Name, str);
+ mir_tstrcpy(Item->Name, str);
Item->Start = _T("");
Item->End = _T("");
Item->Unit = _T("");
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index 5e6573461f..485abfeefe 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -167,11 +167,11 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara {
FontIDT fntid = {0};
- _tcscpy(fntid.group, _T(WEATHERPROTONAME));
- _tcscpy(fntid.name, LPGENT("Frame Font"));
+ mir_tstrcpy(fntid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fntid.name, LPGENT("Frame Font"));
fntc = CallService(MS_FONT_GETT, (WPARAM)&fntid, (LPARAM)&lfnt);
- _tcscpy(fntid.name, LPGENT("Frame Title Font"));
+ mir_tstrcpy(fntid.name, LPGENT("Frame Title Font"));
fntc1 = CallService(MS_FONT_GETT, (WPARAM)&fntid, (LPARAM)&lfnt1);
}
@@ -344,8 +344,8 @@ void InitMwin(void) colourid.cbSize = sizeof(ColourIDT);
mir_strcpy(colourid.dbSettingsGroup, WEATHERPROTONAME);
mir_strcpy(colourid.setting, "ColorMwinFrame");
- _tcscpy(colourid.name, LPGENT("Frame Background"));
- _tcscpy(colourid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(colourid.name, LPGENT("Frame Background"));
+ mir_tstrcpy(colourid.group, _T(WEATHERPROTONAME));
colourid.defcolour = GetSysColor(COLOR_3DFACE);
ColourRegisterT(&colourid);
@@ -353,8 +353,8 @@ void InitMwin(void) fontid.cbSize = sizeof(FontIDT);
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID;
mir_strcpy(fontid.dbSettingsGroup, WEATHERPROTONAME);
- _tcscpy(fontid.group, _T(WEATHERPROTONAME));
- _tcscpy(fontid.name, LPGENT("Frame Font"));
+ mir_tstrcpy(fontid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fontid.name, LPGENT("Frame Font"));
mir_strcpy(fontid.prefix, "fnt0");
HDC hdc = GetDC(NULL);
@@ -362,13 +362,13 @@ void InitMwin(void) ReleaseDC(0, hdc);
fontid.deffontsettings.charset = DEFAULT_CHARSET;
- _tcscpy(fontid.deffontsettings.szFace, _T("Verdana"));
- _tcscpy(fontid.backgroundGroup, _T(WEATHERPROTONAME));
- _tcscpy(fontid.backgroundName, LPGENT("Frame Background"));
+ mir_tstrcpy(fontid.deffontsettings.szFace, _T("Verdana"));
+ mir_tstrcpy(fontid.backgroundGroup, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fontid.backgroundName, LPGENT("Frame Background"));
FontRegisterT(&fontid);
fontid.deffontsettings.style = DBFONTF_BOLD;
- _tcscpy(fontid.name, LPGENT("Frame Title Font"));
+ mir_tstrcpy(fontid.name, LPGENT("Frame Title Font"));
mir_strcpy(fontid.prefix, "fnt1");
FontRegisterT(&fontid);
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp index 050f0e01c4..b7ca1555cd 100644 --- a/plugins/Weather/src/weather_popup.cpp +++ b/plugins/Weather/src/weather_popup.cpp @@ -95,8 +95,8 @@ int WeatherError(WPARAM wParam, LPARAM lParam) // setup the popup
ppd.lchIcon = (HICON)LoadImage(NULL, MAKEINTRESOURCE(OIC_BANG), IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
- _tcscpy(ppd.lptzContactName, str1);
- _tcscpy(ppd.lptzText, str2);
+ mir_tstrcpy(ppd.lptzContactName, str1);
+ mir_tstrcpy(ppd.lptzText, str2);
ppd.colorBack = (opt.UseWinColors)?GetSysColor(COLOR_BTNFACE):opt.BGColour;
ppd.colorText = (opt.UseWinColors)?GetSysColor(COLOR_WINDOWTEXT):opt.TextColour;
ppd.iSeconds = opt.pDelay;
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index ffa4818c19..8baf32ee74 100644 --- a/plugins/Weather/src/weather_update.cpp +++ b/plugins/Weather/src/weather_update.cpp @@ -78,7 +78,7 @@ int UpdateWeather(MCONTACT hContact) WEATHERINFO winfo = LoadWeatherInfo(hContact);
// translate weather condition
- _tcscpy(winfo.cond, TranslateTS(winfo.cond));
+ mir_tstrcpy(winfo.cond, TranslateTS(winfo.cond));
// compare the old condition and determine if the weather had changed
if (opt.UpdateOnlyConditionChanged) { // consider condition change
|