summaryrefslogtreecommitdiff
path: root/plugins/Weather/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Weather/src')
-rw-r--r--plugins/Weather/src/weather_contacts.cpp4
-rw-r--r--plugins/Weather/src/weather_info.cpp82
-rw-r--r--plugins/Weather/src/weather_ini.cpp6
-rw-r--r--plugins/Weather/src/weather_popup.cpp6
-rw-r--r--plugins/Weather/src/weather_update.cpp8
5 files changed, 53 insertions, 53 deletions
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp
index 669a9bf560..5eec260dd7 100644
--- a/plugins/Weather/src/weather_contacts.cpp
+++ b/plugins/Weather/src/weather_contacts.cpp
@@ -294,12 +294,12 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
ofn.nMaxFile = SIZEOF(str);
// set filters
_tcsncpy(filter, TranslateT("Text Files"), SIZEOF(filter) - 1);
- _tcsncat(filter, _T(" (*.txt)"), SIZEOF(filter) - mir_tstrlen(filter));
+ mir_tstrncat(filter, _T(" (*.txt)"), SIZEOF(filter) - mir_tstrlen(filter));
pfilter = filter + mir_tstrlen(filter)+1;
_tcsncpy(pfilter, _T("*.txt"), SIZEOF(filter) - 1);
pfilter = pfilter + mir_tstrlen(pfilter)+1;
_tcsncpy(pfilter, TranslateT("All Files"), SIZEOF(filter) - 1);
- _tcsncat(pfilter, _T(" (*.*)"), SIZEOF(filter) - mir_tstrlen(filter));
+ mir_tstrncat(pfilter, _T(" (*.*)"), SIZEOF(filter) - mir_tstrlen(filter));
pfilter = pfilter + mir_tstrlen(pfilter)+1;
_tcsncpy(pfilter, _T("*.*"), SIZEOF(filter) - 1);
pfilter = pfilter + mir_tstrlen(pfilter)+1;
diff --git a/plugins/Weather/src/weather_info.cpp b/plugins/Weather/src/weather_info.cpp
index 055308f903..39e41637c7 100644
--- a/plugins/Weather/src/weather_info.cpp
+++ b/plugins/Weather/src/weather_info.cpp
@@ -159,48 +159,48 @@ void GetINIInfo(TCHAR *pszSvc)
else
{
mir_sntprintf(str2, SIZEOF(str2), TranslateT("Weather INI information for \"%s\":"), pszSvc);
- _tcsncat(str2, _T("\n\n"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, TranslateT("Name:"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\t\t"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, sData->DisplayName, SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, TranslateT("Internal Name:"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\t"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, sData->InternalName, SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, TranslateT("Author:"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\t\t"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, sData->Author, SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, TranslateT("Version:"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\t\t"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, sData->Version, SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, TranslateT("INI Version:"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\t"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\n\n"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, TranslateT("Name:"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\t\t"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, sData->DisplayName, SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, TranslateT("Internal Name:"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\t"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, sData->InternalName, SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, TranslateT("Author:"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\t\t"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, sData->Author, SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, TranslateT("Version:"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\t\t"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, sData->Version, SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, TranslateT("INI Version:"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\t"), SIZEOF(str2) - mir_tstrlen(str2));
switch (sData->InternalVer) {
- case 1: _tcsncat(str2, _T("1.0"), SIZEOF(str2) - mir_tstrlen(str2)); break;
- case 2: _tcsncat(str2, _T("1.1"), SIZEOF(str2) - mir_tstrlen(str2)); break;
- case 3: _tcsncat(str2, _T("1.1a"), SIZEOF(str2) - mir_tstrlen(str2)); break;
- case 4: _tcsncat(str2, _T("1.2"), SIZEOF(str2) - mir_tstrlen(str2)); break;
- case 5: _tcsncat(str2, _T("1.3"), SIZEOF(str2) - mir_tstrlen(str2)); break;
- case 6: _tcsncat(str2, _T("1.4"), SIZEOF(str2) - mir_tstrlen(str2)); break;
- case 7: _tcsncat(str2, _T("1.5"), SIZEOF(str2) - mir_tstrlen(str2)); break;
+ case 1: mir_tstrncat(str2, _T("1.0"), SIZEOF(str2) - mir_tstrlen(str2)); break;
+ case 2: mir_tstrncat(str2, _T("1.1"), SIZEOF(str2) - mir_tstrlen(str2)); break;
+ case 3: mir_tstrncat(str2, _T("1.1a"), SIZEOF(str2) - mir_tstrlen(str2)); break;
+ case 4: mir_tstrncat(str2, _T("1.2"), SIZEOF(str2) - mir_tstrlen(str2)); break;
+ case 5: mir_tstrncat(str2, _T("1.3"), SIZEOF(str2) - mir_tstrlen(str2)); break;
+ case 6: mir_tstrncat(str2, _T("1.4"), SIZEOF(str2) - mir_tstrlen(str2)); break;
+ case 7: mir_tstrncat(str2, _T("1.5"), SIZEOF(str2) - mir_tstrlen(str2)); break;
}
- _tcsncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, TranslateT("File Name:"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\t"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, sData->ShortFileName, SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, TranslateT("Item Count:"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, TranslateT("File Name:"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\t"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, sData->ShortFileName, SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, TranslateT("Item Count:"), SIZEOF(str2) - mir_tstrlen(str2));
mir_sntprintf(str2, SIZEOF(str2), _T("%s\t%i\n"), str2, sData->UpdateDataCount);
- _tcsncat(str2, TranslateT("Memory Used:"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, TranslateT("Memory Used:"), SIZEOF(str2) - mir_tstrlen(str2));
mir_sntprintf(str2, SIZEOF(str2), _T("%s\t%i "), str2, sData->MemUsed);
- _tcsncat(str2, TranslateT("bytes"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\n\n"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, TranslateT("Description:"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
- _tcsncat(str2, sData->Description, SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, TranslateT("bytes"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\n\n"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, TranslateT("Description:"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, _T("\n"), SIZEOF(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, sData->Description, SIZEOF(str2) - mir_tstrlen(str2));
// display the message box and quit
MessageBox(NULL, str2, TranslateT("Weather INI information"), MB_OK|MB_ICONINFORMATION);
@@ -217,7 +217,7 @@ void MoreVarList(void)
// heading
_tcsncpy(str, VARS_LIST, SIZEOF(str) - 1);
- _tcsncat(str, _T("\n\n"), SIZEOF(str) - mir_tstrlen(str));
+ mir_tstrncat(str, _T("\n\n"), SIZEOF(str) - mir_tstrlen(str));
// loop through all weather services to find custom variables
for (WIDATALIST *Item = WIHead;Item != NULL;Item = Item->next)
{
@@ -231,8 +231,8 @@ void MoreVarList(void)
TCHAR* find = _tcsstr(str, tempstr);
// if the custom variable does not exist in the list, add it to the list
if (find == NULL) {
- _tcsncat(str, tempstr, SIZEOF(str) - mir_tstrlen(str));
- _tcsncat(str, _T(", "), SIZEOF(str) - mir_tstrlen(str));
+ mir_tstrncat(str, tempstr, SIZEOF(str) - mir_tstrlen(str));
+ mir_tstrncat(str, _T(", "), SIZEOF(str) - mir_tstrlen(str));
}
}
}
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp
index 41eb87c70d..9e636102dd 100644
--- a/plugins/Weather/src/weather_ini.cpp
+++ b/plugins/Weather/src/weather_ini.cpp
@@ -183,7 +183,7 @@ bool LoadWIData(bool dial)
if (chop == NULL)
return false;
*chop = '\0';
- _tcsncat(szSearchPath, _T("\\Plugins\\Weather\\*.ini"), SIZEOF(szSearchPath) - mir_tstrlen(szSearchPath));
+ mir_tstrncat(szSearchPath, _T("\\Plugins\\Weather\\*.ini"), SIZEOF(szSearchPath) - mir_tstrlen(szSearchPath));
_tcsncpy(FileName, szSearchPath, MAX_PATH - 1);
WIN32_FIND_DATA fd;
@@ -195,7 +195,7 @@ bool LoadWIData(bool dial)
do {
chop = _tcsrchr(FileName, '\\');
chop[1] = '\0';
- _tcsncat(FileName, fd.cFileName, SIZEOF(FileName) - mir_tstrlen(FileName));
+ mir_tstrncat(FileName, fd.cFileName, SIZEOF(FileName) - mir_tstrlen(FileName));
if ( mir_tstrcmpi(fd.cFileName, _T("SAMPLE_INI.INI"))) {
WIDATA Data;
LoadStationData(FileName, fd.cFileName, &Data);
@@ -567,7 +567,7 @@ INT_PTR CALLBACK DlgProcSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
TCHAR *chop = _tcsrchr(szPath, '\\');
if (chop) {
*chop = '\0';
- _tcsncat(szPath, _T("\\Plugins\\weather\\"), SIZEOF(szPath) - mir_tstrlen(szPath));
+ mir_tstrncat(szPath, _T("\\Plugins\\weather\\"), SIZEOF(szPath) - mir_tstrlen(szPath));
_tmkdir(szPath);
ShellExecute((HWND)lParam, _T("open"), szPath, _T(""), _T(""), SW_SHOW);
}
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp
index b7ca1555cd..17ab3696c8 100644
--- a/plugins/Weather/src/weather_popup.cpp
+++ b/plugins/Weather/src/weather_popup.cpp
@@ -397,9 +397,9 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam)
case IDC_VAR3:
// display variable list
_tcsncpy(str, _T(" \n"),SIZEOF(str) - 1); // to make the message box wider
- _tcsncat(str, VAR_LIST_POPUP, SIZEOF(str) - mir_tstrlen(str));
- _tcsncat(str, _T("\n"), SIZEOF(str) - mir_tstrlen(str));
- _tcsncat(str, CUSTOM_VARS, SIZEOF(str) - mir_tstrlen(str));
+ mir_tstrncat(str, VAR_LIST_POPUP, SIZEOF(str) - mir_tstrlen(str));
+ mir_tstrncat(str, _T("\n"), SIZEOF(str) - mir_tstrlen(str));
+ mir_tstrncat(str, CUSTOM_VARS, SIZEOF(str) - mir_tstrlen(str));
MessageBox(NULL, str, TranslateT("Variable List"), MB_OK|MB_ICONASTERISK|MB_TOPMOST);
break;
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp
index 8baf32ee74..ed9275e2c4 100644
--- a/plugins/Weather/src/weather_update.cpp
+++ b/plugins/Weather/src/weather_update.cpp
@@ -60,9 +60,9 @@ int UpdateWeather(MCONTACT hContact)
// show warnings by popup
mir_sntprintf(str, SIZEOF(str) - 105,
TranslateT("Unable to retrieve weather information for %s"), dbv.ptszVal);
- _tcsncat(str, _T("\n"), SIZEOF(str) - mir_tstrlen(str));
+ mir_tstrncat(str, _T("\n"), SIZEOF(str) - mir_tstrlen(str));
TCHAR *tszError = GetError(code);
- _tcsncat(str, tszError, SIZEOF(str) - mir_tstrlen(str));
+ mir_tstrncat(str, tszError, SIZEOF(str) - mir_tstrlen(str));
WPShowMessage(str, SM_WARNING);
mir_free(tszError);
}
@@ -489,14 +489,14 @@ int GetWeatherData(MCONTACT hContact)
case '[': // variable, add the value to the result string
hasvar = TRUE;
if ( !DBGetData(hContact, _T2A(str2), &dbv)) {
- _tcsncat(DataValue, dbv.ptszVal, SIZEOF(DataValue) - mir_tstrlen(DataValue));
+ mir_tstrncat(DataValue, dbv.ptszVal, SIZEOF(DataValue) - mir_tstrlen(DataValue));
DataValue[SIZEOF(DataValue)-1] = 0;
db_free(&dbv);
}
break;
case'\"': // constant, add it to the result string
- _tcsncat(DataValue, TranslateTS(str2), SIZEOF(DataValue) - mir_tstrlen(DataValue));
+ mir_tstrncat(DataValue, TranslateTS(str2), SIZEOF(DataValue) - mir_tstrlen(DataValue));
DataValue[SIZEOF(DataValue)-1] = 0;
break;
}