diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 16:43:34 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 16:43:34 +0000 |
commit | 11c185ebb3013230538d4a48656b23bf81d31055 (patch) | |
tree | 41f64fdbd3785621cfeb89a2c0d07ea1b2c4427f /plugins | |
parent | f2de79cb2eb8247548650ee80d75be109ac66ee7 (diff) |
replace _tcscat to mir_tstrcat
git-svn-id: http://svn.miranda-ng.org/main/trunk@13778 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
40 files changed, 107 insertions, 107 deletions
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index a9b0abba93..18659fec9c 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -155,7 +155,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar len--;
_tcsncpy(titlebuff, alarm.szTitle, len);
titlebuff[len] = 0;
- _tcscat(titlebuff, _T("..."));
+ mir_tstrcat(titlebuff, _T("..."));
GetTextExtentPoint32(dis->hDC,titlebuff,(int)mir_tstrlen(titlebuff),&textSize);
}
TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,titlebuff,(int)mir_tstrlen(titlebuff));
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index 6ca2bb181d..e9adaf117d 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -536,7 +536,7 @@ void LoadBassLibrary(TCHAR CurrBassPath[MAX_PATH]) int OnFoldersChanged(WPARAM, LPARAM)
{
FoldersGetCustomPathT(hBASSFolder, CurrBassPath, MAX_PATH, _T(""));
- _tcscat(CurrBassPath, _T("\\bass.dll"));
+ mir_tstrcat(CurrBassPath, _T("\\bass.dll"));
if (hBass != NULL) {
BASS_Free();
@@ -553,7 +553,7 @@ int OnModulesLoaded(WPARAM, LPARAM) {
if (hBASSFolder = FoldersRegisterCustomPathT(LPGEN("Bass Interface"), LPGEN("Bass library"), PLUGINS_PATHT _T("\\Bass"))) {
FoldersGetCustomPathT(hBASSFolder, CurrBassPath, MAX_PATH, _T(""));
- _tcscat(CurrBassPath, _T("\\bass.dll"));
+ mir_tstrcat(CurrBassPath, _T("\\bass.dll"));
}
else {
DBVARIANT dbv;
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 2f8abd7a01..088fe3406c 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -74,8 +74,8 @@ TCHAR* GetFullName(const TCHAR* filename) size_t plen = mir_tstrlen(path);
fullname = new TCHAR[plen + flen + 1];
fullname[0] = NULL;
- _tcscat(fullname, path);
- _tcscat(fullname, filename);
+ mir_tstrcat(fullname, path);
+ mir_tstrcat(fullname, filename);
}
return fullname;
}
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 6d6a1ce6a8..837167f42b 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -219,7 +219,7 @@ INT_PTR AddToPounce(WPARAM wParam, LPARAM lParam) TCHAR* newPounce = (TCHAR*)mir_alloc(mir_tstrlen(dbv.ptszVal) + mir_tstrlen(message) + 1);
if (!newPounce) return 1;
mir_tstrcpy(newPounce, dbv.ptszVal);
- _tcscat(newPounce, message);
+ mir_tstrcat(newPounce, message);
db_set_ws(hContact, modname, "PounceMsg", newPounce);
mir_free(newPounce);
db_free(&dbv);
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp index 33c2a88308..644edb9bc9 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp +++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp @@ -417,12 +417,12 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) for (i = 0; i < bLayNum; i++)
if (hklLayouts[i] != hklCurLay) {
if (mir_tstrlen(ptszMBox) != 0)
- _tcscat(ptszMBox, _T("\n\n"));
+ mir_tstrcat(ptszMBox, _T("\n\n"));
ptrT ptszTemp(GetShortNameOfLayout(hklLayouts[i]));
- _tcscat(ptszMBox, ptszTemp);
- _tcscat(ptszMBox, _T(":\n"));
+ mir_tstrcat(ptszMBox, ptszTemp);
+ mir_tstrcat(ptszMBox, _T(":\n"));
ptrT ptszOutText(ChangeTextLayout(ptszInText, hklCurLay, hklLayouts[i], FALSE));
- _tcscat(ptszMBox, ptszOutText);
+ mir_tstrcat(ptszMBox, ptszOutText);
}
}
}
diff --git a/plugins/ConnectionNotify/src/debug.cpp b/plugins/ConnectionNotify/src/debug.cpp index 633a048af4..b35421de9e 100644 --- a/plugins/ConnectionNotify/src/debug.cpp +++ b/plugins/ConnectionNotify/src/debug.cpp @@ -30,7 +30,7 @@ void _OutputDebugString(TCHAR* lpOutputString, ...) mir_sntprintf(OutMsg, SIZEOF(OutMsg), format, s);
_tcsncpy(format, OutMsg, _countof(OutMsg));
j = (int)mir_tstrlen(format);
- _tcscat(format, _T(" "));
+ mir_tstrcat(format, _T(" "));
break;
}
// character
@@ -40,7 +40,7 @@ void _OutputDebugString(TCHAR* lpOutputString, ...) mir_sntprintf(OutMsg, SIZEOF(OutMsg), format, c);
_tcsncpy(format, OutMsg, _countof(OutMsg));
j = (int)mir_tstrlen(format);
- _tcscat(format, _T(" "));
+ mir_tstrcat(format, _T(" "));
break;
}
// integer
@@ -50,13 +50,13 @@ void _OutputDebugString(TCHAR* lpOutputString, ...) mir_sntprintf(OutMsg, SIZEOF(OutMsg), format, d);
_tcsncpy(format, OutMsg, _countof(OutMsg));
j = (int)mir_tstrlen(format);
- _tcscat(format, _T(" "));
+ mir_tstrcat(format, _T(" "));
break;
}
}
format[j + 1] = '\0';
}
- _tcscat(format, _T("\n"));
+ mir_tstrcat(format, _T("\n"));
OutputDebugString(format);
va_end(argptr);
diff --git a/plugins/DbChecker/src/selectdb.cpp b/plugins/DbChecker/src/selectdb.cpp index a55933a30f..ba0b1efa6c 100644 --- a/plugins/DbChecker/src/selectdb.cpp +++ b/plugins/DbChecker/src/selectdb.cpp @@ -204,7 +204,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM DWORD cbData = SIZEOF(szMirandaPath);
mir_tstrcpy(szMirandaProfiles, szMirandaPath);
- _tcscat(szMirandaProfiles, _T("\\Profiles"));
+ mir_tstrcat(szMirandaProfiles, _T("\\Profiles"));
GetProfileDirectory(szMirandaPath, szProfileDir, SIZEOF(szProfileDir));
// search in profile dir (using ini file)
diff --git a/plugins/DbChecker/src/worker.cpp b/plugins/DbChecker/src/worker.cpp index cf0b7bee1d..708df28a97 100644 --- a/plugins/DbChecker/src/worker.cpp +++ b/plugins/DbChecker/src/worker.cpp @@ -88,7 +88,7 @@ void __cdecl WorkerThread(void *) else {
mir_tstrcpy(opts.outputFilename, opts.filename);
*_tcsrchr(opts.outputFilename, '.') = 0;
- _tcscat(opts.outputFilename, TranslateT(" (Output).dat"));
+ mir_tstrcat(opts.outputFilename, TranslateT(" (Output).dat"));
opts.hOutFile = CreateFile(opts.outputFilename, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_FLAG_SEQUENTIAL_SCAN, NULL);
if (opts.hOutFile == INVALID_HANDLE_VALUE) {
AddToStatus(STATUS_FATAL, TranslateT("Can't create output file (%u)"), GetLastError());
diff --git a/plugins/Exchange/src/MirandaExchange.cpp b/plugins/Exchange/src/MirandaExchange.cpp index 079711f75b..b39622b35c 100644 --- a/plugins/Exchange/src/MirandaExchange.cpp +++ b/plugins/Exchange/src/MirandaExchange.cpp @@ -868,7 +868,7 @@ HRESULT CMirandaExchange::OpenTheMessage( LPTSTR ) if ( NULL != szTheEnd )
{
szRegValue[ mir_tstrlen(szRegValue) - mir_tstrlen(szTheEnd) +5 ] = _T('\0');
- _tcscat( szRegValue, _T(" /recycle") );
+ mir_tstrcat( szRegValue, _T(" /recycle") );
STARTUPINFO si;
PROCESS_INFORMATION pi;
diff --git a/plugins/FTPFileYM/src/utils.cpp b/plugins/FTPFileYM/src/utils.cpp index 3cd128499b..04d0e185cd 100644 --- a/plugins/FTPFileYM/src/utils.cpp +++ b/plugins/FTPFileYM/src/utils.cpp @@ -65,7 +65,7 @@ TCHAR *Utils::getTextFragment(TCHAR *stzText, size_t length, TCHAR *buff) {
mir_tstrcpy(buff, stzText);
buff[length - 1] = 0;
- _tcscat(buff, _T("..."));
+ mir_tstrcat(buff, _T("..."));
return buff;
}
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index 5c6269aa8e..9904272509 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -199,7 +199,7 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr TCHAR *szNoAvatarPathTmp = _tcsrchr(szNoAvatarPath, '\\');
if (szNoAvatarPathTmp != NULL)
*szNoAvatarPathTmp = 0;
- _tcscat(szNoAvatarPath, _T("\\noavatar.png"));
+ mir_tstrcat(szNoAvatarPath, _T("\\noavatar.png"));
if (_taccess(szNoAvatarPath, 0) == -1)
mir_snprintf(tempStr, SIZEOF(tempStr), "%snoavatar.jpg", tempBase);
else
@@ -373,7 +373,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, TCHAR *szNoAvatarPathTmp = _tcsrchr(szNoAvatarPath, '\\');
if (szNoAvatarPathTmp != NULL)
*szNoAvatarPathTmp = 0;
- _tcscat(szNoAvatarPath, _T("\\noavatar.png"));
+ mir_tstrcat(szNoAvatarPath, _T("\\noavatar.png"));
if (_taccess(szNoAvatarPath, 0) == -1)
mir_snprintf(tempStr, SIZEOF(tempStr), "%snoavatar.jpg", tempBase);
else
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index b753cdd511..61e9a6b01d 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -697,7 +697,7 @@ void createEventPrefix(TCHAR *prefixName, size_t maxLen) else { str = profileName + len - maxLen / 2; _tcsncpy_s(prefixName, (maxLen / 2), profileName, _TRUNCATE); - _tcscat(prefixName, str); + mir_tstrcat(prefixName, str); } } diff --git a/plugins/MenuItemEx/src/options.cpp b/plugins/MenuItemEx/src/options.cpp index 698d7cce15..495f34fb78 100644 --- a/plugins/MenuItemEx/src/options.cpp +++ b/plugins/MenuItemEx/src/options.cpp @@ -48,7 +48,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) for (i = 0; i < 4; i++)
{
GetDlgItemText(hdlg, checkboxes[i].idc, buffer, (SIZEOF(buffer) - 3));
- _tcscat(buffer, _T(" *"));
+ mir_tstrcat(buffer, _T(" *"));
SetDlgItemText(hdlg, checkboxes[i].idc, buffer);
}
}
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index c87861bd25..784cbb31a7 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -272,7 +272,7 @@ static TCHAR* GetEventPreview(DBEVENTINFO *dbei) if (szNick) {
mir_tstrcpy(szBuf, szNick);
- _tcscat(szBuf, TranslateT(" added you to the contact list"));
+ mir_tstrcat(szBuf, TranslateT(" added you to the contact list"));
mir_free(szNick);
comment1 = mir_tstrdup(szBuf);
}
@@ -308,7 +308,7 @@ static TCHAR* GetEventPreview(DBEVENTINFO *dbei) if (szNick) {
mir_tstrcpy(szBuf, szNick);
- _tcscat(szBuf, TranslateT(" requested authorization"));
+ mir_tstrcat(szBuf, TranslateT(" requested authorization"));
mir_free(szNick);
comment1 = mir_tstrdup(szBuf);
}
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index a98bf4b3cf..90acfb1646 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -305,7 +305,7 @@ void GetStatusText(MCONTACT hContact, WORD newStatus, WORD oldStatus, TCHAR *stz if (opt.ShowPreviousStatus) {
TCHAR buff[MAX_STATUSTEXT];
mir_sntprintf(buff, SIZEOF(buff), TranslateTS(STRING_SHOWPREVIOUSSTATUS), StatusList[Index(oldStatus)].lpzStandardText);
- _tcscat(_tcscat(stzStatusText, _T(" ")), buff);
+ mir_tstrcat(mir_tstrcat(stzStatusText, _T(" ")), buff);
}
}
@@ -688,7 +688,7 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact) copyText = mir_tstrdup(smi.newstatusmsg);
_tcsncpy(buff, smi.newstatusmsg, opt.PSMsgLen);
buff[opt.PSMsgLen] = 0;
- _tcscat(buff, _T("..."));
+ mir_tstrcat(buff, _T("..."));
replaceStrT(smi.newstatusmsg, buff);
}
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index b7096d0092..e39af13d61 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -194,7 +194,7 @@ void ShowXStatusPopup(XSTATUSCHANGE *xsc) copyText = mir_tstrdup(xsc->stzText);
_tcsncpy(buff, xsc->stzText, opt.PXMsgLen);
buff[opt.PXMsgLen] = 0;
- _tcscat(buff, _T("..."));
+ mir_tstrcat(buff, _T("..."));
replaceStrT(xsc->stzText, buff);
}
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 7cd8671bd8..28750225be 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -864,9 +864,9 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, mir_realloc(path, (mir_tstrlen(path)+128)*sizeof(TCHAR)); TCHAR *gpg_path = (TCHAR*)mir_alloc(sizeof(TCHAR) * MAX_PATH), *gpg_lang_path = (TCHAR*)mir_alloc(sizeof(TCHAR) * MAX_PATH); mir_tstrcpy(gpg_path, tmp); - _tcscat(gpg_path, _T("\\GnuPG\\gpg.exe")); + mir_tstrcat(gpg_path, _T("\\GnuPG\\gpg.exe")); mir_tstrcpy(gpg_lang_path, tmp); - _tcscat(gpg_lang_path, _T("\\GnuPG\\gnupg.nls\\en@quot.mo")); + mir_tstrcat(gpg_lang_path, _T("\\GnuPG\\gnupg.nls\\en@quot.mo")); mir_free(tmp); if(boost::filesystem::exists(gpg_path)) { diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index cc24f0f57a..3c6f993507 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -384,12 +384,12 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); mir_tstrcpy(tmp2, ptmp); mir_free(ptmp); - _tcscat(tmp2, _T("\\")); + mir_tstrcat(tmp2, _T("\\")); TCHAR *tmp3 = mir_a2t(get_random(5).c_str()); - _tcscat(tmp2, tmp3); - _tcscat(tmp2, _T(".asc")); + mir_tstrcat(tmp2, tmp3); + mir_tstrcat(tmp2, _T(".asc")); mir_free(tmp3); - //_tcscat(tmp2, _T("temporary_exported.asc")); + //mir_tstrcat(tmp2, _T("temporary_exported.asc")); boost::filesystem::remove(tmp2); wfstream f(tmp2, std::ios::out); while(!f.is_open()) diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index ab75f3c284..d89a78cb8f 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -1136,7 +1136,7 @@ bool isGPGValid() //mir_realloc(path, (mir_tstrlen(path)+64)*sizeof(TCHAR)); TCHAR *gpg_path = (TCHAR*)mir_alloc(sizeof(TCHAR)*MAX_PATH); mir_tstrcpy(gpg_path, tmp); - _tcscat(gpg_path, _T("\\GnuPG\\gpg.exe")); + mir_tstrcat(gpg_path, _T("\\GnuPG\\gpg.exe")); mir_free(tmp); tmp = NULL; p = boost::filesystem::path(gpg_path); diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 3abb6b5387..cef4c6f3dc 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -278,7 +278,7 @@ LBL_SkipEnd: if (!isRoom && !isTopic && g_Settings.bAddColonToAutoComplete && start == 0) {
szReplace = (TCHAR*)mir_alloc((mir_tstrlen(pszName) + 4) * sizeof(TCHAR));
mir_tstrcpy(szReplace, pszName);
- _tcscat(szReplace, _T(": "));
+ mir_tstrcat(szReplace, _T(": "));
pszName = szReplace;
}
SendMessage(hwnd, EM_SETSEL, start, end);
@@ -971,7 +971,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, MessageBeep(MB_OK);
break;
}
- _tcscat(si->szSearch, szNew);
+ mir_tstrcat(si->szSearch, szNew);
}
if (si->szSearch[0]) {
// iterate over the (sorted) list of nicknames and search for the
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp index 39e925f9bc..267c572a01 100644 --- a/plugins/SeenPlugin/src/missed.cpp +++ b/plugins/SeenPlugin/src/missed.cpp @@ -110,10 +110,10 @@ int ShowMissed(void) _tcsncat(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]);
- _tcscat(sztemp, szcount);
+ mir_tstrcat(sztemp, szcount);
}
- _tcscat(sztemp, _T("\n"));
+ mir_tstrcat(sztemp, _T("\n"));
}
CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_MISSED), NULL, MissedDlgProc, (LPARAM)sztemp);
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index a38aeba407..4f438d27e7 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -161,7 +161,7 @@ TCHAR *ParseString(TCHAR *szstring, MCONTACT hcontact, BYTE isfile) SYSTEMTIME st;
if (!isSeen(hcontact, &st)) {
- _tcscat(sztemp, TranslateT("<never seen>"));
+ mir_tstrcat(sztemp, TranslateT("<never seen>"));
return sztemp;
}
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index f7ba61b949..f74ca657aa 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -1465,7 +1465,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, TCHAR szNew[2]; szNew[0] = (TCHAR)wParam; szNew[1] = '\0'; - _tcscat(si->szSearch, szNew); + mir_tstrcat(si->szSearch, szNew); } if (si->szSearch[0]) { // iterate over the (sorted) list of nicknames and search for the diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 7f3bf5ba3a..79391db987 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -433,7 +433,7 @@ static TCHAR* ShortenPreview(DBEVENTINFO* dbe) }
if (fAddEllipsis) {
buf = (TCHAR*)mir_realloc(buf, (mir_tstrlen(buf) + 5) * sizeof(TCHAR));
- _tcscat(buf, _T("..."));
+ mir_tstrcat(buf, _T("..."));
}
return buf;
}
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index 5ed8009722..a0825801b6 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -1673,7 +1673,7 @@ void CSkin::setupAeroSkins() TCHAR tszFilename[MAX_PATH], tszBasePath[MAX_PATH];
_tcsncpy_s(tszBasePath, M.getDataPath(), _TRUNCATE);
if (tszBasePath[mir_tstrlen(tszBasePath) - 1] != '\\')
- _tcscat(tszBasePath, _T("\\"));
+ mir_tstrcat(tszBasePath, _T("\\"));
// load unknown avatar..
if (0 == PluginConfig.g_hbmUnknown) {
@@ -2444,7 +2444,7 @@ void CSkin::extractSkinsAndLogo(bool fForceOverwrite) const TCHAR tszBasePath[MAX_PATH];
_tcsncpy_s(tszBasePath, M.getDataPath(), _TRUNCATE);
if (tszBasePath[mir_tstrlen(tszBasePath) - 1] != '\\')
- _tcscat(tszBasePath, _T("\\"));
+ mir_tstrcat(tszBasePath, _T("\\"));
CreateDirectoryTreeT(tszBasePath);
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index 6c0721926e..85ca77b699 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -2042,8 +2042,8 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA while (item.hItem != NULL) {
TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), &item);
if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 2) {
- _tcscat(swzProtos, buff);
- _tcscat(swzProtos, _T(" "));
+ mir_tstrcat(swzProtos, buff);
+ mir_tstrcat(swzProtos, _T(" "));
}
item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), item.hItem);
@@ -2057,8 +2057,8 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA while (item.hItem != NULL) {
TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), &item);
if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 2) {
- _tcscat(swzProtos, buff);
- _tcscat(swzProtos, _T(" "));
+ mir_tstrcat(swzProtos, buff);
+ mir_tstrcat(swzProtos, _T(" "));
}
item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), item.hItem);
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 405df12768..1396836639 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -100,7 +100,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa // uid info TCHAR swzUid[256], swzUidName[256]; if (Uid(0, pwd->clcit.szProto, swzUid, 256) && UidName(pwd->clcit.szProto, swzUidName, 253)) { - _tcscat(swzUidName, _T(": ")); + mir_tstrcat(swzUidName, _T(": ")); AddRow(pwd, swzUidName, swzUid, NULL, false, false, false); } @@ -777,7 +777,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (iLen > MAX_VALUE_LEN) { _tcsncpy(buff, pwd->rows[i].swzValue, MAX_VALUE_LEN); buff[MAX_VALUE_LEN] = 0; - _tcscat(buff, _T("...")); + mir_tstrcat(buff, _T("...")); } else mir_tstrcpy(buff, pwd->rows[i].swzValue); @@ -829,25 +829,25 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa for (int i = 0; i < pwd->iRowCount; i++) { if ((pwd->rows[i].swzLabel && pwd->rows[i].swzLabel[0]) || (pwd->rows[i].swzValue && pwd->rows[i].swzValue[0])) { if (pwd->rows[i].swzLabel && pwd->rows[i].swzLabel[0]) { - _tcscat(pchData, pwd->rows[i].swzLabel); - _tcscat(pchData, _T(" ")); + mir_tstrcat(pchData, pwd->rows[i].swzLabel); + mir_tstrcat(pchData, _T(" ")); } - else _tcscat(pchData, TranslateT("<No Label>: ")); + else mir_tstrcat(pchData, TranslateT("<No Label>: ")); if (pwd->rows[i].swzValue && pwd->rows[i].swzValue[0]) - _tcscat(pchData, pwd->rows[i].swzValue); + mir_tstrcat(pchData, pwd->rows[i].swzValue); else - _tcscat(pchData, TranslateT("<No Value>")); + mir_tstrcat(pchData, TranslateT("<No Value>")); - _tcscat(pchData, _T("\r\n")); + mir_tstrcat(pchData, _T("\r\n")); } } } else if (iSelItem == COPYMENU_ALLITEMS) { // copy all items for (int i = 0; i < pwd->iRowCount; i++) { if (pwd->rows[i].swzValue && pwd->rows[i].swzValue[0]) { - _tcscat(pchData, pwd->rows[i].swzValue); - _tcscat(pchData, _T("\r\n")); + mir_tstrcat(pchData, pwd->rows[i].swzValue); + mir_tstrcat(pchData, _T("\r\n")); } } } diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 4f3c68f376..998694c0e6 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -682,7 +682,7 @@ void TruncateString(TCHAR *swzText) if (swzText && opt.iLimitCharCount > 3) { if ((int)mir_tstrlen(swzText) > opt.iLimitCharCount) { swzText[opt.iLimitCharCount - 3] = 0; - _tcscat(swzText, _T("...")); + mir_tstrcat(swzText, _T("...")); } } } diff --git a/plugins/TrafficCounter/src/misc.cpp b/plugins/TrafficCounter/src/misc.cpp index f1f6c8d055..196ec13abb 100644 --- a/plugins/TrafficCounter/src/misc.cpp +++ b/plugins/TrafficCounter/src/misc.cpp @@ -160,7 +160,7 @@ size_t GetFormattedTraffic(DWORD Value, BYTE Unit, TCHAR *Buffer, size_t Size) Res = (TCHAR*)malloc(l * sizeof(TCHAR));
if (!Res) return 0;
GetNumberFormat(LOCALE_USER_DEFAULT, 0, Str1, &nf, Res, l);
- _tcscat(Res, szUnit);
+ mir_tstrcat(Res, szUnit);
if (Size && Buffer)
{
@@ -259,7 +259,7 @@ size_t GetDurationFormatM(DWORD Duration, TCHAR *Format, TCHAR *Buffer, WORD Siz // Добавим памяти, если нужно.
Length = mir_tstrlen(Res) + mir_tstrlen(Token) + 1;
Res = (TCHAR*)realloc(Res, Length * sizeof(TCHAR));
- _tcscat(Res, Token);
+ mir_tstrcat(Res, Token);
}
if (Size && Buffer)
diff --git a/plugins/UserInfoEx/src/psp_origin.cpp b/plugins/UserInfoEx/src/psp_origin.cpp index d7582ca475..cbc831f2ec 100644 --- a/plugins/UserInfoEx/src/psp_origin.cpp +++ b/plugins/UserInfoEx/src/psp_origin.cpp @@ -94,7 +94,7 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara mt.UTCToLocal();
mt.DateFormatLong(szTime, SIZEOF(szTime));
- _tcscat(szTime, _T(" - "));
+ mir_tstrcat(szTime, _T(" - "));
ptr = szTime + mir_tstrlen(szTime);
mt.TimeFormat(ptr, SIZEOF(szTime) - (ptr - szTime));
SetDlgItemText(hDlg, TXT_DATEADDED, szTime);
diff --git a/plugins/Variables/src/parse_alias.cpp b/plugins/Variables/src/parse_alias.cpp index 057ac88d5a..d08a05a2ec 100644 --- a/plugins/Variables/src/parse_alias.cpp +++ b/plugins/Variables/src/parse_alias.cpp @@ -160,9 +160,9 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) else
szArgs = (TCHAR*)mir_realloc(szArgs, (mir_tstrlen(szArgs) + mir_tstrlen(argv[i]) + 2)*sizeof(TCHAR));
- _tcscat(szArgs, argv[i]);
+ mir_tstrcat(szArgs, argv[i]);
if (i != argc - 1)
- _tcscat(szArgs, _T(","));
+ mir_tstrcat(szArgs, _T(","));
}
int res;
if (szArgs != NULL && argc > 0) {
diff --git a/plugins/Variables/src/parse_logic.cpp b/plugins/Variables/src/parse_logic.cpp index ec1c70e2a3..c7189406f5 100644 --- a/plugins/Variables/src/parse_logic.cpp +++ b/plugins/Variables/src/parse_logic.cpp @@ -188,7 +188,7 @@ static TCHAR *parseFor(ARGUMENTSINFO *ai) }
else res = (TCHAR*)mir_realloc(res, (mir_tstrlen(res) + mir_tstrlen(parsed) + 1)*sizeof(TCHAR));
- _tcscat(res, parsed);
+ mir_tstrcat(res, parsed);
mir_free(parsed);
}
fi.tszFormat = ai->targv[3];
diff --git a/plugins/Variables/src/parse_math.cpp b/plugins/Variables/src/parse_math.cpp index 883216bc49..4dc0913824 100644 --- a/plugins/Variables/src/parse_math.cpp +++ b/plugins/Variables/src/parse_math.cpp @@ -65,7 +65,7 @@ static TCHAR *parseHex(ARGUMENTSINFO *ai) for (i = 0; i < zeros; i++)
*(res + 2 + i) = '0';
- _tcscat(res, szVal);
+ mir_tstrcat(res, szVal);
return res;
}
@@ -152,7 +152,7 @@ static TCHAR *parseNum(ARGUMENTSINFO *ai) for (unsigned i = 0; i < zeros; i++)
*cur++ = '0';
- _tcscat(res, szVal);
+ mir_tstrcat(res, szVal);
mir_free(szVal);
return res;
diff --git a/plugins/Variables/src/parse_str.cpp b/plugins/Variables/src/parse_str.cpp index 949051cdda..a8903e89f0 100644 --- a/plugins/Variables/src/parse_str.cpp +++ b/plugins/Variables/src/parse_str.cpp @@ -119,7 +119,7 @@ static TCHAR *parseFixeol(ARGUMENTSINFO *ai) memset(res, 0, (((cur - ai->targv[1]) + 1) * sizeof(TCHAR)));
_tcsncpy(res, ai->targv[1], cur - ai->targv[1]);
- _tcscat(res, szReplacement);
+ mir_tstrcat(res, szReplacement);
return res;
}
@@ -279,7 +279,7 @@ static TCHAR *parsePad(ARGUMENTSINFO *ai) for (unsigned int i = 0; i < addcount; i++)
*cur++ = padchar;
- _tcscat(res, ai->targv[1]);
+ mir_tstrcat(res, ai->targv[1]);
return res;
}
@@ -383,7 +383,7 @@ static TCHAR *parseRepeat(ARGUMENTSINFO *ai) memset(res, 0, ((count * mir_tstrlen(ai->targv[1]) + 1) * sizeof(TCHAR)));
for (int i = 0; i < count; i++)
- _tcscat(res, ai->targv[1]);
+ mir_tstrcat(res, ai->targv[1]);
return res;
}
@@ -460,7 +460,7 @@ static TCHAR *parseScroll(ARGUMENTSINFO *ai) memset(res, 0, ((2 * mir_tstrlen(ai->targv[1]) + 1) * sizeof(TCHAR)));
mir_tstrcpy(res, ai->targv[1]);
- _tcscat(res, ai->targv[1]);
+ mir_tstrcat(res, ai->targv[1]);
memmove(res, res + move, (mir_tstrlen(res + move) + 1)*sizeof(TCHAR));
*(res + display) = 0;
res = (TCHAR*)mir_realloc(res, (mir_tstrlen(res) + 1)*sizeof(TCHAR));
@@ -754,8 +754,8 @@ static TCHAR *parseWord(ARGUMENTSINFO *ai) TCHAR *pres = (TCHAR*)mir_realloc(res, (mir_tstrlen(res) + mir_tstrlen(szWord) + 2)*sizeof(TCHAR));
if (pres != NULL) {
res = pres;
- _tcscat(res, _T(" "));
- _tcscat(res, szWord);
+ mir_tstrcat(res, _T(" "));
+ mir_tstrcat(res, szWord);
}
mir_free(szWord);
}
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp index 5446a8e2f0..801de2637b 100644 --- a/plugins/Variables/src/parse_system.cpp +++ b/plugins/Variables/src/parse_system.cpp @@ -405,14 +405,14 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai) while (FindNextFile(hFind, &ffd) != 0) {
if (((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && (bDirs)) || ((!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) && (bFiles))) {
if (tszRes != NULL) {
- _tcscat(tszRes, tszSeperator);
+ mir_tstrcat(tszRes, tszSeperator);
tszRes = (TCHAR*)mir_realloc(tszRes, (mir_tstrlen(tszRes) + mir_tstrlen(ffd.cFileName) + mir_tstrlen(tszSeperator) + 1)*sizeof(TCHAR));
}
else {
tszRes = (TCHAR*)mir_alloc((mir_tstrlen(ffd.cFileName) + mir_tstrlen(tszSeperator) + 1)*sizeof(TCHAR));
mir_tstrcpy(tszRes, _T(""));
}
- _tcscat(tszRes, ffd.cFileName);
+ mir_tstrcat(tszRes, ffd.cFileName);
}
}
FindClose(hFind);
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index 0edbaef6a8..abf04c0839 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -505,10 +505,10 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str) i++;
chr = dis[i];
switch (chr) {
- case '%': _tcscat(str, _T("%")); break;
- case 't': _tcscat(str, _T("\t")); break;
- case 'n': _tcscat(str, _T("\r\n")); break;
- case '\\': _tcscat(str, _T("\\")); break;
+ case '%': mir_tstrcat(str, _T("%")); break;
+ case 't': mir_tstrcat(str, _T("\t")); break;
+ case 'n': mir_tstrcat(str, _T("\r\n")); break;
+ case '\\': mir_tstrcat(str, _T("\\")); break;
}
}
@@ -520,29 +520,29 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str) // turn capitalized characters to small case
if (chr < 'a' && chr != '[' && chr != '%') chr = (char)((int)chr + 32);
switch (chr) {
- case 'c': _tcscat(str, w->cond); break;
+ case 'c': mir_tstrcat(str, w->cond); break;
case 'd': // get the current date
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, lpzDate, SIZEOF(lpzDate));
- _tcscat(str, lpzDate); break;
- case 'e': _tcscat(str, w->dewpoint); break;
- case 'f': _tcscat(str, w->feel); break;
- case 'h': _tcscat(str, w->high); break;
- case 'i': _tcscat(str, w->winddir); break;
- case 'l': _tcscat(str, w->low); break;
- case 'm': _tcscat(str, w->humid); break;
- case 'n': _tcscat(str, w->city); break;
- case 'p': _tcscat(str, w->pressure); break;
- case 'r': _tcscat(str, w->sunrise); break;
- case 's': _tcscat(str, w->id); break;
- case 't': _tcscat(str, w->temp); break;
+ mir_tstrcat(str, lpzDate); break;
+ case 'e': mir_tstrcat(str, w->dewpoint); break;
+ case 'f': mir_tstrcat(str, w->feel); break;
+ case 'h': mir_tstrcat(str, w->high); break;
+ case 'i': mir_tstrcat(str, w->winddir); break;
+ case 'l': mir_tstrcat(str, w->low); break;
+ case 'm': mir_tstrcat(str, w->humid); break;
+ case 'n': mir_tstrcat(str, w->city); break;
+ case 'p': mir_tstrcat(str, w->pressure); break;
+ case 'r': mir_tstrcat(str, w->sunrise); break;
+ case 's': mir_tstrcat(str, w->id); break;
+ case 't': mir_tstrcat(str, w->temp); break;
case 'u':
- if (mir_tstrcmp(w->update, NODATA)) _tcscat(str, w->update);
- else _tcscat(str, TranslateT("<unknown time>"));
+ if (mir_tstrcmp(w->update, NODATA)) mir_tstrcat(str, w->update);
+ else mir_tstrcat(str, TranslateT("<unknown time>"));
break;
- case 'v': _tcscat(str, w->vis); break;
- case 'w': _tcscat(str, w->wind); break;
- case 'y': _tcscat(str, w->sunset); break;
- case '%': _tcscat(str, _T("%")); break;
+ case 'v': mir_tstrcat(str, w->vis); break;
+ case 'w': mir_tstrcat(str, w->wind); break;
+ case 'y': mir_tstrcat(str, w->sunset); break;
+ case '%': mir_tstrcat(str, _T("%")); break;
case '[': // custom variables
i++;
name[0] = 0;
@@ -554,7 +554,7 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str) // access the database to get its value
if ( !db_get_ts(w->hContact, WEATHERCONDITION, name, &dbv)) {
if (dbv.ptszVal != TranslateTS(NODATA) && dbv.ptszVal != TranslateT("<Error>"))
- _tcscat(str, dbv.ptszVal);
+ mir_tstrcat(str, dbv.ptszVal);
db_free(&dbv);
}
break;
@@ -563,7 +563,7 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str) // if the character is not a variable, write the original character to the new string
else {
mir_sntprintf(lpzDate, SIZEOF(lpzDate), _T("%c"), dis[i]);
- _tcscat(str, lpzDate);
+ mir_tstrcat(str, lpzDate);
} }
return str;
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp index dd01691fc3..f47db595de 100644 --- a/plugins/Weather/src/weather_data.cpp +++ b/plugins/Weather/src/weather_data.cpp @@ -243,12 +243,12 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) // degree sign
else if ( !mir_tstrcmpi(UpdateData->Unit, _T("DEG")))
{
- if ( !opt.DoNotAppendUnit) _tcscat(Data, opt.DegreeSign);
+ if ( !opt.DoNotAppendUnit) mir_tstrcat(Data, opt.DegreeSign);
}
// percent sign
else if ( !mir_tstrcmpi(UpdateData->Unit, _T("%")))
{
- if ( !opt.DoNotAppendUnit) _tcscat(Data, _T("%"));
+ if ( !opt.DoNotAppendUnit) mir_tstrcat(Data, _T("%"));
}
// truncating strings for day/month to 2 or 3 characters
else if ( !mir_tstrcmpi(UpdateData->Unit, _T("DAY")) || !mir_tstrcmpi(UpdateData->Unit, _T("MONTH")))
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp index 2dae6b0c4e..77438d6ccc 100644 --- a/plugins/WebView/src/webview_services.cpp +++ b/plugins/WebView/src/webview_services.cpp @@ -70,7 +70,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) srand((unsigned)time(NULL)); TCHAR ranStr[7]; _itot((int)10000 *rand() / (RAND_MAX + 1.0), ranStr, 10); - _tcscat(nick, ranStr); + mir_tstrcat(nick, ranStr); } if ( _tcschr(nick, '(') == 0) { @@ -427,7 +427,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam) TCHAR ranStr[10]; _itot((int) 10000 *rand() / (RAND_MAX + 1.0), ranStr, 10); - _tcscat(Newnick, ranStr); + mir_tstrcat(Newnick, ranStr); } //end convert diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp index cebcf5a6ca..79c699d7de 100644 --- a/plugins/WhenWasIt/src/services.cpp +++ b/plugins/WhenWasIt/src/services.cpp @@ -255,7 +255,7 @@ INT_PTR ExportBirthdaysService(WPARAM wParam, LPARAM lParam) TCHAR buffer[2048];
TCHAR *fn = _tcsrchr(fileName, _T('\\')) + 1;
if (!_tcschr(fn, _T('.')))
- _tcscat(fileName, _T(BIRTHDAY_EXTENSION));
+ mir_tstrcat(fileName, _T(BIRTHDAY_EXTENSION));
mir_sntprintf(buffer, SIZEOF(buffer), TranslateT("Exporting birthdays to file: %s"), fileName);
ShowPopupMessage(TranslateT("WhenWasIt"), buffer, hExportBirthdays);
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index ef58ed35d6..a837cda3b7 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -63,7 +63,7 @@ static void GetProfileDirectory(TCHAR *szPath, int cbPath) { TCHAR tszOldPath[MAX_PATH]; CallService(MS_DB_GETPROFILEPATHT, SIZEOF(tszOldPath), (LPARAM)tszOldPath); - _tcscat(tszOldPath, _T("\\*.book")); + mir_tstrcat(tszOldPath, _T("\\*.book")); VARST ptszNewPath( _T("%miranda_userdata%")); @@ -125,8 +125,8 @@ BOOL CALLBACK EnumSystemCodePagesProc(LPTSTR cpStr) } #ifdef _DEBUG if (!found) { - _tcscat(unknownCP, info.CodePageName); - _tcscat(unknownCP, _T("\n")); + mir_tstrcat(unknownCP, info.CodePageName); + mir_tstrcat(unknownCP, _T("\n")); } #endif } |