summaryrefslogtreecommitdiff
path: root/plugins/Weather/src/weather_http.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/Weather/src/weather_http.cpp
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather/src/weather_http.cpp')
-rw-r--r--plugins/Weather/src/weather_http.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Weather/src/weather_http.cpp b/plugins/Weather/src/weather_http.cpp
index 429f8f654c..5567dff83f 100644
--- a/plugins/Weather/src/weather_http.cpp
+++ b/plugins/Weather/src/weather_http.cpp
@@ -44,7 +44,7 @@ static int findHeader(const NETLIBHTTPREQUEST *nlhrReply, const char *hdr)
// return value = 0 for success, 1 or HTTP error code for failure
// global var used: szData, szInfo = containing the retrieved data
//
-int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szData)
+int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, wchar_t **szData)
{
if (userAgent == NULL || userAgent[0] == 0)
userAgent = NETLIB_USER_AGENT;
@@ -77,7 +77,7 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szD
NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser, (LPARAM)&nlhr);
if (nlhrReply == 0) {
// if the data does not downloaded successfully (ie. disconnected), then return 1000 as error code
- *szData = (TCHAR*)mir_alloc(512);
+ *szData = (wchar_t*)mir_alloc(512);
// store the error code in szData
mir_tstrcpy(*szData, L"NetLib error occurred!!");
hNetlibHttp = NULL;
@@ -124,7 +124,7 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szD
}
}
- TCHAR *retVal = NULL;
+ wchar_t *retVal = NULL;
if (bIsUtf)
retVal = mir_utf8decodeT(nlhrReply->pData);
if (retVal == NULL)
@@ -135,7 +135,7 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szD
}
// return error code if the recieved code is neither 200 OK nor 302 Moved
else {
- *szData = (TCHAR*)mir_alloc(512);
+ *szData = (wchar_t*)mir_alloc(512);
// store the error code in szData
mir_sntprintf(*szData, 512, L"Error occured! HTTP Error: %i\n", nlhrReply->resultCode);
result = nlhrReply->resultCode;