diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-18 11:49:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-18 11:49:54 +0000 |
commit | 878d72910cccf4f84c7cb45bb4c11134920f3166 (patch) | |
tree | 251fba89632c389309ff9b2451850aa949efb8d0 /plugins/Weather/src/weather_addstn.cpp | |
parent | 871410044ecbac0d2dd67a7c98f8bcd2df9410eb (diff) |
- naming conflict;
- warning fixes;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14988 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather/src/weather_addstn.cpp')
-rw-r--r-- | plugins/Weather/src/weather_addstn.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp index f8d54ad42e..e8e8dc25c3 100644 --- a/plugins/Weather/src/weather_addstn.cpp +++ b/plugins/Weather/src/weather_addstn.cpp @@ -25,7 +25,7 @@ to the contact list. Contain code for both name and ID search. #include "stdafx.h"
// variables used for weather_addstn.c
-static int searchId = -1;
+static int sttSearchId = -1;
static TCHAR name1[256];
// ============ ADDING NEW STATION ============
@@ -133,7 +133,7 @@ BOOL CheckSearch() { // ============ BASIC ID SEARCH ============
-static TCHAR sID[32];
+static TCHAR sttSID[32];
// A timer process for the ID search (threaded)
static void __cdecl BasicSearchTimerProc(LPVOID)
@@ -141,26 +141,26 @@ static void __cdecl BasicSearchTimerProc(LPVOID) int result;
// search only when it's not current updating weather.
if (CheckSearch())
- result = IDSearch(sID, searchId);
+ result = IDSearch(sttSID, sttSearchId);
// broadcast the search result
- ProtoBroadcastAck(WEATHERPROTONAME, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)searchId, 0);
+ ProtoBroadcastAck(WEATHERPROTONAME, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)sttSearchId, 0);
// exit the search
- searchId = -1;
+ sttSearchId = -1;
}
// the service function for ID search
// lParam = ID search string
INT_PTR WeatherBasicSearch(WPARAM, LPARAM lParam)
{
- if (searchId != -1) return 0; //only one search at a time
- _tcsncpy(sID, ( TCHAR* )lParam, _countof(sID));
- sID[_countof(sID)-1] = 0;
- searchId = 1;
+ if (sttSearchId != -1) return 0; //only one search at a time
+ _tcsncpy(sttSID, ( TCHAR* )lParam, _countof(sttSID));
+ sttSID[_countof(sttSID)-1] = 0;
+ sttSearchId = 1;
// create a thread for the ID search
mir_forkthread(BasicSearchTimerProc, NULL);
- return searchId;
+ return sttSearchId;
}
// ============ NAME SEARCH ============
@@ -171,13 +171,13 @@ static void __cdecl NameSearchTimerProc(LPVOID) // search only when it's not current updating weather.
if (CheckSearch())
if (name1[0] != 0)
- NameSearch(name1, searchId); // search nickname field
+ NameSearch(name1, sttSearchId); // search nickname field
// broadcast the result
- ProtoBroadcastAck(WEATHERPROTONAME, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)searchId, 0);
+ ProtoBroadcastAck(WEATHERPROTONAME, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)sttSearchId, 0);
// exit the search
- searchId = -1;
+ sttSearchId = -1;
}
static INT_PTR CALLBACK WeatherSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM)
@@ -207,14 +207,14 @@ INT_PTR WeatherCreateAdvancedSearchUI(WPARAM, LPARAM lParam) // service function for name search
INT_PTR WeatherAdvancedSearch(WPARAM, LPARAM lParam)
{
- if (searchId != -1) return 0; //only one search at a time
+ if (sttSearchId != -1) return 0; //only one search at a time
- searchId = 1;
+ sttSearchId = 1;
GetDlgItemText((HWND)lParam, IDC_SEARCHCITY, name1, _countof(name1));
// search for the weather station using a thread
mir_forkthread(NameSearchTimerProc, NULL);
- return searchId;
+ return sttSearchId;
}
// ============ SEARCH FOR A WEATHER STATION USING ID ============
|