diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist_nicer/src/viewmodes.cpp | 4 | ||||
-rw-r--r-- | plugins/Exchange/src/MirandaExchange.cpp | 2 | ||||
-rw-r--r-- | plugins/HTTPServer/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/IEView/src/ScriverHTMLBuilder.cpp | 2 | ||||
-rw-r--r-- | plugins/MenuItemEx/src/main.cpp | 8 | ||||
-rw-r--r-- | plugins/NewEventNotify/src/popup.cpp | 2 | ||||
-rwxr-xr-x | plugins/New_GPG/src/main.cpp | 10 | ||||
-rwxr-xr-x | plugins/New_GPG/src/options.cpp | 4 | ||||
-rwxr-xr-x | plugins/New_GPG/src/utilities.cpp | 4 | ||||
-rw-r--r-- | plugins/Scriver/src/msglog.cpp | 2 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/missed.cpp | 2 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/utils.cpp | 8 | ||||
-rw-r--r-- | plugins/StatusPlugins/KeepStatus/keepstatus.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/eventpopups.cpp | 6 | ||||
-rw-r--r-- | plugins/Variables/src/parse_system.cpp | 6 | ||||
-rw-r--r-- | plugins/Weather/src/weather_contacts.cpp | 4 | ||||
-rw-r--r-- | plugins/Weather/src/weather_info.cpp | 82 | ||||
-rw-r--r-- | plugins/Weather/src/weather_ini.cpp | 6 | ||||
-rw-r--r-- | plugins/Weather/src/weather_popup.cpp | 6 | ||||
-rw-r--r-- | plugins/Weather/src/weather_update.cpp | 8 |
20 files changed, 85 insertions, 85 deletions
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index d3d6518959..d18dddb6d1 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -367,8 +367,8 @@ void SaveState() item.cchTextMax = SIZEOF(szTemp);
item.iItem = i;
SendMessage(hwndList, LVM_GETITEM, 0, (LPARAM)&item);
- _tcsncat(newGroupFilter, szTemp, SIZEOF(newGroupFilter) - mir_tstrlen(newGroupFilter));
- _tcsncat(newGroupFilter, _T("|"), SIZEOF(newGroupFilter) - mir_tstrlen(newGroupFilter));
+ mir_tstrncat(newGroupFilter, szTemp, SIZEOF(newGroupFilter) - mir_tstrlen(newGroupFilter));
+ mir_tstrncat(newGroupFilter, _T("|"), SIZEOF(newGroupFilter) - mir_tstrlen(newGroupFilter));
newGroupFilter[2047] = 0;
}
}
diff --git a/plugins/Exchange/src/MirandaExchange.cpp b/plugins/Exchange/src/MirandaExchange.cpp index b39622b35c..52a21e8a18 100644 --- a/plugins/Exchange/src/MirandaExchange.cpp +++ b/plugins/Exchange/src/MirandaExchange.cpp @@ -436,7 +436,7 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass _tstrtime(szPID);
_tcsncpy(szPIDandName, m_szUsername, SIZEOF(szPIDandName)-1);
- _tcsncat(szPIDandName, szPID, SIZEOF(szPIDandName) - mir_tstrlen(szPIDandName));
+ mir_tstrncat(szPIDandName, szPID, SIZEOF(szPIDandName) - mir_tstrlen(szPIDandName));
hr = CreateProfile(szPIDandName);
if ( HR_FAILED(hr)) {
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index 9d596d3b10..f63d31db5a 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -900,7 +900,7 @@ int nSystemShutdown(WPARAM /*wparam*/, LPARAM /*lparam*/) { MessageBox(NULL, _T("Failed to retrieve plugin path."), MSG_BOX_TITEL, MB_OK);
return 1;
}
- _tcsncat(szPluginPath, _T("\\HTTPServer\\"), SIZEOF(szPluginPath) - mir_tstrlen(szPluginPath));
+ mir_tstrncat(szPluginPath, _T("\\HTTPServer\\"), SIZEOF(szPluginPath) - mir_tstrlen(szPluginPath));
int err = CreateDirectoryTree(szPluginPath);
if((err != 0) && (err != ERROR_ALREADY_EXISTS))
{
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp index fec5fa0aaf..8d9e6aa737 100644 --- a/plugins/IEView/src/ScriverHTMLBuilder.cpp +++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp @@ -171,7 +171,7 @@ char *ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mod if (format[0] != '\0') {
// CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, check, (LPARAM) & dbtts);
CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM)& dbtts);
- //_tcsncat(szResult, str, 500);
+ //mir_tstrncat(szResult, str, 500);
mir_strncat(szResult, str, SIZEOF(szResult) - mir_strlen(szResult));
}
mir_strncpy(szResult, ptrA(mir_utf8encode(szResult)), 500);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index d8e9075956..91631104cf 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -638,11 +638,11 @@ INT_PTR onCopyStatusMsg(WPARAM wparam, LPARAM lparam) if (msg) {
if (_tcsclen(msg)) {
if (flags & VF_SMNAME) {
- _tcsncat(buffer, TranslateTS(statusMsg[i].fullName), (SIZEOF(buffer) - _tcsclen(buffer) - 1));
- _tcsncat(buffer, _T(": "), (SIZEOF(buffer) - _tcsclen(buffer) - 1));
+ mir_tstrncat(buffer, TranslateTS(statusMsg[i].fullName), (SIZEOF(buffer) - _tcsclen(buffer) - 1));
+ mir_tstrncat(buffer, _T(": "), (SIZEOF(buffer) - _tcsclen(buffer) - 1));
}
- _tcsncat(buffer, msg, (SIZEOF(buffer) - _tcsclen(buffer) - 1));
- _tcsncat(buffer, _T("\r\n"), (SIZEOF(buffer) - _tcsclen(buffer) - 1));
+ mir_tstrncat(buffer, msg, (SIZEOF(buffer) - _tcsclen(buffer) - 1));
+ mir_tstrncat(buffer, _T("\r\n"), (SIZEOF(buffer) - _tcsclen(buffer) - 1));
}
mir_free(msg);
}
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 784cbb31a7..26abadd88b 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -575,7 +575,7 @@ int PopupUpdate(MCONTACT hContact, MEVENT hEvent) if (pdata->pluginOptions->bShowDate)
_tcsncpy(formatTime, _T("%Y.%m.%d"), SIZEOF(formatTime));
else if (pdata->pluginOptions->bShowTime)
- _tcsncat(formatTime, _T(" %H:%M"), SIZEOF(formatTime) - mir_tstrlen(formatTime));
+ mir_tstrncat(formatTime, _T(" %H:%M"), SIZEOF(formatTime) - mir_tstrlen(formatTime));
time_t localTime = dbe.timestamp;
_tcsftime(timestamp, SIZEOF(timestamp), formatTime, localtime(&localTime));
mir_sntprintf(lpzText, SIZEOF(lpzText), _T("%s[b][i]%s[/i][/b]\n"), lpzText, timestamp);
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 28750225be..872fa7b141 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -2051,10 +2051,10 @@ void InitCheck() { TCHAR buf[4096]; _tcsncpy(buf, gpg_valid?TranslateT("GPG binary is set and valid (this is good).\n"):TranslateT("GPG binary unset or invalid (plugin will not work).\n"), SIZEOF(buf)); - _tcsncat(buf, home_dir_access?TranslateT("Home dir write access granted (this is good).\n"):TranslateT("Home dir has no write access (plugin most probably will not work).\n"), SIZEOF(buf) - mir_tstrlen(buf)); - _tcsncat(buf, temp_access?TranslateT("Temp dir write access granted (this is good).\n"):TranslateT("Temp dir has no write access (plugin should work, but may have some problems, file transfers will not work)."), SIZEOF(buf) - mir_tstrlen(buf)); + mir_tstrncat(buf, home_dir_access?TranslateT("Home dir write access granted (this is good).\n"):TranslateT("Home dir has no write access (plugin most probably will not work).\n"), SIZEOF(buf) - mir_tstrlen(buf)); + mir_tstrncat(buf, temp_access?TranslateT("Temp dir write access granted (this is good).\n"):TranslateT("Temp dir has no write access (plugin should work, but may have some problems, file transfers will not work)."), SIZEOF(buf) - mir_tstrlen(buf)); if(!gpg_valid) - _tcsncat(buf, TranslateT("\nGPG will be disabled until you solve these problems"), SIZEOF(buf) - mir_tstrlen(buf)); + mir_tstrncat(buf, TranslateT("\nGPG will be disabled until you solve these problems"), SIZEOF(buf) - mir_tstrlen(buf)); MessageBox(0, buf, TranslateT("GPG plugin problems"), MB_OK); } if(!gpg_valid) @@ -2304,8 +2304,8 @@ void ImportKey() ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); _tcsncpy(tmp2, ptmp, MAX_PATH-1); mir_free(ptmp); - _tcsncat(tmp2, _T("\\"), SIZEOF(tmp2) - mir_tstrlen(tmp2)); - _tcsncat(tmp2, _T("temporary_exported.asc"), SIZEOF(tmp2) - mir_tstrlen(tmp2)); + mir_tstrncat(tmp2, _T("\\"), SIZEOF(tmp2) - mir_tstrlen(tmp2)); + mir_tstrncat(tmp2, _T("temporary_exported.asc"), SIZEOF(tmp2) - mir_tstrlen(tmp2)); boost::filesystem::remove(tmp2); wfstream f(tmp2, std::ios::out); if(db_mc_isMeta(hContact)) diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp index 392aceb8f1..3973d1cd39 100755 --- a/plugins/New_GPG/src/options.cpp +++ b/plugins/New_GPG/src/options.cpp @@ -905,8 +905,8 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
_tcsncpy(tmp2, ptmp, MAX_PATH-1);
mir_free(ptmp);
- _tcsncat(tmp2, _T("\\"), SIZEOF(tmp2) - mir_tstrlen(tmp2));
- _tcsncat(tmp2, _T("temporary_exported.asc"), SIZEOF(tmp2) - mir_tstrlen(tmp2));
+ mir_tstrncat(tmp2, _T("\\"), SIZEOF(tmp2) - mir_tstrlen(tmp2));
+ mir_tstrncat(tmp2, _T("temporary_exported.asc"), SIZEOF(tmp2) - mir_tstrlen(tmp2));
boost::filesystem::remove(tmp2);
wfstream f(tmp2, std::ios::out);
ptmp = UniGetContactSettingUtf(hcnt, szGPGModuleName, "GPGPubKey", _T(""));
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index d89a78cb8f..a4d4077ac8 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -1861,8 +1861,8 @@ INT_PTR ImportGpGKeys(WPARAM w, LPARAM l) ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); _tcsncpy(tmp2, ptmp, MAX_PATH-1); mir_free(ptmp); - _tcsncat(tmp2, _T("\\"), SIZEOF(tmp2) - mir_tstrlen(tmp2)); - _tcsncat(tmp2, _T("temporary_exported.asc"), SIZEOF(tmp2) - mir_tstrlen(tmp2)); + mir_tstrncat(tmp2, _T("\\"), SIZEOF(tmp2) - mir_tstrlen(tmp2)); + mir_tstrncat(tmp2, _T("temporary_exported.asc"), SIZEOF(tmp2) - mir_tstrlen(tmp2)); boost::filesystem::remove(tmp2); wfstream f(tmp2, std::ios::out); f<<toUTF16(key).c_str(); diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index a6c7264a49..6b1e473fd8 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -429,7 +429,7 @@ TCHAR* TimestampToString(DWORD dwFlags, time_t check, int mode) }
if (format[0] != '\0') {
tmi.printTimeStamp(NULL, check, format, str, SIZEOF(str), 0);
- _tcsncat(szResult, str, SIZEOF(szResult) - mir_tstrlen(szResult));
+ mir_tstrncat(szResult, str, SIZEOF(szResult) - mir_tstrlen(szResult));
}
return szResult;
}
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp index 267c572a01..f975ff4f39 100644 --- a/plugins/SeenPlugin/src/missed.cpp +++ b/plugins/SeenPlugin/src/missed.cpp @@ -107,7 +107,7 @@ int ShowMissed(void) TCHAR sztemp[1024], szcount[7];
for (int loop = 0; loop < mcs.count; loop++) {
- _tcsncat(sztemp, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, mcs.wpcontact[loop], GCDNF_TCHAR), SIZEOF(sztemp) - mir_tstrlen(sztemp));
+ mir_tstrncat(sztemp, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, mcs.wpcontact[loop], GCDNF_TCHAR), SIZEOF(sztemp) - mir_tstrlen(sztemp));
if (db_get_b(NULL, S_MOD, "MissedOnes_Count", 0)) {
mir_sntprintf(szcount, SIZEOF(szcount), _T(" [%i]"), mcs.times[loop]);
mir_tstrcat(sztemp, szcount);
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index 4f438d27e7..ce2391d99e 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -299,8 +299,8 @@ TCHAR *ParseString(TCHAR *szstring, MCONTACT hcontact, BYTE isfile) if (isetting = db_get_w(hcontact, S_MOD, hcontact ? "StatusTriger" : courProtoName, 0)) {
_tcsncpy(szdbsetting, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)(isetting | 0x8000), GSMDF_TCHAR), SIZEOF(szdbsetting));
if (!(isetting & 0x8000)) {
- _tcsncat(szdbsetting, _T("/"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
- _tcsncat(szdbsetting, TranslateT("Idle"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
+ mir_tstrncat(szdbsetting, _T("/"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
+ mir_tstrncat(szdbsetting, TranslateT("Idle"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
}
charPtr = szdbsetting;
goto LBL_charPtr;
@@ -319,8 +319,8 @@ TCHAR *ParseString(TCHAR *szstring, MCONTACT hcontact, BYTE isfile) if (isetting = db_get_w(hcontact, S_MOD, hcontact ? "OldStatus" : courProtoName, 0)) {
_tcsncpy(szdbsetting, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)isetting, GSMDF_TCHAR), SIZEOF(szdbsetting));
if (includeIdle && hcontact && db_get_b(hcontact, S_MOD, "OldIdle", 0)) {
- _tcsncat(szdbsetting, _T("/"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
- _tcsncat(szdbsetting, TranslateT("Idle"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
+ mir_tstrncat(szdbsetting, _T("/"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
+ mir_tstrncat(szdbsetting, TranslateT("Idle"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
}
charPtr = szdbsetting;
goto LBL_charPtr;
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index 11fed352c8..668b2cceea 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -934,7 +934,7 @@ static int ProcessPopup(int reason, LPARAM lParam) if (mir_tstrlen(ps[i]->tszAccName) > 0 && mir_strlen(ps[i]->szName) > 0) { if (db_get_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE)) { mir_sntprintf(protoInfoLine, SIZEOF(protoInfoLine), TranslateT("%s\t(will be set to %s)\r\n"), ps[i]->tszAccName, pcli->pfnGetStatusModeDescription(ps[i]->status, GSMDF_TCHAR)); - _tcsncat(protoInfo, protoInfoLine, SIZEOF(protoInfo) - mir_tstrlen(protoInfo) - 1); + mir_tstrncat(protoInfo, protoInfoLine, SIZEOF(protoInfo) - mir_tstrlen(protoInfo) - 1); } } } diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 79391db987..f7d9d81686 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -517,10 +517,10 @@ static int PopupUpdateT(MCONTACT hContact, MEVENT hEvent) TCHAR *szPreview = GetPreviewT(dbe.eventType, &dbe);
if (szPreview) {
- _tcsncat(pdata->eventData[pdata->nrMerged].tszText, szPreview, SIZEOF(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
+ mir_tstrncat(pdata->eventData[pdata->nrMerged].tszText, szPreview, SIZEOF(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
mir_free(szPreview);
}
- else _tcsncat(pdata->eventData[pdata->nrMerged].tszText, _T(" "), SIZEOF(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
+ else mir_tstrncat(pdata->eventData[pdata->nrMerged].tszText, _T(" "), SIZEOF(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
pdata->eventData[pdata->nrMerged].tszText[MAX_SECONDLINE - 1] = 0;
@@ -544,7 +544,7 @@ static int PopupUpdateT(MCONTACT hContact, MEVENT hEvent) }
i = (available > 0) ? i + 1 : i + 2;
for (; i <= pdata->nrMerged; i++)
- _tcsncat(lpzText, pdata->eventData[i].tszText, SIZEOF(lpzText) - mir_tstrlen(lpzText));
+ mir_tstrncat(lpzText, pdata->eventData[i].tszText, SIZEOF(lpzText) - mir_tstrlen(lpzText));
pdata->eventData[pdata->nrMerged].hEvent = hEvent;
pdata->eventData[pdata->nrMerged].timestamp = dbe.timestamp;
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp index 801de2637b..73c83cf22e 100644 --- a/plugins/Variables/src/parse_system.cpp +++ b/plugins/Variables/src/parse_system.cpp @@ -387,10 +387,10 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai) bFiles = FALSE;
}
if (tszFirst[mir_tstrlen(tszFirst) - 1] == '\\')
- _tcsncat(tszFirst, tszFilter, SIZEOF(tszFirst) - mir_tstrlen(tszFirst) - 1);
+ mir_tstrncat(tszFirst, tszFilter, SIZEOF(tszFirst) - mir_tstrlen(tszFirst) - 1);
else {
- _tcsncat(tszFirst, _T("\\"), SIZEOF(tszFirst) - mir_tstrlen(tszFirst) - 1);
- _tcsncat(tszFirst, tszFilter, SIZEOF(tszFirst) - mir_tstrlen(tszFirst) - 1);
+ mir_tstrncat(tszFirst, _T("\\"), SIZEOF(tszFirst) - mir_tstrlen(tszFirst) - 1);
+ mir_tstrncat(tszFirst, tszFilter, SIZEOF(tszFirst) - mir_tstrlen(tszFirst) - 1);
}
WIN32_FIND_DATA ffd;
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;
}
|