diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2012-08-19 12:51:33 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2012-08-19 12:51:33 +0000 |
commit | b7923a051fc0a9e84edf5dbb0075347857ea4994 (patch) | |
tree | 23a6714a9403aa20f6e3db0263a4c57c38d50da9 /protocols/Weather/weather_update.cpp | |
parent | 6d05dddfffae5920216ef044e18f46b03a7c3dc6 (diff) |
another unicode fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@1501 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Weather/weather_update.cpp')
-rw-r--r-- | protocols/Weather/weather_update.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/protocols/Weather/weather_update.cpp b/protocols/Weather/weather_update.cpp index f114b80acc..3e6c2c6120 100644 --- a/protocols/Weather/weather_update.cpp +++ b/protocols/Weather/weather_update.cpp @@ -37,13 +37,8 @@ extern HANDLE hUpdateMutex; int UpdateWeather(HANDLE hContact)
{
TCHAR str[256], str2[MAX_TEXT_SIZE];
- int code;
- FILE *file;
DBVARIANT dbv;
BOOL Ch = FALSE;
- WEATHERINFO winfo;
- HWND hMoreDataDlg;
- int dbres;
if (hContact == NULL) return 1; // some error prevention
@@ -51,13 +46,13 @@ int UpdateWeather(HANDLE hContact) // log to netlib log for debug purpose
Netlib_Logf(hNetlibUser, "************************************************************************");
- dbres = DBGetContactSettingTString(hContact, WEATHERPROTONAME, "Nick", &dbv);
+ int dbres = DBGetContactSettingTString(hContact, WEATHERPROTONAME, "Nick", &dbv);
Netlib_Logf(hNetlibUser, "<-- Start update for station -->");
// download the info and parse it
// result are stored in database
- code = GetWeatherData(hContact);
+ int code = GetWeatherData(hContact);
if (code != 0)
{
// error occurs if the return value is not equals to 0
@@ -78,7 +73,7 @@ int UpdateWeather(HANDLE hContact) if (!dbres) DBFreeVariant(&dbv);
// initialize, load new weather Data
- winfo = LoadWeatherInfo(hContact);
+ WEATHERINFO winfo = LoadWeatherInfo(hContact);
// translate weather condition
_tcscpy(winfo.cond, TranslateTS(winfo.cond));
@@ -176,7 +171,7 @@ int UpdateWeather(HANDLE hContact) if (DBGetContactSettingByte(hContact,WEATHERPROTONAME,"Overwrite",0))
DeleteFile(dbv.ptszVal);
// open the file and set point to the end of file
- file = fopen( dbv.pszVal, "a");
+ FILE *file = _tfopen( dbv.ptszVal, _T("a"));
DBFreeVariant(&dbv);
if (file != NULL) {
// write data to the file and close
@@ -212,7 +207,7 @@ int UpdateWeather(HANDLE hContact) UpdateMwinData(hContact);
// update brief info if its opened
- hMoreDataDlg = WindowList_Find(hDataWindowList, hContact);
+ HWND hMoreDataDlg = WindowList_Find(hDataWindowList, hContact);
if (hMoreDataDlg != NULL) PostMessage(hMoreDataDlg, WM_UPDATEDATA, 0, 0);
return 0;
}
|