From b280d2eae93fb22b4fdb45218d8a06287a97030e Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 12:49:22 +0000 Subject: replace _tcscmp to mir_tstrcmp git-svn-id: http://svn.miranda-ng.org/main/trunk@13753 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Weather/src/weather_addstn.cpp | 2 +- plugins/Weather/src/weather_contacts.cpp | 6 +++--- plugins/Weather/src/weather_conv.cpp | 6 +++--- plugins/Weather/src/weather_data.cpp | 20 ++++++++++---------- plugins/Weather/src/weather_info.cpp | 2 +- plugins/Weather/src/weather_ini.cpp | 2 +- plugins/Weather/src/weather_update.cpp | 16 ++++++++-------- 7 files changed, 27 insertions(+), 27 deletions(-) (limited to 'plugins/Weather/src') diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp index b864ff840c..7c70cd4f8a 100644 --- a/plugins/Weather/src/weather_addstn.cpp +++ b/plugins/Weather/src/weather_addstn.cpp @@ -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 ( _tcscmp(sID, _T("#"))) { + if ( mir_tstrcmp(sID, _T("#"))) { WIDATALIST *Item = WIHead; // search every weather service using the search station ID diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp index abe63173db..a00ce32d04 100644 --- a/plugins/Weather/src/weather_contacts.cpp +++ b/plugins/Weather/src/weather_contacts.cpp @@ -184,7 +184,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa if ( !db_get_ts(hContact, WEATHERPROTONAME, "ID", &dbv)) { SetDlgItemText(hwndDlg, IDC_ID, dbv.ptszVal); // check if the station is a default station - CheckDlgButton(hwndDlg, IDC_DEFA, _tcscmp(dbv.ptszVal, opt.Default) != 0 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_DEFA, mir_tstrcmp(dbv.ptszVal, opt.Default) != 0 ? BST_CHECKED : BST_UNCHECKED); db_free(&dbv); } if ( !db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv)) { @@ -437,7 +437,7 @@ int ContactDeleted(WPARAM wParam, LPARAM lParam) // exit this function if it is not default station DBVARIANT dbv; if (!db_get_ts(wParam, WEATHERPROTONAME, "ID", &dbv)) { - if ( _tcscmp(dbv.ptszVal, opt.Default)) { + if ( mir_tstrcmp(dbv.ptszVal, opt.Default)) { db_free(&dbv); return 0; } @@ -451,7 +451,7 @@ int ContactDeleted(WPARAM wParam, LPARAM lParam) if ( !db_get_ts(hContact, WEATHERPROTONAME, "ID", &dbv)) { // if the station is not a default station, set it as the new default station // this is the first weather station encountered from the search - if ( _tcscmp(opt.Default, dbv.ptszVal)) { + if ( mir_tstrcmp(opt.Default, dbv.ptszVal)) { _tcsncpy(opt.Default, dbv.ptszVal, SIZEOF(opt.Default) - 1); opt.DefStn = hContact; db_free(&dbv); diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index 15288b052a..b8cbb97f95 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -87,7 +87,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 ( !_tcscmp(tempchar, NODATA) || !_tcscmp(tempchar, _T("N/A"))) { + if ( !mir_tstrcmp(tempchar, NODATA) || !mir_tstrcmp(tempchar, _T("N/A"))) { _tcscpy(str, tempchar); return; } @@ -400,7 +400,7 @@ WORD GetIcon(const TCHAR* cond, WIDATA *Data) return statusValue[i]; // loop until the translation string exists (ie, the translated string is differ from original) } - while (_tcscmp(TranslateTS(LangPackStr), LangPackStr)); + while (mir_tstrcmp(TranslateTS(LangPackStr), LangPackStr)); } return NA; @@ -536,7 +536,7 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str) case 's': _tcscat(str, w->id); break; case 't': _tcscat(str, w->temp); break; case 'u': - if (_tcscmp(w->update, NODATA)) _tcscat(str, w->update); + if (mir_tstrcmp(w->update, NODATA)) _tcscat(str, w->update); else _tcscat(str, TranslateT("")); break; case 'v': _tcscat(str, w->vis); break; diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp index 1908fe3115..02ee823423 100644 --- a/plugins/Weather/src/weather_data.cpp +++ b/plugins/Weather/src/weather_data.cpp @@ -162,7 +162,7 @@ void EraseAllInfo() // get the handle of the default station if (opt.DefStn == NULL) { if ( !db_get_ts(hContact,WEATHERPROTONAME, "ID",&dbv)) { - if ( !_tcscmp(dbv.ptszVal, opt.Default)) + if ( !mir_tstrcmp(dbv.ptszVal, opt.Default)) opt.DefStn = hContact; db_free(&dbv); } @@ -195,11 +195,11 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) TCHAR str[MAX_DATA_LEN]; // convert the unit - if ( _tcscmp(Data, TranslateT("")) && _tcscmp(Data, NODATA) && _tcscmp(Data, TranslateTS(NODATA))) { + if ( mir_tstrcmp(Data, TranslateT("")) && mir_tstrcmp(Data, NODATA) && mir_tstrcmp(Data, TranslateTS(NODATA))) { // temperature - if ( !_tcscmp(UpdateData->Name, _T("Temperature")) || !_tcscmp(UpdateData->Name, _T("High")) || - !_tcscmp(UpdateData->Name, _T("Low")) || !_tcscmp(UpdateData->Name, _T("Feel")) || - !_tcscmp(UpdateData->Name, _T("Dewpoint")) || + 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")) || !_tcsicmp(UpdateData->Unit, _T("C")) || !_tcsicmp(UpdateData->Unit, _T("F")) || !_tcsicmp(UpdateData->Unit, _T("K"))) { @@ -207,7 +207,7 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) _tcscpy(Data, str); } // pressure - else if ( !_tcscmp(UpdateData->Name, _T("Pressure")) || !_tcsicmp(UpdateData->Unit, _T("HPA")) || + else if ( !mir_tstrcmp(UpdateData->Name, _T("Pressure")) || !_tcsicmp(UpdateData->Unit, _T("HPA")) || !_tcsicmp(UpdateData->Unit, _T("KPA")) || !_tcsicmp(UpdateData->Unit, _T("MB")) || !_tcsicmp(UpdateData->Unit, _T("TORR")) || !_tcsicmp(UpdateData->Unit, _T("IN")) || !_tcsicmp(UpdateData->Unit, _T("MM"))) @@ -216,7 +216,7 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) _tcscpy(Data, str); } // speed - else if ( !_tcscmp(UpdateData->Name, _T("Wind Speed")) || !_tcsicmp(UpdateData->Unit, _T("KM/H")) || + else if ( !mir_tstrcmp(UpdateData->Name, _T("Wind Speed")) || !_tcsicmp(UpdateData->Unit, _T("KM/H")) || !_tcsicmp(UpdateData->Unit, _T("M/S")) || !_tcsicmp(UpdateData->Unit, _T("MPH")) || !_tcsicmp(UpdateData->Unit, _T("KNOTS"))) { @@ -224,14 +224,14 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) _tcscpy(Data, str); } // visibility - else if ( !_tcscmp(UpdateData->Name, _T("Visibility")) || !_tcsicmp(UpdateData->Unit, _T("KM")) || + else if ( !mir_tstrcmp(UpdateData->Name, _T("Visibility")) || !_tcsicmp(UpdateData->Unit, _T("KM")) || !_tcsicmp(UpdateData->Unit, _T("MILES"))) { GetDist(Data, UpdateData->Unit, str); _tcscpy(Data, str); } // elevation - else if ( !_tcscmp(UpdateData->Name, _T("Elevation")) || !_tcsicmp(UpdateData->Unit, _T("FT")) || + else if ( !mir_tstrcmp(UpdateData->Name, _T("Elevation")) || !_tcsicmp(UpdateData->Unit, _T("FT")) || !_tcsicmp(UpdateData->Unit, _T("M"))) { GetElev(Data, UpdateData->Unit, str); @@ -336,7 +336,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 && _tcscmp(UpdateData->Name, _T("Ignore"))) { + if (opt.ShowWarnings && UpdateData->Name[0] != 0 && mir_tstrcmp(UpdateData->Name, _T("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_info.cpp b/plugins/Weather/src/weather_info.cpp index 21eb577854..055308f903 100644 --- a/plugins/Weather/src/weather_info.cpp +++ b/plugins/Weather/src/weather_info.cpp @@ -226,7 +226,7 @@ void MoreVarList(void) { // the custom variable is defined as "%[]" // ignore the "hi" item and hidden items - if ( _tcscmp(WItem->Item.Name, _T("Ignore")) && WItem->Item.Name[0] != '#') { + if ( mir_tstrcmp(WItem->Item.Name, _T("Ignore")) && WItem->Item.Name[0] != '#') { mir_sntprintf(tempstr, SIZEOF(tempstr), _T("%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 diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp index 0d0678fd15..e563353491 100644 --- a/plugins/Weather/src/weather_ini.cpp +++ b/plugins/Weather/src/weather_ini.cpp @@ -53,7 +53,7 @@ WIDATA* GetWIData(TCHAR *pszServ) // loop through the list to find matching internal name for (WIDATALIST *Item = WIHead;Item != NULL;Item = Item->next) // if internal name found, return the data - if ( _tcscmp(Item->Data.InternalName, pszServ) == 0) + if ( mir_tstrcmp(Item->Data.InternalName, pszServ) == 0) return &Item->Data; // return NULL when no match found diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index 8e74b14a38..7b757961cc 100644 --- a/plugins/Weather/src/weather_update.cpp +++ b/plugins/Weather/src/weather_update.cpp @@ -152,7 +152,7 @@ int UpdateWeather(MCONTACT hContact) db_set_b(hContact, WEATHERPROTONAME, "IsUpdated", TRUE); // save info for default weather condition - if ( !_tcscmp(winfo.id, opt.Default) && !opt.NoProtoCondition) { + if ( !mir_tstrcmp(winfo.id, opt.Default) && !opt.NoProtoCondition) { // save current condition for default station to be displayed after the update old_status = status; status = winfo.status; @@ -457,7 +457,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 ( _tcscmp(Item->Item.Name, _T("Condition")) && _tcsicmp(Item->Item.Unit, _T("Cond"))) + if ( mir_tstrcmp(Item->Item.Name, _T("Condition")) && _tcsicmp(Item->Item.Unit, _T("Cond"))) _tcsncpy(DataValue, TranslateTS(DataValue), MAX_DATA_LEN - 1); break; @@ -540,17 +540,17 @@ int GetWeatherData(MCONTACT hContact) } } // don't store data if it is not available - if ((DataValue[0] != 0 && _tcscmp(DataValue, NODATA) && - _tcscmp(DataValue, TranslateTS(NODATA)) && _tcscmp(Item->Item.Name, _T("Ignore"))) || - ( !_tcscmp(Item->Item.Name, _T("Alert")) && i == 0)) + 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)) { // temporary workaround for mToolTip to show feel-like temperature - if ( !_tcscmp(Item->Item.Name, _T("Feel"))) + if ( !mir_tstrcmp(Item->Item.Name, _T("Feel"))) db_set_ts(hContact, WEATHERCONDITION, "Heat Index", DataValue); GetStationID(hContact, Svc, SIZEOF(Svc)); - if ( !_tcscmp(Svc, opt.Default)) + if ( !mir_tstrcmp(Svc, opt.Default)) db_set_ts(NULL, DEFCURRENTWEATHER, _T2A(Item->Item.Name), DataValue); - if ( !_tcscmp(Item->Item.Name, _T("Condition"))) { + if ( !mir_tstrcmp(Item->Item.Name, _T("Condition"))) { TCHAR buf[128], *cbuf; mir_sntprintf(buf, SIZEOF(buf), _T("#%s Weather"), DataValue); cbuf = TranslateTS(buf); -- cgit v1.2.3