diff options
Diffstat (limited to 'plugins')
77 files changed, 260 insertions, 260 deletions
diff --git a/plugins/Alarms/src/alarm_win.cpp b/plugins/Alarms/src/alarm_win.cpp index c271880119..50d487328a 100644 --- a/plugins/Alarms/src/alarm_win.cpp +++ b/plugins/Alarms/src/alarm_win.cpp @@ -364,31 +364,31 @@ int ReloadFonts(WPARAM, LPARAM) int AlarmWinModulesLoaded(WPARAM, LPARAM)
{
title_font_id.cbSize = sizeof(FontIDT);
- _tcscpy(title_font_id.group, LPGENT("Alarms"));
- _tcscpy(title_font_id.name, LPGENT("Title"));
+ mir_tstrcpy(title_font_id.group, LPGENT("Alarms"));
+ mir_tstrcpy(title_font_id.name, LPGENT("Title"));
mir_strcpy(title_font_id.dbSettingsGroup, MODULE);
mir_strcpy(title_font_id.prefix, "FontTitle");
- _tcscpy(title_font_id.backgroundGroup,LPGENT("Alarms"));
- _tcscpy(title_font_id.backgroundName,LPGENT("Background"));
+ mir_tstrcpy(title_font_id.backgroundGroup,LPGENT("Alarms"));
+ mir_tstrcpy(title_font_id.backgroundName,LPGENT("Background"));
title_font_id.flags = 0;
title_font_id.order = 0;
FontRegisterT(&title_font_id);
window_font_id.cbSize = sizeof(FontIDT);
- _tcscpy(window_font_id.group, LPGENT("Alarms"));
- _tcscpy(window_font_id.name, LPGENT("Window"));
+ mir_tstrcpy(window_font_id.group, LPGENT("Alarms"));
+ mir_tstrcpy(window_font_id.name, LPGENT("Window"));
mir_strcpy(window_font_id.dbSettingsGroup, MODULE);
mir_strcpy(window_font_id.prefix, "FontWindow");
- _tcscpy(window_font_id.backgroundGroup,LPGENT("Alarms"));
- _tcscpy(window_font_id.backgroundName,LPGENT("Background"));
+ mir_tstrcpy(window_font_id.backgroundGroup,LPGENT("Alarms"));
+ mir_tstrcpy(window_font_id.backgroundName,LPGENT("Background"));
window_font_id.flags = 0;
window_font_id.order = 1;
FontRegisterT(&window_font_id);
bk_colour_id.cbSize = sizeof(ColourIDT);
mir_strcpy(bk_colour_id.dbSettingsGroup, MODULE);
- _tcscpy(bk_colour_id.group, LPGENT("Alarms"));
- _tcscpy(bk_colour_id.name, LPGENT("Background"));
+ mir_tstrcpy(bk_colour_id.group, LPGENT("Alarms"));
+ mir_tstrcpy(bk_colour_id.name, LPGENT("Background"));
mir_strcpy(bk_colour_id.setting, "BkColour");
bk_colour_id.defcolour = GetSysColor(COLOR_3DFACE);
bk_colour_id.flags = 0;
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index dc1489ee7e..a1701f74ec 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -342,7 +342,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateServiceFunction(MS_AVATARHISTORY_GET_CACHED_AVATAR, GetCachedAvatar);
if (CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)profilePath) != 0)
- _tcscpy(profilePath, _T(".")); // Failed, use current dir
+ mir_tstrcpy(profilePath, _T(".")); // Failed, use current dir
SkinAddNewSoundExT("avatar_changed",LPGENT("Avatar History"),LPGENT("Contact changed avatar"));
SkinAddNewSoundExT("avatar_removed",LPGENT("Avatar History"),LPGENT("Contact removed avatar"));
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index 11f30f6fa8..6ca2bb181d 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -427,8 +427,8 @@ int ReloadColors(WPARAM, LPARAM) {
ColourIDT colourid = { 0 };
colourid.cbSize = sizeof(colourid);
- _tcscpy(colourid.group, _T(ModuleName));
- _tcscpy(colourid.name, LPGENT("Frame background"));
+ mir_tstrcpy(colourid.group, _T(ModuleName));
+ mir_tstrcpy(colourid.name, LPGENT("Frame background"));
clBack = CallService(MS_COLOUR_GETT, (WPARAM)&colourid, 0);
if (hBkgBrush)
@@ -476,8 +476,8 @@ void CreateFrame() colourid.cbSize = sizeof(ColourIDT);
mir_strcpy(colourid.dbSettingsGroup, ModuleName);
mir_strcpy(colourid.setting, "ColorFrame");
- _tcscpy(colourid.name, LPGENT("Frame background"));
- _tcscpy(colourid.group, _T(ModuleName));
+ mir_tstrcpy(colourid.name, LPGENT("Frame background"));
+ mir_tstrcpy(colourid.group, _T(ModuleName));
colourid.defcolour = GetSysColor(COLOR_3DFACE);
ColourRegisterT(&colourid);
diff --git a/plugins/Boltun/src/Engine/Mind.cpp b/plugins/Boltun/src/Engine/Mind.cpp index 91b2dc4a84..5158a459e6 100644 --- a/plugins/Boltun/src/Engine/Mind.cpp +++ b/plugins/Boltun/src/Engine/Mind.cpp @@ -134,7 +134,7 @@ void Mind::Load(tstring filename) format(st);
count = st.length();
c = co = new TCHAR[count + 1];
- _tcscpy(c, st.c_str());
+ mir_tstrcpy(c, st.c_str());
size_t pos = 0;
while (pos < count && _istspace(*c))
{
@@ -259,7 +259,7 @@ void Mind::Load(tstring filename) tstring sc(c);
int count1 = (int)s1.length();
TCHAR *c = new TCHAR[count1 + 1];
- _tcscpy(c, s1.c_str());
+ mir_tstrcpy(c, s1.c_str());
CharLower(c);
s1 = c;
delete c;
diff --git a/plugins/Boltun/src/Engine/TalkEngine.cpp b/plugins/Boltun/src/Engine/TalkEngine.cpp index 8d4efbf476..1c4465402b 100644 --- a/plugins/Boltun/src/Engine/TalkEngine.cpp +++ b/plugins/Boltun/src/Engine/TalkEngine.cpp @@ -274,7 +274,7 @@ tstring TalkBot::AllReplies(const tstring &incomingMessage, ContactData *contact TalkBot::MessageInfo* TalkBot::Reply(MCONTACT contact, tstring incomingMessage, bool saveChoice)
{
TCHAR* str = new TCHAR[incomingMessage.length() + 1];
- _tcscpy(str, incomingMessage.c_str());
+ mir_tstrcpy(str, incomingMessage.c_str());
CharLower(str);
incomingMessage = str;
delete[] str;
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 7a3796ecc9..2f8abd7a01 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -380,7 +380,7 @@ static INT_PTR CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP const size_t fileNameSize = 5000;
TCHAR *filename = new TCHAR[fileNameSize];
TCHAR *fullname = GetFullName(Config.MindFileName);
- _tcscpy(filename, fullname);
+ mir_tstrcpy(filename, fullname);
if (fullname != Config.MindFileName)
delete[] fullname;
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index f5890628fa..6d6a1ce6a8 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -218,7 +218,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;
- _tcscpy(newPounce, dbv.ptszVal);
+ mir_tstrcpy(newPounce, dbv.ptszVal);
_tcscat(newPounce, message);
db_set_ws(hContact, modname, "PounceMsg", newPounce);
mir_free(newPounce);
diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp index 281c973a55..a7dc262382 100644 --- a/plugins/ChangeKeyboardLayout/src/options.cpp +++ b/plugins/ChangeKeyboardLayout/src/options.cpp @@ -206,7 +206,7 @@ INT_PTR CALLBACK DlgMainProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, LP i = SendDlgItemMessage(hWnd, IDC_COMBO_LANG, CB_GETCURSEL, 0, 0);
ptszMemLay = ptszLayStrings[i];
if (mir_tstrcmp(ptszMemLay, ptszFormLay) != 0) {
- _tcscpy(ptszMemLay, ptszFormLay);
+ mir_tstrcpy(ptszMemLay, ptszFormLay);
ptszGenLay = GenerateLayoutString(hklLayouts[i]);
pszNameLay = GetNameOfLayout(hklLayouts[i]);
@@ -382,7 +382,7 @@ INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, pdtData.iSeconds = poOptionsTemp.bTimeout;
break;
}
- _tcscpy(ptszPopupPreviewText, pdtData.lptzText);
+ mir_tstrcpy(ptszPopupPreviewText, pdtData.lptzText);
pdtData.PluginData = ptszPopupPreviewText;
pdtData.lchIcon = hPopupIcon;
poOptions.paActions[0].lchIcon = hCopyIcon;
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp index 52de730db6..33c2a88308 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp +++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp @@ -53,7 +53,7 @@ BOOL CopyTextToClipboard(LPTSTR ptszText) EmptyClipboard();
HGLOBAL hCopy = GlobalAlloc(GMEM_MOVEABLE, (mir_tstrlen(ptszText) + 1)*sizeof(TCHAR));
- _tcscpy((TCHAR*)GlobalLock(hCopy), ptszText);
+ mir_tstrcpy((TCHAR*)GlobalLock(hCopy), ptszText);
GlobalUnlock(hCopy);
SetClipboardData(CF_UNICODETEXT, hCopy);
CloseClipboard();
@@ -139,7 +139,7 @@ LPTSTR GetLayoutString(HKL hklLayout) LPTSTR ChangeTextCase(LPCTSTR ptszInText)
{
LPTSTR ptszOutText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(TCHAR));
- _tcscpy(ptszOutText, ptszInText);
+ mir_tstrcpy(ptszOutText, ptszInText);
for (DWORD i = 0; i < mir_tstrlen(ptszInText); i++) {
CharUpperBuff(&ptszOutText[i], 1);
@@ -152,7 +152,7 @@ LPTSTR ChangeTextCase(LPCTSTR ptszInText) LPTSTR ChangeTextLayout(LPCTSTR ptszInText, HKL hklCurLay, HKL hklToLay, BOOL TwoWay)
{
LPTSTR ptszOutText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(TCHAR));
- _tcscpy(ptszOutText, ptszInText);
+ mir_tstrcpy(ptszOutText, ptszInText);
if (hklCurLay == NULL || hklToLay == NULL)
return ptszOutText;
@@ -377,7 +377,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) ptrT ptszTemp((LPTSTR)mir_alloc(MaxTextSize*sizeof(TCHAR)));
_tcsncpy(ptszTemp, &ptszInText[crTemp.cpMin], crTemp.cpMax - crTemp.cpMin);
ptszTemp[crTemp.cpMax - crTemp.cpMin] = 0;
- _tcscpy(ptszInText, ptszTemp);
+ mir_tstrcpy(ptszInText, ptszTemp);
if (mir_tstrlen(ptszInText) == 0) {
SendMessage(hTextWnd, EM_EXSETSEL, 0, (LPARAM)&crSelection);
@@ -446,7 +446,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) //-------------------------------Покажем попапы------------------------------------------
if (moOptions.ShowPopup) {
LPTSTR ptszPopupText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(TCHAR));
- _tcscpy(ptszPopupText, ptszMBox);
+ mir_tstrcpy(ptszPopupText, ptszMBox);
POPUPDATAT_V2 pdtData = { 0 };
pdtData.cbSize = sizeof(pdtData);
diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp index b96870a9ea..ccad81bc18 100644 --- a/plugins/CrashDumper/src/ui.cpp +++ b/plugins/CrashDumper/src/ui.cpp @@ -71,7 +71,7 @@ INT_PTR CALLBACK DlgProcView(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara CHARFORMAT2 chf;
chf.cbSize = sizeof(chf);
SendDlgItemMessage(hwndDlg, IDC_VIEWVERSIONINFO, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&chf);
- _tcscpy(chf.szFaceName, TEXT("Courier New"));
+ mir_tstrcpy(chf.szFaceName, TEXT("Courier New"));
SendDlgItemMessage(hwndDlg, IDC_VIEWVERSIONINFO, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&chf);
CMString buffer;
@@ -310,7 +310,7 @@ void ShowMessage(int type, const TCHAR* format, ...) va_end(va);
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
- _tcscpy(pi.lptzContactName, TEXT(PluginName));
+ mir_tstrcpy(pi.lptzContactName, TEXT(PluginName));
pi.lchIcon = LoadIconEx(IDI_VI);
pi.PluginWindowProc = DlgProcPopup;
pi.PluginData = (void*)type;
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp index 81e6578bf6..652bace135 100644 --- a/plugins/CrashDumper/src/utils.cpp +++ b/plugins/CrashDumper/src/utils.cpp @@ -353,12 +353,12 @@ void GetProcessorString(CMString &buffer) if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("Hardware\\Description\\System\\CentralProcessor\\0"), 0, KEY_QUERY_VALUE, &hKey)) {
size = SIZEOF(cpuName);
if (RegQueryValueEx(hKey, TEXT("ProcessorNameString"), NULL, NULL, (LPBYTE)cpuName, &size) != ERROR_SUCCESS)
- _tcscpy(cpuName, TEXT("Unknown"));
+ mir_tstrcpy(cpuName, TEXT("Unknown"));
size = SIZEOF(cpuIdent);
if (RegQueryValueEx(hKey, TEXT("Identifier"), NULL, NULL, (LPBYTE)cpuIdent, &size) != ERROR_SUCCESS)
if (RegQueryValueEx(hKey, TEXT("VendorIdentifier"), NULL, NULL, (LPBYTE)cpuIdent, &size) != ERROR_SUCCESS)
- _tcscpy(cpuIdent, TEXT("Unknown"));
+ mir_tstrcpy(cpuIdent, TEXT("Unknown"));
RegCloseKey(hKey);
}
diff --git a/plugins/DbChecker/src/selectdb.cpp b/plugins/DbChecker/src/selectdb.cpp index 12cd47105b..a55933a30f 100644 --- a/plugins/DbChecker/src/selectdb.cpp +++ b/plugins/DbChecker/src/selectdb.cpp @@ -159,7 +159,7 @@ void FindAdd(HWND hdlg, TCHAR *szProfileDir, TCHAR *szPrefix) TCHAR *addstring(TCHAR *str, TCHAR *add)
{
- _tcscpy(str, add);
+ mir_tstrcpy(str, add);
return str + mir_tstrlen(add) + 1;
}
@@ -203,7 +203,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM TCHAR szMirandaProfiles[MAX_PATH];
DWORD cbData = SIZEOF(szMirandaPath);
- _tcscpy(szMirandaProfiles, szMirandaPath);
+ mir_tstrcpy(szMirandaProfiles, szMirandaPath);
_tcscat(szMirandaProfiles, _T("\\Profiles"));
GetProfileDirectory(szMirandaPath, szProfileDir, SIZEOF(szProfileDir));
diff --git a/plugins/DbChecker/src/worker.cpp b/plugins/DbChecker/src/worker.cpp index 91eb089ff1..cf0b7bee1d 100644 --- a/plugins/DbChecker/src/worker.cpp +++ b/plugins/DbChecker/src/worker.cpp @@ -42,14 +42,14 @@ static void Finalize(time_t& ts) if (opts.bBackup) {
TCHAR dbPath[MAX_PATH], dbFile[MAX_PATH];
- _tcscpy(dbPath, opts.filename);
+ mir_tstrcpy(dbPath, opts.filename);
TCHAR* str2 = _tcsrchr(dbPath, '\\');
if (str2 != NULL) {
- _tcscpy(dbFile, str2 + 1);
+ mir_tstrcpy(dbFile, str2 + 1);
*str2 = 0;
}
else {
- _tcscpy(dbFile, dbPath);
+ mir_tstrcpy(dbFile, dbPath);
dbPath[0] = 0;
}
for (int i = 1;; i++) {
@@ -79,14 +79,14 @@ void __cdecl WorkerThread(void *) AddToStatus(STATUS_MESSAGE, TranslateT("Database worker thread activated"));
- _tcscpy(opts.workingFilename, opts.filename);
+ mir_tstrcpy(opts.workingFilename, opts.filename);
if (opts.bCheckOnly) {
- _tcscpy(opts.outputFilename, TranslateT("<check only>"));
+ mir_tstrcpy(opts.outputFilename, TranslateT("<check only>"));
opts.hOutFile = INVALID_HANDLE_VALUE;
}
else {
- _tcscpy(opts.outputFilename, opts.filename);
+ mir_tstrcpy(opts.outputFilename, opts.filename);
*_tcsrchr(opts.outputFilename, '.') = 0;
_tcscat(opts.outputFilename, TranslateT(" (Output).dat"));
opts.hOutFile = CreateFile(opts.outputFilename, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_FLAG_SEQUENTIAL_SCAN, NULL);
diff --git a/plugins/Exchange/src/MirandaExchange.cpp b/plugins/Exchange/src/MirandaExchange.cpp index e1b9a8163b..079711f75b 100644 --- a/plugins/Exchange/src/MirandaExchange.cpp +++ b/plugins/Exchange/src/MirandaExchange.cpp @@ -119,14 +119,14 @@ CKeeper::CKeeper( LPTSTR szSender, LPTSTR szSubject, LPSTR szEntryID) m_nSizeSender = (UINT)mir_tstrlen(szSender)+1;
m_szSender = new TCHAR[ m_nSizeSender ];
memset(m_szSender, 0, m_nSizeSender * sizeof(TCHAR));
- _tcscpy(m_szSender, szSender);
+ mir_tstrcpy(m_szSender, szSender);
}
if (NULL != szSubject) {
m_nSizeSubject = (UINT)mir_tstrlen(szSubject) +1;
m_szSubject = new TCHAR[m_nSizeSubject];
memset(m_szSubject, 0, m_nSizeSubject * sizeof(TCHAR));
- _tcscpy(m_szSubject, szSubject);
+ mir_tstrcpy(m_szSubject, szSubject);
}
if (NULL != szEntryID) {
@@ -397,7 +397,7 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass nSize++;
m_szUsername = new TCHAR[nSize];
memset ( m_szUsername, 0, nSize * nSizeOfTCHAR );
- _tcscpy( m_szUsername, szUsername );
+ mir_tstrcpy( m_szUsername, szUsername );
}
}
@@ -407,7 +407,7 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass nSize++;
m_szPassword = new TCHAR[nSize];
memset(m_szPassword, 0, nSize * nSizeOfTCHAR);
- _tcscpy(m_szPassword, szPassword);
+ mir_tstrcpy(m_szPassword, szPassword);
}
}
@@ -417,7 +417,7 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass nSize++;
m_szExchangeServer = new TCHAR[nSize];
memset(m_szExchangeServer, 0, nSize * nSizeOfTCHAR);
- _tcscpy(m_szExchangeServer, szExchangeServer);
+ mir_tstrcpy(m_szExchangeServer, szExchangeServer);
}
}
diff --git a/plugins/FTPFileYM/src/job_delete.cpp b/plugins/FTPFileYM/src/job_delete.cpp index a5310c82d6..63c50f8d88 100644 --- a/plugins/FTPFileYM/src/job_delete.cpp +++ b/plugins/FTPFileYM/src/job_delete.cpp @@ -92,7 +92,7 @@ void DeleteJob::run() else if (manDlg != NULL && this->treeItem)
{
TCHAR *error = mir_a2t(szError);
- _tcscpy(this->treeItem->stzToolTip, error);
+ mir_tstrcpy(this->treeItem->stzToolTip, error);
this->treeItem->setState(Manager::TreeItem::_ERROR());
FREE(error);
}
diff --git a/plugins/FTPFileYM/src/job_generic.cpp b/plugins/FTPFileYM/src/job_generic.cpp index f567f15610..21bddfc649 100644 --- a/plugins/FTPFileYM/src/job_generic.cpp +++ b/plugins/FTPFileYM/src/job_generic.cpp @@ -32,8 +32,8 @@ GenericJob::GenericJob(MCONTACT _hContact, int _iFtpNum, EMode _mode) : GenericJob::GenericJob(GenericJob *job)
:hContact(job->hContact),iFtpNum(job->iFtpNum),mode(job->mode),status(job->status),ftp(job->ftp),tab(job->tab)
{
- _tcscpy(this->stzFilePath, job->stzFilePath);
- _tcscpy(this->stzFileName, job->stzFileName);
+ mir_tstrcpy(this->stzFilePath, job->stzFilePath);
+ mir_tstrcpy(this->stzFileName, job->stzFileName);
mir_strcpy(this->szSafeFileName, job->szSafeFileName);
}
diff --git a/plugins/FTPFileYM/src/job_packer.cpp b/plugins/FTPFileYM/src/job_packer.cpp index 26f1bc9ad5..05898d3f41 100644 --- a/plugins/FTPFileYM/src/job_packer.cpp +++ b/plugins/FTPFileYM/src/job_packer.cpp @@ -36,29 +36,29 @@ void PackerJob::getZipFilePath() if (this->files.size() == 1)
{
- _tcscpy(stzFileName, Utils::getFileNameFromPath(this->files[0]));
+ mir_tstrcpy(stzFileName, Utils::getFileNameFromPath(this->files[0]));
pch = _tcsrchr(stzFileName, '.');
if (pch) *pch = 0;
}
else
{
- _tcscpy(buff, this->files[0]);
+ mir_tstrcpy(buff, this->files[0]);
pch = _tcsrchr(buff, '\\');
if (pch)
{
*pch = 0;
pch = _tcsrchr(buff, '\\');
- if (pch) _tcscpy(stzFileName, pch + 1);
+ if (pch) mir_tstrcpy(stzFileName, pch + 1);
}
}
if (stzFileName[0] == '\0')
- _tcscpy(stzFileName, _T("archive"));
+ mir_tstrcpy(stzFileName, _T("archive"));
GetTempPath(SIZEOF(buff), buff);
mir_sntprintf(this->stzFilePath, SIZEOF(this->stzFilePath), _T("%s%s.zip"), buff, stzFileName);
- _tcscpy(this->stzFileName, Utils::getFileNameFromPath(this->stzFilePath));
+ mir_tstrcpy(this->stzFileName, Utils::getFileNameFromPath(this->stzFilePath));
if (opt.bSetZipName)
Utils::setFileNameDlg(this->stzFileName);
diff --git a/plugins/FTPFileYM/src/job_upload.cpp b/plugins/FTPFileYM/src/job_upload.cpp index 5369763b60..ac490cf5a9 100644 --- a/plugins/FTPFileYM/src/job_upload.cpp +++ b/plugins/FTPFileYM/src/job_upload.cpp @@ -62,8 +62,8 @@ void UploadJob::addToUploadDlg() {
for (UINT i = 0; i < this->files.size(); i++) {
UploadJob *jobCopy = new UploadJob(this);
- _tcscpy(jobCopy->stzFilePath, this->files[i]);
- _tcscpy(jobCopy->stzFileName, Utils::getFileNameFromPath(jobCopy->stzFilePath));
+ mir_tstrcpy(jobCopy->stzFilePath, this->files[i]);
+ mir_tstrcpy(jobCopy->stzFileName, Utils::getFileNameFromPath(jobCopy->stzFilePath));
Utils::makeSafeString(jobCopy->stzFileName, jobCopy->szSafeFileName);
UploadDialog::Tab *newTab = new UploadDialog::Tab(jobCopy);
diff --git a/plugins/FTPFileYM/src/mir_db.cpp b/plugins/FTPFileYM/src/mir_db.cpp index 82a8306ee7..4ba9ce13a3 100644 --- a/plugins/FTPFileYM/src/mir_db.cpp +++ b/plugins/FTPFileYM/src/mir_db.cpp @@ -100,7 +100,7 @@ int DB::getString(MCONTACT hContact, char *szModule, char *szSetting, TCHAR *buf DBVARIANT dbv;
if (!db_get_ts(hContact, szModule, szSetting, &dbv))
{
- _tcscpy(buff, dbv.ptszVal);
+ mir_tstrcpy(buff, dbv.ptszVal);
db_free(&dbv);
return 0;
}
diff --git a/plugins/FTPFileYM/src/utils.cpp b/plugins/FTPFileYM/src/utils.cpp index 02c5ecddb7..3cd128499b 100644 --- a/plugins/FTPFileYM/src/utils.cpp +++ b/plugins/FTPFileYM/src/utils.cpp @@ -63,7 +63,7 @@ TCHAR *Utils::getTextFragment(TCHAR *stzText, size_t length, TCHAR *buff) {
if (mir_tstrlen(stzText) > length)
{
- _tcscpy(buff, stzText);
+ mir_tstrcpy(buff, stzText);
buff[length - 1] = 0;
_tcscat(buff, _T("..."));
return buff;
@@ -211,7 +211,7 @@ bool Utils::setFileNameDlgA(char *nameBuff) {
TCHAR buff[64];
TCHAR *tmp = mir_a2t(nameBuff);
- _tcscpy(buff, tmp);
+ mir_tstrcpy(buff, tmp);
FREE(tmp);
bool res = setFileNameDlg(buff);
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index e0b9feb3f2..a6c92a6311 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -68,7 +68,7 @@ char* TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char *szProto) else {
if (result == NULL) {
/* relative -> absolute */
- _tcscpy(tmpPath, dbv.ptszVal);
+ mir_tstrcpy(tmpPath, dbv.ptszVal);
if (_tcsncmp(tmpPath, _T("http://"), 7))
PathToAbsoluteT(dbv.ptszVal, tmpPath);
diff --git a/plugins/Import/src/utils.cpp b/plugins/Import/src/utils.cpp index a7ac2cef78..b8c11433ef 100644 --- a/plugins/Import/src/utils.cpp +++ b/plugins/Import/src/utils.cpp @@ -37,7 +37,7 @@ int CreateGroup(const TCHAR *group, MCONTACT hContact) size_t cbName = mir_tstrlen(group);
TCHAR *tszGrpName = (TCHAR*)_alloca((cbName + 2)*sizeof(TCHAR));
tszGrpName[0] = 1 | GROUPF_EXPANDED;
- _tcscpy(tszGrpName + 1, group);
+ mir_tstrcpy(tszGrpName + 1, group);
// Check for duplicate & find unused id
char groupIdStr[11];
diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp index 8fbb05e2a9..75bbbda4b4 100644 --- a/plugins/KeyboardNotify/src/options.cpp +++ b/plugins/KeyboardNotify/src/options.cpp @@ -716,7 +716,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (db_get_ts(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), &dbv)) str[0] = _T('\0'); else { - _tcscpy(str, dbv.ptszVal); + mir_tstrcpy(str, dbv.ptszVal); db_free(&dbv); } SendDlgItemMessage(hwndDlg, IDC_THEME, CB_SETITEMDATA, (WPARAM)index, (LPARAM)str); @@ -871,14 +871,14 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR ofn.lStructSize = sizeof(OPENFILENAME); ofn.hwndOwner = hwndDlg; ofn.hInstance = NULL; - _tcscpy(filter, TranslateT("Keyboard Notify Theme")); + mir_tstrcpy(filter, TranslateT("Keyboard Notify Theme")); wcscat(filter, _T(" (*.knt)")); pfilter = filter + mir_tstrlen(filter) + 1; - _tcscpy(pfilter, _T("*.knt")); + mir_tstrcpy(pfilter, _T("*.knt")); pfilter = pfilter + mir_tstrlen(pfilter) + 1; - _tcscpy(pfilter, TranslateT("All Files")); + mir_tstrcpy(pfilter, TranslateT("All Files")); pfilter = pfilter + mir_tstrlen(pfilter) + 1; - _tcscpy(pfilter, _T("*.*")); + mir_tstrcpy(pfilter, _T("*.*")); pfilter = pfilter + mir_tstrlen(pfilter) + 1; *pfilter = _T('\0'); ofn.lpstrFilter = filter; @@ -899,14 +899,14 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR ofn.lStructSize = sizeof(OPENFILENAME); ofn.hwndOwner = hwndDlg; ofn.hInstance = NULL; - _tcscpy(filter, TranslateT("Keyboard Notify Theme")); + mir_tstrcpy(filter, TranslateT("Keyboard Notify Theme")); wcscat(filter, _T(" (*.knt)")); pfilter = filter + mir_tstrlen(filter) + 1; - _tcscpy(pfilter, _T("*.knt")); + mir_tstrcpy(pfilter, _T("*.knt")); pfilter = pfilter + mir_tstrlen(pfilter) + 1; - _tcscpy(pfilter, TranslateT("All Files")); + mir_tstrcpy(pfilter, TranslateT("All Files")); pfilter = pfilter + mir_tstrlen(pfilter) + 1; - _tcscpy(pfilter, _T("*.*")); + mir_tstrcpy(pfilter, _T("*.*")); pfilter = pfilter + mir_tstrlen(pfilter) + 1; *pfilter = _T('\0'); ofn.lpstrFilter = filter; @@ -936,7 +936,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: if (!db_get_ts(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", wCustomTheme), &dbv)) - _tcscpy(theme, dbv.ptszVal); + mir_tstrcpy(theme, dbv.ptszVal); else theme[0] = _T('\0'); @@ -1043,7 +1043,7 @@ void importThemes(const TCHAR *filename, BOOL overrideExisting) case 0: if (i > 1 && str[0] == '[' && str[i] == ']') { status = 1; - _tcscpy(theme, str+1); + mir_tstrcpy(theme, str+1); theme[i-1] = '\0'; } break; @@ -1067,13 +1067,13 @@ void writeThemeToCombo(const TCHAR *theme, const TCHAR *custom, BOOL overrideExi item = SendDlgItemMessage(hwndTheme, IDC_THEME, CB_ADDSTRING, 0, (LPARAM)theme); str = (TCHAR *)malloc((MAX_PATH+1)*sizeof(TCHAR)); if (str) - _tcscpy(str, custom); + mir_tstrcpy(str, custom); SendDlgItemMessage(hwndTheme, IDC_THEME, CB_SETITEMDATA, (WPARAM)item, (LPARAM)str); } else if (overrideExisting) { str = (TCHAR *)SendDlgItemMessage(hwndTheme, IDC_THEME, CB_GETITEMDATA, (WPARAM)item, 0); if (str) - _tcscpy(str, custom); + mir_tstrcpy(str, custom); } } @@ -1168,7 +1168,7 @@ INT_PTR CALLBACK DlgProcProcesses(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_GETLBTEXT, (WPARAM)i, (LPARAM)szFileNameAux); ProcessListAux.szFileName[i] = (TCHAR *)malloc((mir_tstrlen(szFileNameAux) + 1)*sizeof(TCHAR)); if (ProcessListAux.szFileName[i]) - _tcscpy(ProcessListAux.szFileName[i], szFileNameAux); + mir_tstrcpy(ProcessListAux.szFileName[i], szFileNameAux); } case IDC_CANCELPGM: @@ -1195,7 +1195,7 @@ void createProcessListAux(void) else { ProcessListAux.szFileName[i] = (TCHAR *)malloc((mir_tstrlen(ProcessList.szFileName[i]) + 1)*sizeof(TCHAR)); if (ProcessListAux.szFileName[i]) - _tcscpy(ProcessListAux.szFileName[i], ProcessList.szFileName[i]); + mir_tstrcpy(ProcessListAux.szFileName[i], ProcessList.szFileName[i]); } } diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index fcbb410790..7649a3f68a 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -559,7 +559,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) if (!szResult)
return NULL;
- _tcscpy(szResult, (Result != NULL) ? Result : _T(""));
+ mir_tstrcpy(szResult, (Result != NULL) ? Result : _T(""));
return (INT_PTR)szResult;
}
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index c2b22c702b..c87861bd25 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -271,7 +271,7 @@ static TCHAR* GetEventPreview(DBEVENTINFO *dbei) szNick = mir_a2t(szUin);
if (szNick) {
- _tcscpy(szBuf, szNick);
+ mir_tstrcpy(szBuf, szNick);
_tcscat(szBuf, TranslateT(" added you to the contact list"));
mir_free(szNick);
comment1 = mir_tstrdup(szBuf);
@@ -307,7 +307,7 @@ static TCHAR* GetEventPreview(DBEVENTINFO *dbei) szNick = mir_a2t(szUin);
if (szNick) {
- _tcscpy(szBuf, szNick);
+ mir_tstrcpy(szBuf, szNick);
_tcscat(szBuf, TranslateT(" requested authorization"));
mir_free(szNick);
comment1 = mir_tstrdup(szBuf);
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 9f7be0ff22..011873b9e9 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -150,11 +150,11 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA lvi.iItem = ListView_InsertItem(hList, &lvi);
if (!db_get_ts(hContact, MODULE, StatusList[Index(i)].lpzSkinSoundName, &dbv)) {
- _tcscpy(buff, dbv.ptszVal);
+ mir_tstrcpy(buff, dbv.ptszVal);
db_free(&dbv);
}
else
- _tcscpy(buff, TranslateT(DEFAULT_SOUND));
+ mir_tstrcpy(buff, TranslateT(DEFAULT_SOUND));
ListView_SetItemText(hList, lvi.iItem, 1, buff);
}
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index 911c595945..b7096d0092 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -80,13 +80,13 @@ TCHAR* GetStatusTypeAsString(int type, TCHAR *buff) {
switch (type) {
case TYPE_JABBER_MOOD:
- _tcscpy(buff, TranslateT("Mood")); return buff;
+ mir_tstrcpy(buff, TranslateT("Mood")); return buff;
case TYPE_JABBER_ACTIVITY:
- _tcscpy(buff, TranslateT("Activity")); return buff;
+ mir_tstrcpy(buff, TranslateT("Activity")); return buff;
case TYPE_ICQ_XSTATUS:
- _tcscpy(buff, TranslateT("xStatus")); return buff;
+ mir_tstrcpy(buff, TranslateT("xStatus")); return buff;
default:
- _tcscpy(buff, TranslateT("<unknown>")); return buff;
+ mir_tstrcpy(buff, TranslateT("<unknown>")); return buff;
}
}
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index f1436bee2c..e22b320f61 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -296,7 +296,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR { wstring str = name; wstring::size_type p = str.find(_T("("))-1; - _tcscpy(name, str.substr(0, p).c_str()); + mir_tstrcpy(name, str.substr(0, p).c_str()); } } string out; @@ -863,15 +863,15 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, mir_free(mir_path); 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); - _tcscpy(gpg_path, tmp); + mir_tstrcpy(gpg_path, tmp); _tcscat(gpg_path, _T("\\GnuPG\\gpg.exe")); - _tcscpy(gpg_lang_path, tmp); + mir_tstrcpy(gpg_lang_path, tmp); _tcscat(gpg_lang_path, _T("\\GnuPG\\gnupg.nls\\en@quot.mo")); mir_free(tmp); if(boost::filesystem::exists(gpg_path)) { gpg_exists = true; - _tcscpy(path, _T("GnuPG\\gpg.exe")); + mir_tstrcpy(path, _T("GnuPG\\gpg.exe")); } if(boost::filesystem::exists(gpg_lang_path)) lang_exists = true; diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index d13bd66a3b..cc24f0f57a 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -382,7 +382,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) DWORD exitcode; { ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); - _tcscpy(tmp2, ptmp); + mir_tstrcpy(tmp2, ptmp); mir_free(ptmp); _tcscat(tmp2, _T("\\")); TCHAR *tmp3 = mir_a2t(get_random(5).c_str()); @@ -977,7 +977,7 @@ static INT_PTR CALLBACK DlgProcKeyPassword(HWND hwndDlg, UINT msg, WPARAM wParam if(password) mir_free(password); password = (TCHAR*)mir_alloc(sizeof(TCHAR)*(mir_tstrlen(tmp)+1)); - _tcscpy(password, tmp); + mir_tstrcpy(password, tmp); } mir_free(tmp); mir_free(inkeyid); diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp index de5178e515..392aceb8f1 100755 --- a/plugins/New_GPG/src/options.cpp +++ b/plugins/New_GPG/src/options.cpp @@ -639,22 +639,22 @@ static INT_PTR CALLBACK DlgProcGpgMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, db_set_ts(NULL, szGPGModuleName, "szInOpenTag", tmp);
mir_free(inopentag);
inopentag = (TCHAR*)mir_alloc(sizeof(TCHAR)* (mir_tstrlen(tmp)+1));
- _tcscpy(inopentag, tmp);
+ mir_tstrcpy(inopentag, tmp);
GetDlgItemText(hwndDlg, IDC_IN_CLOSE_TAG, tmp, SIZEOF(tmp));
db_set_ts(NULL, szGPGModuleName, "szInCloseTag", tmp);
mir_free(inclosetag);
inclosetag = (TCHAR*)mir_alloc(sizeof(TCHAR)* (mir_tstrlen(tmp)+1));
- _tcscpy(inclosetag, tmp);
+ mir_tstrcpy(inclosetag, tmp);
GetDlgItemText(hwndDlg, IDC_OUT_OPEN_TAG, tmp, SIZEOF(tmp));
db_set_ts(NULL, szGPGModuleName, "szOutOpenTag", tmp);
mir_free(outopentag);
outopentag = (TCHAR*)mir_alloc(sizeof(TCHAR)* (mir_tstrlen(tmp)+1));
- _tcscpy(outopentag, tmp);
+ mir_tstrcpy(outopentag, tmp);
GetDlgItemText(hwndDlg, IDC_OUT_CLOSE_TAG, tmp, SIZEOF(tmp));
db_set_ts(NULL, szGPGModuleName, "szOutCloseTag", tmp);
mir_free(outclosetag);
outclosetag = (TCHAR*)mir_alloc(sizeof(TCHAR)*(mir_tstrlen(tmp)+1));
- _tcscpy(outclosetag, tmp);
+ mir_tstrcpy(outclosetag, tmp);
}
return TRUE;
}
@@ -856,16 +856,16 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam if(((ws2 = key_buf.find(_T("-----END PGP PUBLIC KEY BLOCK-----"))) != wstring::npos) && ((ws1 = key_buf.find(_T("-----BEGIN PGP PUBLIC KEY BLOCK-----"))) != wstring::npos))
{
begin = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(_T("-----BEGIN PGP PUBLIC KEY BLOCK-----")) + 1));
- _tcscpy(begin, _T("-----BEGIN PGP PUBLIC KEY BLOCK-----"));
+ mir_tstrcpy(begin, _T("-----BEGIN PGP PUBLIC KEY BLOCK-----"));
end = (TCHAR*)mir_alloc(sizeof( TCHAR) * (mir_tstrlen(_T("-----END PGP PUBLIC KEY BLOCK-----")) + 1));
- _tcscpy(end, _T("-----END PGP PUBLIC KEY BLOCK-----"));
+ mir_tstrcpy(end, _T("-----END PGP PUBLIC KEY BLOCK-----"));
}
else if(((ws2 = key_buf.find(_T("-----END PGP PRIVATE KEY BLOCK-----"))) != wstring::npos) && ((ws1 = key_buf.find(_T("-----BEGIN PGP PRIVATE KEY BLOCK-----"))) != wstring::npos))
{
begin = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(_T("-----BEGIN PGP PRIVATE KEY BLOCK-----")) + 1));
- _tcscpy(begin, _T("-----BEGIN PGP PRIVATE KEY BLOCK-----"));
+ mir_tstrcpy(begin, _T("-----BEGIN PGP PRIVATE KEY BLOCK-----"));
end = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(_T("-----END PGP PRIVATE KEY BLOCK-----")) + 1));
- _tcscpy(end, _T("-----END PGP PRIVATE KEY BLOCK-----"));
+ mir_tstrcpy(end, _T("-----END PGP PRIVATE KEY BLOCK-----"));
}
else
{
@@ -893,7 +893,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam else db_set_ts(hContact, szGPGModuleName, "GPGPubKey", key_buf.substr(ws1,ws2-ws1).c_str());
}
tmp = (TCHAR*)mir_alloc(sizeof( TCHAR) * (key_buf.length()+1));
- _tcscpy(tmp, key_buf.substr(ws1,ws2-ws1).c_str());
+ mir_tstrcpy(tmp, key_buf.substr(ws1,ws2-ws1).c_str());
{ //gpg execute block
std::vector<wstring> cmd;
TCHAR tmp2[MAX_PATH] = {0};
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index c5ca301b30..ab75f3c284 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -63,7 +63,7 @@ void GetFilePath(TCHAR *WindowTittle, char *szSetting, TCHAR *szExt, TCHAR *szEx ofn.lpstrTitle=TranslateW(WindowTittle); _tcsncpy(filter,TranslateW(szExtDesc), SIZEOF(filter)-1); pfilter=filter+mir_tstrlen(filter)+1; - _tcscpy(pfilter, szExt); + mir_tstrcpy(pfilter, szExt); pfilter[mir_tstrlen(pfilter)+1] = '\0'; pfilter[mir_tstrlen(pfilter)+2] = '\0'; ofn.lpstrFilter=filter; @@ -88,13 +88,13 @@ TCHAR *GetFilePath(TCHAR *WindowTittle, TCHAR *szExt, TCHAR *szExtDesc, bool sav ofn.lStructSize=CDSIZEOF_STRUCT(OPENFILENAME,lpTemplateName); ofn.Flags=OFN_EXPLORER; ofn.lpstrTitle=TranslateW(WindowTittle); - _tcscpy(filter,TranslateW(szExtDesc)); + mir_tstrcpy(filter,TranslateW(szExtDesc)); pfilter=filter+mir_tstrlen(filter)+1; - _tcscpy(pfilter, szExt); + mir_tstrcpy(pfilter, szExt); pfilter[mir_tstrlen(pfilter)+1] = '\0'; pfilter[mir_tstrlen(pfilter)+2] = '\0'; ofn.lpstrFilter=filter; - _tcscpy(str, _T("")); + mir_tstrcpy(str, _T("")); if(mir_tstrlen(str)< 2) str[0] = '\0'; ofn.lpstrFile=str; @@ -1135,7 +1135,7 @@ bool isGPGValid() mir_free(mir_path); //mir_realloc(path, (mir_tstrlen(path)+64)*sizeof(TCHAR)); TCHAR *gpg_path = (TCHAR*)mir_alloc(sizeof(TCHAR)*MAX_PATH); - _tcscpy(gpg_path, tmp); + mir_tstrcpy(gpg_path, tmp); _tcscat(gpg_path, _T("\\GnuPG\\gpg.exe")); mir_free(tmp); tmp = NULL; @@ -1143,7 +1143,7 @@ bool isGPGValid() if(boost::filesystem::exists(p) && boost::filesystem::is_regular_file(p)) { gpg_exists = true; - _tcscpy(path, _T("GnuPG\\gpg.exe")); + mir_tstrcpy(path, _T("GnuPG\\gpg.exe")); } mir_free(gpg_path); tmp = mir_tstrdup(path); diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index 39c218361d..9a250b56df 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -185,7 +185,7 @@ static void InitStickyNoteLogFont(STICKYNOTEFONT *pCustomFont, LOGFONT *lf) lf->lfHeight = pCustomFont->size; } - _tcscpy(lf->lfFaceName, pCustomFont->szFace); + mir_tstrcpy(lf->lfFaceName, pCustomFont->szFace); lf->lfWidth = lf->lfEscapement = lf->lfOrientation = 0; lf->lfWeight = pCustomFont->style & DBFONTF_BOLD ? FW_BOLD : FW_NORMAL; @@ -518,7 +518,7 @@ void LoadNotes(BOOL bIsStartup) pCustomFont->size = (char)fsize; pCustomFont->style = (BYTE)fstyle; pCustomFont->charset = (BYTE)fcharset; - _tcscpy(pCustomFont->szFace, TVal2); + mir_tstrcpy(pCustomFont->szFace, TVal2); pCustomFont->hFont = NULL; if ( !CreateStickyNoteFont(pCustomFont, NULL) ) @@ -1559,7 +1559,7 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l SN->pCustomFont->size = (char)lf.lfHeight; SN->pCustomFont->style = (lf.lfWeight >= FW_BOLD ? DBFONTF_BOLD : 0) | (lf.lfItalic ? DBFONTF_ITALIC : 0) | (lf.lfUnderline ? DBFONTF_UNDERLINE : 0) | (lf.lfStrikeOut ? DBFONTF_STRIKEOUT : 0); SN->pCustomFont->charset = lf.lfCharSet; - _tcscpy(SN->pCustomFont->szFace, lf.lfFaceName); + mir_tstrcpy(SN->pCustomFont->szFace, lf.lfFaceName); if ( !CreateStickyNoteFont(SN->pCustomFont, &lf) ) { diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp index a2f366e6d8..20ac2bab12 100644 --- a/plugins/NotesAndReminders/src/options.cpp +++ b/plugins/NotesAndReminders/src/options.cpp @@ -166,7 +166,7 @@ static BYTE MsgDlgGetFontDefaultCharset(const TCHAR* szFont) LOGFONT lf = {0};
int found = 0;
- _tcscpy(lf.lfFaceName, szFont);
+ mir_tstrcpy(lf.lfFaceName, szFont);
lf.lfCharSet = MsgDlgGetCPDefaultCharset();
// check if the font supports specified charset
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index 457b2c8086..07354e9c59 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -982,7 +982,7 @@ extern "C" int __declspec(dllexport) Load() mir_getLP(&pluginInfo);
TCHAR buf[MAX_PATH + 1];
- _tcscpy(buf, _T("."));
+ mir_tstrcpy(buf, _T("."));
g_mirandaDir = _tgetcwd(buf, MAX_PATH);
registerSound(_T("Notice"));
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 6c0323998c..3abb6b5387 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -277,7 +277,7 @@ LBL_SkipEnd: ptrT szReplace;
if (!isRoom && !isTopic && g_Settings.bAddColonToAutoComplete && start == 0) {
szReplace = (TCHAR*)mir_alloc((mir_tstrlen(pszName) + 4) * sizeof(TCHAR));
- _tcscpy(szReplace, pszName);
+ mir_tstrcpy(szReplace, pszName);
_tcscat(szReplace, _T(": "));
pszName = szReplace;
}
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index 3d9002b57c..afd32ada42 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -1624,7 +1624,7 @@ BOOL SaveExportRSAKeyDlg(HWND hParent, LPSTR key, BOOL priv) {
TCHAR szFile[MAX_PATH] = _T("rsa_pub.asc");
if (priv)
- _tcscpy(szFile, _T("rsa_priv.asc"));
+ mir_tstrcpy(szFile, _T("rsa_priv.asc"));
OPENFILENAME ofn = { sizeof(ofn) };
char temp[MAX_PATH];
@@ -1652,7 +1652,7 @@ BOOL LoadImportRSAKeyDlg(HWND hParent, LPSTR key, BOOL priv) {
TCHAR szFile[MAX_PATH] = _T("rsa_pub.asc");
if (priv)
- _tcscpy(szFile, _T("rsa_priv.asc"));
+ mir_tstrcpy(szFile, _T("rsa_priv.asc"));
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index e06fd40f1d..baec75c826 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -233,8 +233,8 @@ void ReportError(const TCHAR* errmsg) static const TCHAR title[] = _T("Miranda SmileyAdd");
POPUPDATAT pd = {0};
- _tcscpy(pd.lpwzContactName, title);
- _tcscpy(pd.lpwzText, errmsg);
+ mir_tstrcpy(pd.lpwzContactName, title);
+ mir_tstrcpy(pd.lpwzText, errmsg);
pd.iSeconds = -1;
if (PUAddPopupT(&pd) == CALLSERVICE_NOTFOUND)
MessageBox(NULL, errmsg, title, MB_OK | MB_ICONWARNING | MB_TOPMOST);
diff --git a/plugins/SmileyAdd/src/options.cpp b/plugins/SmileyAdd/src/options.cpp index f2e0474f86..d6086dd8f2 100644 --- a/plugins/SmileyAdd/src/options.cpp +++ b/plugins/SmileyAdd/src/options.cpp @@ -533,15 +533,15 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item) ofn.hwndOwner = m_hwndDialog;
TCHAR filter[512], *pfilter;
- _tcscpy(filter, TranslateT("Smiley packs"));
+ mir_tstrcpy(filter, TranslateT("Smiley packs"));
mir_tstrcat(filter, _T(" (*.msl;*.asl;*.xep)"));
pfilter = filter + mir_tstrlen(filter) + 1;
- _tcscpy(pfilter, _T("*.msl;*.asl;*.xep"));
+ mir_tstrcpy(pfilter, _T("*.msl;*.asl;*.xep"));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- _tcscpy(pfilter, TranslateT("All files"));
+ mir_tstrcpy(pfilter, TranslateT("All files"));
mir_tstrcat(pfilter, _T(" (*.*)"));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- _tcscpy(pfilter, _T("*.*"));
+ mir_tstrcpy(pfilter, _T("*.*"));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp index 8dc361d002..9e54383800 100644 --- a/plugins/Spamotron/src/utils.cpp +++ b/plugins/Spamotron/src/utils.cpp @@ -223,7 +223,7 @@ TCHAR* get_response(TCHAR* dst, unsigned int dstlen, int num) tmp = _tcstok(src, _T("\r\n")); while (tmp) { if (i == num) { - _tcscpy(dst, tmp); + mir_tstrcpy(dst, tmp); mir_free(src); return dst; } diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index 80f8ce95fd..11fed352c8 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -929,7 +929,7 @@ static int ProcessPopup(int reason, LPARAM lParam) TCHAR protoInfoLine[512], protoInfo[MAX_SECONDLINE]; memset(protoInfoLine, '\0', sizeof(protoInfoLine)); memset(protoInfo, '\0', sizeof(protoInfo)); - _tcscpy(protoInfo, _T("\r\n")); + mir_tstrcpy(protoInfo, _T("\r\n")); for (int i = 0; i < connectionSettings.getCount(); i++) { if (mir_tstrlen(ps[i]->tszAccName) > 0 && mir_strlen(ps[i]->szName) > 0) { if (db_get_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE)) { diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index 4bbe88a28d..3a7421957f 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -194,7 +194,7 @@ TCHAR *GetStatusMessage(int profile, char *szProto) if (!db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db pce[i].msg = ( TCHAR* )realloc(pce[i].msg, sizeof(TCHAR)*(mir_tstrlen(dbv.ptszVal)+1)); if (pce[i].msg != NULL) { - _tcscpy(pce[i].msg, dbv.ptszVal); + mir_tstrcpy(pce[i].msg, dbv.ptszVal); } db_free(&dbv); } diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp index 851e5e42ee..e966ef0c66 100755 --- a/plugins/StopSpamMod/src/utilities.cpp +++ b/plugins/StopSpamMod/src/utilities.cpp @@ -121,7 +121,7 @@ tstring variables_parse(tstring const &tstrFormat, MCONTACT hContact){ // case-insensitive mir_tstrcmp
//by nullbie as i remember...
-#define NEWTSTR_MALLOC(A) (A==NULL) ? NULL : _tcscpy((TCHAR*)mir_alloc(sizeof(TCHAR)*(mir_tstrlen(A)+1)),A)
+#define NEWTSTR_MALLOC(A) (A==NULL) ? NULL : mir_tstrcpy((TCHAR*)mir_alloc(sizeof(TCHAR)*(mir_tstrlen(A)+1)),A)
const int Stricmp(const TCHAR *str, const TCHAR *substr)
{
int i = 0;
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp index cc3664024b..6bb9e78f08 100644 --- a/plugins/TabSRMM/src/chat/tools.cpp +++ b/plugins/TabSRMM/src/chat/tools.cpp @@ -692,7 +692,7 @@ BOOL IsHighlighted(SESSION_INFO *si, GCEVENT *gce) size_t len = mir_tstrlen(gce->ptszNick) + 1;
TCHAR *tmp = (TCHAR*)_alloca(sizeof(TCHAR)*(len + 1));
*tmp = GetIndicator(si, gce->ptszNick, 0);
- _tcscpy(tmp + 1, gce->ptszNick);
+ mir_tstrcpy(tmp + 1, gce->ptszNick);
evTmp.ptszNick = tmp;
}
}
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index c6eb16c2ce..f7ba61b949 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -2708,7 +2708,7 @@ LABEL_SHOWWINDOW: SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_GETTEXTRANGE, 0, (LPARAM)&tr2); if (!_istspace(*tr2.lpstrText)) *tszTmp++ = _T(' '); - _tcscpy(tszTmp, tr.lpstrText); + mir_tstrcpy(tszTmp, tr.lpstrText); } else // in the beginning of the message window mir_sntprintf(tszAppeal, bufSize, tszAplTmpl, tr.lpstrText); diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 0b7eca3e76..9c642a0db2 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1927,7 +1927,7 @@ void TSAPI SendHBitmapAsFile(const TWindowData *dat, HBITMAP hbmp) if (tempdirlen <= 0 || tempdirlen >= MAX_PATH - mir_tstrlen(mirandatempdir) - mir_tstrlen(filenametemplate) - 2) // -2 is because %Y takes 4 symbols
filename[0] = 0; // prompt for a new name
else {
- _tcscpy(filename + tempdirlen, mirandatempdir);
+ mir_tstrcpy(filename + tempdirlen, mirandatempdir);
if ((GetFileAttributes(filename) == INVALID_FILE_ATTRIBUTES || ((GetFileAttributes(filename) & FILE_ATTRIBUTE_DIRECTORY) == 0)) && CreateDirectory(filename, NULL) == 0)
filename[0] = 0;
else {
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index f9cf7e864a..67f7fb0733 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -354,9 +354,9 @@ static TCHAR* Template_MakeRelativeDate(HANDLE hTimeZone, time_t check, TCHAR co const TCHAR *szFormat;
if ((code == (TCHAR)'R' || code == (TCHAR)'r') && check >= today)
- _tcscpy(szResult, szToday);
+ mir_tstrcpy(szResult, szToday);
else if ((code == (TCHAR)'R' || code == (TCHAR)'r') && check > (today - 86400))
- _tcscpy(szResult, szYesterday);
+ mir_tstrcpy(szResult, szYesterday);
else {
if (code == 'D' || code == 'R')
szFormat = _T("D");
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 7d11d89daf..79e8c0ab3f 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -129,7 +129,7 @@ static int TSAPI ScanSkinDir(const TCHAR* tszFolder, HWND hwndCombobox) if ((lr = SendMessage(hwndCombobox, CB_INSERTSTRING, -1, (LPARAM)szBuf)) != CB_ERR) {
TCHAR *idata = (TCHAR*)mir_alloc((mir_tstrlen(tszRel) + 1) * sizeof(TCHAR));
- _tcscpy(idata, tszRel);
+ mir_tstrcpy(idata, tszRel);
SendMessage(hwndCombobox, CB_SETITEMDATA, lr, (LPARAM)idata);
}
}
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index a13c263edd..f8762db894 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -456,7 +456,7 @@ const TCHAR* Utils::DoubleAmpersands(TCHAR *pszText) }
break;
}
- _tcscpy(pszText, text.c_str());
+ mir_tstrcpy(pszText, text.c_str());
return pszText;
}
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index cba55de9bf..405df12768 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -73,7 +73,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (ServiceExists(MS_PROTO_GETACCOUNT)) { PROTOACCOUNT *pa = ProtoGetAccount(pwd->clcit.szProto); if (pa) - _tcscpy(pwd->swzTitle, pa->tszAccountName); + mir_tstrcpy(pwd->swzTitle, pa->tszAccountName); } if (mir_tstrlen(pwd->swzTitle) == 0) @@ -779,7 +779,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa buff[MAX_VALUE_LEN] = 0; _tcscat(buff, _T("...")); } - else _tcscpy(buff, pwd->rows[i].swzValue); + else mir_tstrcpy(buff, pwd->rows[i].swzValue); AppendMenu(hMenu, MF_STRING, i + 1, buff); // first id = 1, because no select have id = 0 SetMenuItemBitmaps(hMenu, i + 1, MF_BYCOMMAND, hbmpItem, hbmpItem); @@ -852,7 +852,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa } } // single row - else _tcscpy(pchData, pwd->rows[iSelItem - 1].swzValue); + else mir_tstrcpy(pchData, pwd->rows[iSelItem - 1].swzValue); GlobalUnlock(hClipboardData); SetClipboardData(CF_UNICODETEXT, hClipboardData); @@ -1499,7 +1499,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa else buff[0] = 0; TCHAR swzProto[256]; - _tcscpy(swzProto, pa->tszAccountName); + mir_tstrcpy(swzProto, pa->tszAccountName); if (dwItems & TRAYTIP_LOCKSTATUS) if (CallService(MS_PROTO_ISACCOUNTLOCKED, 0, (LPARAM)pa->szModuleName)) mir_sntprintf(swzProto, SIZEOF(swzProto), TranslateT("%s (locked)"), pa->tszAccountName); @@ -1634,7 +1634,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa mir_sntprintf(swzName, SIZEOF(swzName), _T("%s (%s)"), swzNick, swzProto); mir_free(swzProto); } - else _tcscpy(swzName, swzNick); + else mir_tstrcpy(swzName, swzNick); AddRow(pwd, swzName, swzStatus, NULL, false, false, false); } @@ -1667,7 +1667,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (!pchBold || pchBold != pwd->clcit.swzText) { TCHAR swzText[256]; - _tcscpy(swzText, pwd->clcit.swzText); + mir_tstrcpy(swzText, pwd->clcit.swzText); if (pchBr) swzText[pchBr - pwd->clcit.swzText] = 0; AddRow(pwd, swzText, _T(""), NULL, false, true, false, true, LoadSkinnedIcon(SKINICON_OTHER_FILLEDBLOB)); } diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp index 5391e74001..d4335c6cfb 100644 --- a/plugins/TipperYM/src/skin_parser.cpp +++ b/plugins/TipperYM/src/skin_parser.cpp @@ -90,7 +90,7 @@ void ParseAboutPart(FILE *fp, TCHAR *buff, TCHAR *szSkinName) TCHAR szImgPath[1024];
mir_sntprintf(szImgPath, SIZEOF(szImgPath), _T("%s\\%s\\%s"), SKIN_FOLDER, szSkinName, pch);
if (FileExists(szImgPath))
- _tcscpy(opt.szPreviewFile, szImgPath);
+ mir_tstrcpy(opt.szPreviewFile, szImgPath);
}
}
}
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index b196ee3ea1..4c832427aa 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -125,8 +125,8 @@ int ReloadSkinFolder(WPARAM wParam, LPARAM lParam) void InitFonts()
{
colourBg.cbSize = sizeof(ColourIDT);
- _tcscpy(colourBg.group, LPGENT("Tooltips"));
- _tcscpy(colourBg.name, LPGENT("Background"));
+ mir_tstrcpy(colourBg.group, LPGENT("Tooltips"));
+ mir_tstrcpy(colourBg.name, LPGENT("Background"));
mir_strcpy(colourBg.dbSettingsGroup, MODULE);
mir_strcpy(colourBg.setting, "ColourBg");
colourBg.defcolour = RGB(219, 219, 219);
@@ -134,8 +134,8 @@ void InitFonts() ColourRegisterT(&colourBg);
colourBorder.cbSize = sizeof(ColourIDT);
- _tcscpy(colourBorder.group, LPGENT("Tooltips"));
- _tcscpy(colourBorder.name, LPGENT("Border"));
+ mir_tstrcpy(colourBorder.group, LPGENT("Tooltips"));
+ mir_tstrcpy(colourBorder.name, LPGENT("Border"));
mir_strcpy(colourBorder.dbSettingsGroup, MODULE);
mir_strcpy(colourBorder.setting, "BorderCol");
colourBorder.defcolour = 0;
@@ -143,8 +143,8 @@ void InitFonts() ColourRegisterT(&colourBorder);
colourAvatarBorder.cbSize = sizeof(ColourIDT);
- _tcscpy(colourAvatarBorder.group, LPGENT("Tooltips"));
- _tcscpy(colourAvatarBorder.name, LPGENT("Avatar border"));
+ mir_tstrcpy(colourAvatarBorder.group, LPGENT("Tooltips"));
+ mir_tstrcpy(colourAvatarBorder.name, LPGENT("Avatar border"));
mir_strcpy(colourAvatarBorder.dbSettingsGroup, MODULE);
mir_strcpy(colourAvatarBorder.setting, "AvBorderCol");
colourAvatarBorder.defcolour = 0;
@@ -152,8 +152,8 @@ void InitFonts() ColourRegisterT(&colourAvatarBorder);
colourDivider.cbSize = sizeof(ColourIDT);
- _tcscpy(colourDivider.group, LPGENT("Tooltips"));
- _tcscpy(colourDivider.name, LPGENT("Dividers"));
+ mir_tstrcpy(colourDivider.group, LPGENT("Tooltips"));
+ mir_tstrcpy(colourDivider.name, LPGENT("Dividers"));
mir_strcpy(colourDivider.dbSettingsGroup, MODULE);
mir_strcpy(colourDivider.setting, "DividerCol");
colourDivider.defcolour = 0;
@@ -161,8 +161,8 @@ void InitFonts() ColourRegisterT(&colourDivider);
colourSidebar.cbSize = sizeof(ColourIDT);
- _tcscpy(colourSidebar.group, LPGENT("Tooltips"));
- _tcscpy(colourSidebar.name, LPGENT("Sidebar"));
+ mir_tstrcpy(colourSidebar.group, LPGENT("Tooltips"));
+ mir_tstrcpy(colourSidebar.name, LPGENT("Sidebar"));
mir_strcpy(colourSidebar.dbSettingsGroup, MODULE);
mir_strcpy(colourSidebar.setting, "SidebarCol");
colourSidebar.defcolour = RGB(192, 192, 192);
@@ -171,12 +171,12 @@ void InitFonts() fontTitle.cbSize = sizeof(FontIDT);
fontTitle.flags = FIDF_ALLOWEFFECTS;
- _tcscpy(fontTitle.group, LPGENT("Tooltips"));
- _tcscpy(fontTitle.name, LPGENT("Title"));
+ mir_tstrcpy(fontTitle.group, LPGENT("Tooltips"));
+ mir_tstrcpy(fontTitle.name, LPGENT("Title"));
mir_strcpy(fontTitle.dbSettingsGroup, MODULE);
mir_strcpy(fontTitle.prefix, "FontFirst");
- _tcscpy(fontTitle.backgroundGroup, LPGENT("Tooltips"));
- _tcscpy(fontTitle.backgroundName, LPGENT("Background"));
+ mir_tstrcpy(fontTitle.backgroundGroup, LPGENT("Tooltips"));
+ mir_tstrcpy(fontTitle.backgroundName, LPGENT("Background"));
fontTitle.order = 0;
fontTitle.deffontsettings.charset = DEFAULT_CHARSET;
@@ -187,12 +187,12 @@ void InitFonts() fontLabels.cbSize = sizeof(FontIDT);
fontLabels.flags = FIDF_ALLOWEFFECTS;
- _tcscpy(fontLabels.group, LPGENT("Tooltips"));
- _tcscpy(fontLabels.name, LPGENT("Labels"));
+ mir_tstrcpy(fontLabels.group, LPGENT("Tooltips"));
+ mir_tstrcpy(fontLabels.name, LPGENT("Labels"));
mir_strcpy(fontLabels.dbSettingsGroup, MODULE);
mir_strcpy(fontLabels.prefix, "FontLabels");
- _tcscpy(fontLabels.backgroundGroup, LPGENT("Tooltips"));
- _tcscpy(fontLabels.backgroundName, LPGENT("Background"));
+ mir_tstrcpy(fontLabels.backgroundGroup, LPGENT("Tooltips"));
+ mir_tstrcpy(fontLabels.backgroundName, LPGENT("Background"));
fontLabels.order = 1;
fontLabels.deffontsettings.charset = DEFAULT_CHARSET;
@@ -203,12 +203,12 @@ void InitFonts() fontValues.cbSize = sizeof(FontIDT);
fontValues.flags = FIDF_ALLOWEFFECTS;
- _tcscpy(fontValues.group, LPGENT("Tooltips"));
- _tcscpy(fontValues.name, LPGENT("Values"));
+ mir_tstrcpy(fontValues.group, LPGENT("Tooltips"));
+ mir_tstrcpy(fontValues.name, LPGENT("Values"));
mir_strcpy(fontValues.dbSettingsGroup, MODULE);
mir_strcpy(fontValues.prefix, "FontValues");
- _tcscpy(fontValues.backgroundGroup, LPGENT("Tooltips"));
- _tcscpy(fontValues.backgroundName, LPGENT("Background"));
+ mir_tstrcpy(fontValues.backgroundGroup, LPGENT("Tooltips"));
+ mir_tstrcpy(fontValues.backgroundName, LPGENT("Background"));
fontValues.order = 2;
fontValues.deffontsettings.charset = DEFAULT_CHARSET;
@@ -219,12 +219,12 @@ void InitFonts() fontTrayTitle.cbSize = sizeof(FontIDT);
fontTrayTitle.flags = FIDF_ALLOWEFFECTS;
- _tcscpy(fontTrayTitle.group, LPGENT("Tooltips"));
- _tcscpy(fontTrayTitle.name, LPGENT("Tray title"));
+ mir_tstrcpy(fontTrayTitle.group, LPGENT("Tooltips"));
+ mir_tstrcpy(fontTrayTitle.name, LPGENT("Tray title"));
mir_strcpy(fontTrayTitle.dbSettingsGroup, MODULE);
mir_strcpy(fontTrayTitle.prefix, "FontTrayTitle");
- _tcscpy(fontTrayTitle.backgroundGroup, LPGENT("Tooltips"));
- _tcscpy(fontTrayTitle.backgroundName, LPGENT("Background"));
+ mir_tstrcpy(fontTrayTitle.backgroundGroup, LPGENT("Tooltips"));
+ mir_tstrcpy(fontTrayTitle.backgroundName, LPGENT("Background"));
fontTrayTitle.order = 0;
fontTrayTitle.deffontsettings.charset = DEFAULT_CHARSET;
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index 6ef7e692e2..22caa0e3c2 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -220,7 +220,7 @@ int TrafficCounterModulesLoaded(WPARAM wParam, LPARAM lParam) }
else //defaults here
{
- _tcscpy(Traffic_CounterFormat, _T("{I4}\x0D\x0A\x0A\
+ mir_tstrcpy(Traffic_CounterFormat, _T("{I4}\x0D\x0A\x0A\
{R65}?tc_GetTraffic(%extratext%,now,sent,d)\x0D\x0A\x0A\
{R115}?tc_GetTraffic(%extratext%,now,received,d)\x0D\x0A\x0A\
{R165}?tc_GetTraffic(%extratext%,total,both,d)\x0D\x0A\x0A\
@@ -238,7 +238,7 @@ int TrafficCounterModulesLoaded(WPARAM wParam, LPARAM lParam) }
else //defaults here
{
- _tcscpy(Traffic_TooltipFormat, _T("Traffic Counter"));
+ mir_tstrcpy(Traffic_TooltipFormat, _T("Traffic Counter"));
}
Traffic_AdditionSpace = db_get_b(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_ADDITION_SPACE, 0);
@@ -248,8 +248,8 @@ int TrafficCounterModulesLoaded(WPARAM wParam, LPARAM lParam) //register traffic font
TrafficFontID.cbSize = sizeof(FontIDT);
- _tcscpy(TrafficFontID.group, LPGENT("Traffic counter"));
- _tcscpy(TrafficFontID.name, LPGENT("Font"));
+ mir_tstrcpy(TrafficFontID.group, LPGENT("Traffic counter"));
+ mir_tstrcpy(TrafficFontID.name, LPGENT("Font"));
mir_strcpy(TrafficFontID.dbSettingsGroup, TRAFFIC_SETTINGS_GROUP);
mir_strcpy(TrafficFontID.prefix, "Font");
TrafficFontID.flags = FIDF_DEFAULTVALID | FIDF_SAVEPOINTSIZE;
@@ -257,14 +257,14 @@ int TrafficCounterModulesLoaded(WPARAM wParam, LPARAM lParam) TrafficFontID.deffontsettings.colour = GetSysColor(COLOR_BTNTEXT);
TrafficFontID.deffontsettings.size = 12;
TrafficFontID.deffontsettings.style = 0;
- _tcscpy(TrafficFontID.deffontsettings.szFace, _T("Arial"));
+ mir_tstrcpy(TrafficFontID.deffontsettings.szFace, _T("Arial"));
TrafficFontID.order = 0;
FontRegisterT(&TrafficFontID);
// Регистрируем цвет фона
TrafficBackgroundColorID.cbSize = sizeof(ColourIDT);
- _tcscpy(TrafficBackgroundColorID.group, LPGENT("Traffic counter"));
- _tcscpy(TrafficBackgroundColorID.name, LPGENT("Font"));
+ mir_tstrcpy(TrafficBackgroundColorID.group, LPGENT("Traffic counter"));
+ mir_tstrcpy(TrafficBackgroundColorID.name, LPGENT("Font"));
mir_strcpy(TrafficBackgroundColorID.dbSettingsGroup, TRAFFIC_SETTINGS_GROUP);
mir_strcpy(TrafficBackgroundColorID.setting, "FontBkColor");
TrafficBackgroundColorID.defcolour = GetSysColor(COLOR_BTNFACE);
@@ -1181,7 +1181,7 @@ void CreateProtocolList(void) ProtoList[i].name = (char*)mir_alloc(mir_strlen(acc[i]->szModuleName) + 1);
mir_strcpy(ProtoList[i].name, acc[i]->szModuleName);
ProtoList[i].tszAccountName = (TCHAR*)mir_alloc(sizeof(TCHAR) * (1 + mir_tstrlen(acc[i]->tszAccountName)));
- _tcscpy(ProtoList[i].tszAccountName, acc[i]->tszAccountName);
+ mir_tstrcpy(ProtoList[i].tszAccountName, acc[i]->tszAccountName);
//
ProtoList[i].Flags = db_get_b(NULL, ProtoList[i].name, SETTINGS_PROTO_FLAGS, 3);
ProtoList[i].CurrentRecvTraffic =
diff --git a/plugins/TrafficCounter/src/misc.cpp b/plugins/TrafficCounter/src/misc.cpp index 1217d1568a..f1f6c8d055 100644 --- a/plugins/TrafficCounter/src/misc.cpp +++ b/plugins/TrafficCounter/src/misc.cpp @@ -164,7 +164,7 @@ size_t GetFormattedTraffic(DWORD Value, BYTE Unit, TCHAR *Buffer, size_t Size) if (Size && Buffer)
{
- _tcscpy(Buffer, Res);
+ mir_tstrcpy(Buffer, Res);
l = mir_tstrlen(Buffer);
}
else
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp index 658b4e9238..91de3fec58 100644 --- a/plugins/UserGuide/src/main.cpp +++ b/plugins/UserGuide/src/main.cpp @@ -28,22 +28,22 @@ static INT_PTR ShowGuideFile(WPARAM, LPARAM) if (ptszHelpFile==0)
{
- _tcscpy(pszDirName, _T("%miranda_path%\\Plugins"));
- _tcscpy(pszFileName, _T("UserGuide.chm"));
+ mir_tstrcpy(pszDirName, _T("%miranda_path%\\Plugins"));
+ mir_tstrcpy(pszFileName, _T("UserGuide.chm"));
}
else
{
if(!mir_tstrcmp(ptszHelpFile, _T("")))
{
- _tcscpy(pszDirName, _T("%miranda_path%\\Plugins"));
- _tcscpy(pszFileName, _T("UserGuide.chm"));
+ mir_tstrcpy(pszDirName, _T("%miranda_path%\\Plugins"));
+ mir_tstrcpy(pszFileName, _T("UserGuide.chm"));
}
else
{
LPTSTR pszDivider = _tcsrchr(ptszHelpFile, '\\');
if (pszDivider == NULL)
{
- _tcscpy(pszDirName, _T(""));
+ mir_tstrcpy(pszDirName, _T(""));
_tcsncpy(pszFileName, ptszHelpFile, mir_tstrlen(ptszHelpFile));
}
else
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 495a1ec069..1c8e27499f 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -151,7 +151,7 @@ public: TCHAR buf[MAXDATASIZE];
va_list vl;
- _tcscpy(fmt, szText);
+ mir_tstrcpy(fmt, szText);
// delete bbcodes
if (!_bBBCode)
@@ -434,7 +434,7 @@ public: _szText = mir_tstrdup(szTitle);
mir_tstrcpy(pd.lptzContactName, _szText);
- _tcscpy(pd.lptzText, _T(" "));
+ mir_tstrcpy(pd.lptzText, _T(" "));
_pFnCallBack = pFnCallBack;
_hWnd = (HWND) CallService(MS_POPUP_ADDPOPUPT, (WPARAM) &pd, APF_RETURN_HWND|APF_NEWDATA);
diff --git a/plugins/Variables/src/parse_external.cpp b/plugins/Variables/src/parse_external.cpp index 4aec50a9ee..c3c857c46d 100644 --- a/plugins/Variables/src/parse_external.cpp +++ b/plugins/Variables/src/parse_external.cpp @@ -42,8 +42,8 @@ static TCHAR *getFullWinampTitleText() mir_free(szWinText);
return NULL;
}
- _tcscpy(szTitle, szWinText);
- _tcscpy(szTitle + mir_tstrlen(szTitle), szWinText);
+ mir_tstrcpy(szTitle, szWinText);
+ mir_tstrcpy(szTitle + mir_tstrlen(szTitle), szWinText);
mir_free(szWinText);
return szTitle;
diff --git a/plugins/Variables/src/parse_math.cpp b/plugins/Variables/src/parse_math.cpp index 2581828c28..883216bc49 100644 --- a/plugins/Variables/src/parse_math.cpp +++ b/plugins/Variables/src/parse_math.cpp @@ -61,7 +61,7 @@ static TCHAR *parseHex(ARGUMENTSINFO *ai) return NULL;
memset(res, 0, ((zeros + mir_tstrlen(szVal) + 3) * sizeof(TCHAR)));
- _tcscpy(res, _T("0x"));
+ mir_tstrcpy(res, _T("0x"));
for (i = 0; i < zeros; i++)
*(res + 2 + i) = '0';
diff --git a/plugins/Variables/src/parse_str.cpp b/plugins/Variables/src/parse_str.cpp index d7e797c830..949051cdda 100644 --- a/plugins/Variables/src/parse_str.cpp +++ b/plugins/Variables/src/parse_str.cpp @@ -170,8 +170,8 @@ static TCHAR *parseInsert(ARGUMENTSINFO *ai) memset(res, 0, ((mir_tstrlen(ai->targv[1]) + mir_tstrlen(ai->targv[2]) + 1) * sizeof(TCHAR)));
_tcsncpy(res, ai->targv[1], pos);
- _tcscpy(res + pos, ai->targv[2]);
- _tcscpy(res + pos + mir_tstrlen(ai->targv[2]), ai->targv[1] + pos);
+ mir_tstrcpy(res + pos, ai->targv[2]);
+ mir_tstrcpy(res + pos + mir_tstrlen(ai->targv[2]), ai->targv[1] + pos);
return res;
}
@@ -302,7 +302,7 @@ static TCHAR *parsePadright(ARGUMENTSINFO *ai) return NULL;
memset(res, 0, ((addcount + mir_tstrlen(ai->targv[1]) + 1) * sizeof(TCHAR)));
- _tcscpy(res, ai->targv[1]);
+ mir_tstrcpy(res, ai->targv[1]);
TCHAR *cur = res + mir_tstrlen(ai->targv[1]);
for (unsigned int i = 0; i < addcount; i++)
*cur++ = padchar;
@@ -459,7 +459,7 @@ static TCHAR *parseScroll(ARGUMENTSINFO *ai) return NULL;
memset(res, 0, ((2 * mir_tstrlen(ai->targv[1]) + 1) * sizeof(TCHAR)));
- _tcscpy(res, ai->targv[1]);
+ mir_tstrcpy(res, ai->targv[1]);
_tcscat(res, ai->targv[1]);
memmove(res, res + move, (mir_tstrlen(res + move) + 1)*sizeof(TCHAR));
*(res + display) = 0;
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp index 1298f73464..5446a8e2f0 100644 --- a/plugins/Variables/src/parse_system.cpp +++ b/plugins/Variables/src/parse_system.cpp @@ -400,7 +400,7 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai) }
if (((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && (bDirs)) || ((!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) && (bFiles))) {
tszRes = (TCHAR*)mir_alloc((mir_tstrlen(ffd.cFileName) + mir_tstrlen(tszSeperator) + 1)*sizeof(TCHAR));
- _tcscpy(tszRes, ffd.cFileName);
+ mir_tstrcpy(tszRes, ffd.cFileName);
}
while (FindNextFile(hFind, &ffd) != 0) {
if (((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && (bDirs)) || ((!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) && (bFiles))) {
@@ -410,7 +410,7 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai) }
else {
tszRes = (TCHAR*)mir_alloc((mir_tstrlen(ffd.cFileName) + mir_tstrlen(tszSeperator) + 1)*sizeof(TCHAR));
- _tcscpy(tszRes, _T(""));
+ mir_tstrcpy(tszRes, _T(""));
}
_tcscat(tszRes, ffd.cFileName);
}
@@ -861,7 +861,7 @@ static TCHAR *parseClipboard(ARGUMENTSINFO *ai) TCHAR *tszText = (TCHAR*)GlobalLock(hData);
size_t len = mir_tstrlen(tszText);
res = (TCHAR*)mir_alloc((len + 1) * sizeof(TCHAR));
- _tcscpy(res, tszText);
+ mir_tstrcpy(res, tszText);
res[len] = 0;
GlobalUnlock(hData);
}
diff --git a/plugins/Watrack_MPD/src/options.cpp b/plugins/Watrack_MPD/src/options.cpp index 3b59f516f6..5cc11880e4 100755 --- a/plugins/Watrack_MPD/src/options.cpp +++ b/plugins/Watrack_MPD/src/options.cpp @@ -52,10 +52,10 @@ static INT_PTR CALLBACK DlgProcWaMpdOpts(HWND hwndDlg, UINT msg, WPARAM wParam, gbPort = (WORD)GetDlgItemInt(hwndDlg, IDC_PORT, NULL, FALSE); GetDlgItemText(hwndDlg, IDC_SERVER, szText, SIZEOF(szText)); db_set_ts(NULL, szModuleName, "Server", szText); - _tcscpy(gbHost, szText); + mir_tstrcpy(gbHost, szText); GetDlgItemText(hwndDlg, IDC_PASSWORD, szText, SIZEOF(szText)); db_set_ts(NULL, szModuleName, "Password", szText); - _tcscpy(gbPassword, szText); + mir_tstrcpy(gbPassword, szText); return TRUE; } } diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp index a00ce32d04..669a9bf560 100644 --- a/plugins/Weather/src/weather_contacts.cpp +++ b/plugins/Weather/src/weather_contacts.cpp @@ -363,7 +363,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa GetDlgItemText(hwndDlg, IDC_ID, str, SIZEOF(str));
db_set_ts(hContact, WEATHERPROTONAME, "ID", str);
if ((BYTE)IsDlgButtonChecked(hwndDlg, IDC_DEFA)) { // if default station is set
- _tcscpy(opt.Default, str);
+ mir_tstrcpy(opt.Default, str);
opt.DefStn = hContact;
db_set_ts(NULL, WEATHERPROTONAME, "Default", opt.Default);
}
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index 7d73d76fed..001e0a1396 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -88,11 +88,11 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str) // quit if the value obtained is N/A or not a number
if ( !mir_tstrcmp(tempchar, NODATA) || !mir_tstrcmp(tempchar, _T("N/A"))) {
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
return;
}
if ( !is_number(tempchar)) {
- _tcscpy(str, NODATA);
+ mir_tstrcpy(str, NODATA);
return;
}
@@ -138,7 +138,7 @@ void GetPressure(TCHAR *tempchar, TCHAR *unit, TCHAR* str) // if it end up with 0, then it's not a number, return the original string and quit
output = _ttof(tempchar);
if (output == 0) {
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
return;
}
@@ -175,7 +175,7 @@ void GetPressure(TCHAR *tempchar, TCHAR *unit, TCHAR* str) mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit/10, intunit%10, opt.DoNotAppendUnit ? _T("") : TranslateT("mm"));
break;
default:
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
break;
}
@@ -244,7 +244,7 @@ void GetDist(TCHAR *tempchar, TCHAR *unit, TCHAR *str) // if it end up with 0, then it's not a number, return the original string and quit
output = _ttof(tempchar);
if (output == 0) {
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
return;
}
@@ -265,7 +265,7 @@ void GetDist(TCHAR *tempchar, TCHAR *unit, TCHAR *str) mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit/10, intunit%10, opt.DoNotAppendUnit ? _T("") : TranslateT("miles"));
break;
default:
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
break;
}
}
@@ -284,7 +284,7 @@ void GetElev(TCHAR *tempchar, TCHAR *unit, TCHAR *str) // if it end up with 0, then it's not a number, return the original string and quit
output = _ttof(tempchar);
if (output == 0) {
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
return;
}
@@ -305,7 +305,7 @@ void GetElev(TCHAR *tempchar, TCHAR *unit, TCHAR *str) mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit/10, intunit%10, opt.DoNotAppendUnit ? _T("") : TranslateT("m"));
break;
default:
- _tcscpy(str, tempchar);
+ mir_tstrcpy(str, tempchar);
break;
}
}
@@ -594,7 +594,7 @@ void GetSvc(TCHAR *pszID) void GetID(TCHAR *pszID)
{
TCHAR *chop = _tcsstr(pszID, _T("/"));
- if (chop != NULL) _tcscpy(pszID, chop+1);
+ if (chop != NULL) mir_tstrcpy(pszID, chop+1);
else pszID[0] = 0;
}
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp index 76f0bb70af..dd01691fc3 100644 --- a/plugins/Weather/src/weather_data.cpp +++ b/plugins/Weather/src/weather_data.cpp @@ -204,7 +204,7 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) !mir_tstrcmpi(UpdateData->Unit, _T("K")))
{
GetTemp(Data, UpdateData->Unit, str);
- _tcscpy(Data, str);
+ mir_tstrcpy(Data, str);
}
// pressure
else if ( !mir_tstrcmp(UpdateData->Name, _T("Pressure")) || !mir_tstrcmpi(UpdateData->Unit, _T("HPA")) ||
@@ -213,7 +213,7 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) !mir_tstrcmpi(UpdateData->Unit, _T("MM")))
{
GetPressure(Data, UpdateData->Unit, str);
- _tcscpy(Data, str);
+ mir_tstrcpy(Data, str);
}
// speed
else if ( !mir_tstrcmp(UpdateData->Name, _T("Wind Speed")) || !mir_tstrcmpi(UpdateData->Unit, _T("KM/H")) ||
@@ -221,21 +221,21 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) !mir_tstrcmpi(UpdateData->Unit, _T("KNOTS")))
{
GetSpeed(Data, UpdateData->Unit, str);
- _tcscpy(Data, str);
+ mir_tstrcpy(Data, str);
}
// visibility
else if ( !mir_tstrcmp(UpdateData->Name, _T("Visibility")) || !mir_tstrcmpi(UpdateData->Unit, _T("KM")) ||
!mir_tstrcmpi(UpdateData->Unit, _T("MILES")))
{
GetDist(Data, UpdateData->Unit, str);
- _tcscpy(Data, str);
+ mir_tstrcpy(Data, str);
}
// elevation
else if ( !mir_tstrcmp(UpdateData->Name, _T("Elevation")) || !mir_tstrcmpi(UpdateData->Unit, _T("FT")) ||
!mir_tstrcmpi(UpdateData->Unit, _T("M")))
{
GetElev(Data, UpdateData->Unit, str);
- _tcscpy(Data, str);
+ mir_tstrcpy(Data, str);
}
// converting case for condition to the upper+lower format
else if ( !mir_tstrcmpi(UpdateData->Unit, _T("COND")))
diff --git a/plugins/Weather/src/weather_http.cpp b/plugins/Weather/src/weather_http.cpp index c59ee3bdfc..add11a1e1c 100644 --- a/plugins/Weather/src/weather_http.cpp +++ b/plugins/Weather/src/weather_http.cpp @@ -83,7 +83,7 @@ int InternetDownloadFile (char *szUrl, char *cookie, char *userAgent, TCHAR **sz // if the data does not downloaded successfully (ie. disconnected), then return 1000 as error code
*szData = (TCHAR*)mir_alloc(512);
// store the error code in szData
- _tcscpy(*szData, _T("NetLib error occurred!!"));
+ mir_tstrcpy(*szData, _T("NetLib error occurred!!"));
hNetlibHttp = NULL;
return NLHRF_REDIRECT;
}
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp index 812ec987f3..41eb87c70d 100644 --- a/plugins/Weather/src/weather_ini.cpp +++ b/plugins/Weather/src/weather_ini.cpp @@ -96,7 +96,7 @@ void ResetDataItem(WIDATAITEM *Item, const TCHAR *name) {
TCHAR str[] = _T("ID Search - Station Name");
Item->Name = ( TCHAR* )mir_alloc( sizeof(str));
- _tcscpy(Item->Name, str);
+ mir_tstrcpy(Item->Name, str);
Item->Start = _T("");
Item->End = _T("");
Item->Unit = _T("");
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index 5e6573461f..485abfeefe 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -167,11 +167,11 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara {
FontIDT fntid = {0};
- _tcscpy(fntid.group, _T(WEATHERPROTONAME));
- _tcscpy(fntid.name, LPGENT("Frame Font"));
+ mir_tstrcpy(fntid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fntid.name, LPGENT("Frame Font"));
fntc = CallService(MS_FONT_GETT, (WPARAM)&fntid, (LPARAM)&lfnt);
- _tcscpy(fntid.name, LPGENT("Frame Title Font"));
+ mir_tstrcpy(fntid.name, LPGENT("Frame Title Font"));
fntc1 = CallService(MS_FONT_GETT, (WPARAM)&fntid, (LPARAM)&lfnt1);
}
@@ -344,8 +344,8 @@ void InitMwin(void) colourid.cbSize = sizeof(ColourIDT);
mir_strcpy(colourid.dbSettingsGroup, WEATHERPROTONAME);
mir_strcpy(colourid.setting, "ColorMwinFrame");
- _tcscpy(colourid.name, LPGENT("Frame Background"));
- _tcscpy(colourid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(colourid.name, LPGENT("Frame Background"));
+ mir_tstrcpy(colourid.group, _T(WEATHERPROTONAME));
colourid.defcolour = GetSysColor(COLOR_3DFACE);
ColourRegisterT(&colourid);
@@ -353,8 +353,8 @@ void InitMwin(void) fontid.cbSize = sizeof(FontIDT);
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID;
mir_strcpy(fontid.dbSettingsGroup, WEATHERPROTONAME);
- _tcscpy(fontid.group, _T(WEATHERPROTONAME));
- _tcscpy(fontid.name, LPGENT("Frame Font"));
+ mir_tstrcpy(fontid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fontid.name, LPGENT("Frame Font"));
mir_strcpy(fontid.prefix, "fnt0");
HDC hdc = GetDC(NULL);
@@ -362,13 +362,13 @@ void InitMwin(void) ReleaseDC(0, hdc);
fontid.deffontsettings.charset = DEFAULT_CHARSET;
- _tcscpy(fontid.deffontsettings.szFace, _T("Verdana"));
- _tcscpy(fontid.backgroundGroup, _T(WEATHERPROTONAME));
- _tcscpy(fontid.backgroundName, LPGENT("Frame Background"));
+ mir_tstrcpy(fontid.deffontsettings.szFace, _T("Verdana"));
+ mir_tstrcpy(fontid.backgroundGroup, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fontid.backgroundName, LPGENT("Frame Background"));
FontRegisterT(&fontid);
fontid.deffontsettings.style = DBFONTF_BOLD;
- _tcscpy(fontid.name, LPGENT("Frame Title Font"));
+ mir_tstrcpy(fontid.name, LPGENT("Frame Title Font"));
mir_strcpy(fontid.prefix, "fnt1");
FontRegisterT(&fontid);
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp index 050f0e01c4..b7ca1555cd 100644 --- a/plugins/Weather/src/weather_popup.cpp +++ b/plugins/Weather/src/weather_popup.cpp @@ -95,8 +95,8 @@ int WeatherError(WPARAM wParam, LPARAM lParam) // setup the popup
ppd.lchIcon = (HICON)LoadImage(NULL, MAKEINTRESOURCE(OIC_BANG), IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
- _tcscpy(ppd.lptzContactName, str1);
- _tcscpy(ppd.lptzText, str2);
+ mir_tstrcpy(ppd.lptzContactName, str1);
+ mir_tstrcpy(ppd.lptzText, str2);
ppd.colorBack = (opt.UseWinColors)?GetSysColor(COLOR_BTNFACE):opt.BGColour;
ppd.colorText = (opt.UseWinColors)?GetSysColor(COLOR_WINDOWTEXT):opt.TextColour;
ppd.iSeconds = opt.pDelay;
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index ffa4818c19..8baf32ee74 100644 --- a/plugins/Weather/src/weather_update.cpp +++ b/plugins/Weather/src/weather_update.cpp @@ -78,7 +78,7 @@ int UpdateWeather(MCONTACT hContact) WEATHERINFO winfo = LoadWeatherInfo(hContact);
// translate weather condition
- _tcscpy(winfo.cond, TranslateTS(winfo.cond));
+ mir_tstrcpy(winfo.cond, TranslateTS(winfo.cond));
// compare the old condition and determine if the weather had changed
if (opt.UpdateOnlyConditionChanged) { // consider condition change
diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp index 5822d7dfaf..c2d73b811e 100644 --- a/plugins/WebView/src/webview_opts.cpp +++ b/plugins/WebView/src/webview_opts.cpp @@ -217,9 +217,9 @@ INT_PTR CALLBACK DlgPopUpOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) TextColour = TextClr;
}
ppd.lchContact = NULL;
- _tcscpy(ppd.lptzContactName, _T(MODULENAME));
+ mir_tstrcpy(ppd.lptzContactName, _T(MODULENAME));
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
- _tcscpy(ppd.lptzText, TranslateT("This is a preview popup."));
+ mir_tstrcpy(ppd.lptzText, TranslateT("This is a preview popup."));
ppd.colorBack = BGColour;
ppd.colorText = TextColour;
ppd.PluginWindowProc = NULL;
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index caa6b711c2..2200ffddcd 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -327,11 +327,11 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara if (pos) {
TCHAR tmp[128];
*pos = 0;
- _tcscpy(tmp, buffer);
+ mir_tstrcpy(tmp, buffer);
strtrim(tmp);
commonData.popupTimeout = _ttol(tmp);
- _tcscpy(tmp, pos + 1);
+ mir_tstrcpy(tmp, pos + 1);
strtrim(tmp);
commonData.popupTimeoutToday = _ttol(tmp);
diff --git a/plugins/WhoUsesMyFiles/src/list.cpp b/plugins/WhoUsesMyFiles/src/list.cpp index 641f8f5e19..48d4bf80e7 100644 --- a/plugins/WhoUsesMyFiles/src/list.cpp +++ b/plugins/WhoUsesMyFiles/src/list.cpp @@ -19,10 +19,10 @@ PWumf new_wumf( DWORD dwID, w->szUNC = mir_tstrdup(szUNC);
switch(dwPerm) {
- case PERM_FILE_READ: _tcscpy(w->szPerm, _T("Read"));break;
- case PERM_FILE_WRITE: _tcscpy(w->szPerm, _T("Write"));break;
- case PERM_FILE_CREATE: _tcscpy(w->szPerm, _T("Create"));break;
- default: _tcscpy(w->szPerm, _T("Execute"));
+ case PERM_FILE_READ: mir_tstrcpy(w->szPerm, _T("Read"));break;
+ case PERM_FILE_WRITE: mir_tstrcpy(w->szPerm, _T("Write"));break;
+ case PERM_FILE_CREATE: mir_tstrcpy(w->szPerm, _T("Create"));break;
+ default: mir_tstrcpy(w->szPerm, _T("Execute"));
}
mir_sntprintf(w->szID, SIZEOF(w->szID), _T("%i"), dwID);
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index 5a5c6dc1e5..00a777b36b 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -32,11 +32,11 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP break;
case DBVT_ASCIIZ:
- _tcscpy(uid, _A2T(dbvuid.pszVal));
+ mir_tstrcpy(uid, _A2T(dbvuid.pszVal));
break;
case DBVT_UTF8:
- _tcscpy(uid, ptrT(mir_utf8decodeT(dbvuid.pszVal)));
+ mir_tstrcpy(uid, ptrT(mir_utf8decodeT(dbvuid.pszVal)));
break;
}
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp index 7e3a5ba68a..d85991de2e 100644 --- a/plugins/XSoundNotify/src/options.cpp +++ b/plugins/XSoundNotify/src/options.cpp @@ -66,15 +66,15 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l break;
case DBVT_ASCIIZ:
- _tcscpy(uid, _A2T(dbvuid.pszVal));
+ mir_tstrcpy(uid, _A2T(dbvuid.pszVal));
break;
case DBVT_UTF8:
- _tcscpy(uid, ptrT(mir_utf8decodeT(dbvuid.pszVal)));
+ mir_tstrcpy(uid, ptrT(mir_utf8decodeT(dbvuid.pszVal)));
break;
default:
- _tcscpy(uid, TranslateT("(Unknown contact)"));
+ mir_tstrcpy(uid, TranslateT("(Unknown contact)"));
}
TCHAR *nick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp index 7bda806525..f968d505a2 100644 --- a/plugins/YAPP/src/services.cpp +++ b/plugins/YAPP/src/services.cpp @@ -290,7 +290,7 @@ static INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam) if (db_get_b(0, "Popup", "ModuleIsEnabled", 1)) {
POPUPDATAT pd = {0};
- _tcscpy(pd.lptzContactName, lParam == SM_WARNING ? _T("Warning") : _T("Notification"));
+ mir_tstrcpy(pd.lptzContactName, lParam == SM_WARNING ? _T("Warning") : _T("Notification"));
pd.lchIcon = LoadIcon(0, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION);
_tcsncpy(pd.lptzText, _A2T((char *)wParam), MAX_SECONDLINE); pd.lptzText[MAX_SECONDLINE-1] = 0;
CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, 0);
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp index e91775973d..a499976d91 100644 --- a/plugins/YAPP/src/yapp.cpp +++ b/plugins/YAPP/src/yapp.cpp @@ -108,40 +108,40 @@ static void InitFonts() {
font_id_firstline.cbSize = sizeof(FontIDT);
font_id_firstline.flags = FIDF_ALLOWEFFECTS;
- _tcscpy(font_id_firstline.group, LPGENT("Popups"));
- _tcscpy(font_id_firstline.name, LPGENT("First line"));
+ mir_tstrcpy(font_id_firstline.group, LPGENT("Popups"));
+ mir_tstrcpy(font_id_firstline.name, LPGENT("First line"));
mir_strcpy(font_id_firstline.dbSettingsGroup, MODULE);
mir_strcpy(font_id_firstline.prefix, "FontFirst");
- _tcscpy(font_id_firstline.backgroundGroup, _T("Popups"));
- _tcscpy(font_id_firstline.backgroundName, _T("Background"));
+ mir_tstrcpy(font_id_firstline.backgroundGroup, _T("Popups"));
+ mir_tstrcpy(font_id_firstline.backgroundName, _T("Background"));
font_id_firstline.order = 0;
FontRegisterT(&font_id_firstline);
font_id_secondline.cbSize = sizeof(FontIDT);
font_id_secondline.flags = FIDF_ALLOWEFFECTS;
- _tcscpy(font_id_secondline.group, LPGENT("Popups"));
- _tcscpy(font_id_secondline.name, LPGENT("Second line"));
+ mir_tstrcpy(font_id_secondline.group, LPGENT("Popups"));
+ mir_tstrcpy(font_id_secondline.name, LPGENT("Second line"));
mir_strcpy(font_id_secondline.dbSettingsGroup, MODULE);
mir_strcpy(font_id_secondline.prefix, "FontSecond");
- _tcscpy(font_id_secondline.backgroundGroup, _T("Popups"));
- _tcscpy(font_id_secondline.backgroundName, _T("Background"));
+ mir_tstrcpy(font_id_secondline.backgroundGroup, _T("Popups"));
+ mir_tstrcpy(font_id_secondline.backgroundName, _T("Background"));
font_id_secondline.order = 1;
FontRegisterT(&font_id_secondline);
font_id_time.cbSize = sizeof(FontIDT);
font_id_time.flags = FIDF_ALLOWEFFECTS;
- _tcscpy(font_id_time.group, LPGENT("Popups"));
- _tcscpy(font_id_time.name, LPGENT("Time"));
+ mir_tstrcpy(font_id_time.group, LPGENT("Popups"));
+ mir_tstrcpy(font_id_time.name, LPGENT("Time"));
mir_strcpy(font_id_time.dbSettingsGroup, MODULE);
mir_strcpy(font_id_time.prefix, "FontTime");
- _tcscpy(font_id_time.backgroundGroup, _T("Popups"));
- _tcscpy(font_id_time.backgroundName, _T("Background"));
+ mir_tstrcpy(font_id_time.backgroundGroup, _T("Popups"));
+ mir_tstrcpy(font_id_time.backgroundName, _T("Background"));
font_id_time.order = 2;
FontRegisterT(&font_id_time);
colour_id_bg.cbSize = sizeof(ColourIDT);
- _tcscpy(colour_id_bg.group, LPGENT("Popups"));
- _tcscpy(colour_id_bg.name, LPGENT("Background"));
+ mir_tstrcpy(colour_id_bg.group, LPGENT("Popups"));
+ mir_tstrcpy(colour_id_bg.name, LPGENT("Background"));
mir_strcpy(colour_id_bg.dbSettingsGroup, MODULE);
mir_strcpy(colour_id_bg.setting, "ColourBg");
colour_id_bg.defcolour = GetSysColor(COLOR_3DSHADOW);
@@ -149,8 +149,8 @@ static void InitFonts() ColourRegisterT(&colour_id_bg);
colour_id_border.cbSize = sizeof(ColourIDT);
- _tcscpy(colour_id_border.group, LPGENT("Popups"));
- _tcscpy(colour_id_border.name, LPGENT("Border"));
+ mir_tstrcpy(colour_id_border.group, LPGENT("Popups"));
+ mir_tstrcpy(colour_id_border.name, LPGENT("Border"));
mir_strcpy(colour_id_border.dbSettingsGroup, MODULE);
mir_strcpy(colour_id_border.setting, "ColourBorder");
colour_id_border.defcolour = RGB(0, 0, 0);
@@ -158,8 +158,8 @@ static void InitFonts() ColourRegisterT(&colour_id_border);
colour_id_sidebar.cbSize = sizeof(ColourIDT);
- _tcscpy(colour_id_sidebar.group, LPGENT("Popups"));
- _tcscpy(colour_id_sidebar.name, LPGENT("Sidebar"));
+ mir_tstrcpy(colour_id_sidebar.group, LPGENT("Popups"));
+ mir_tstrcpy(colour_id_sidebar.name, LPGENT("Sidebar"));
mir_strcpy(colour_id_sidebar.dbSettingsGroup, MODULE);
mir_strcpy(colour_id_sidebar.setting, "ColourSidebar");
colour_id_sidebar.defcolour = RGB(128, 128, 128);
@@ -167,8 +167,8 @@ static void InitFonts() ColourRegisterT(&colour_id_sidebar);
colour_id_titleunderline.cbSize = sizeof(ColourIDT);
- _tcscpy(colour_id_titleunderline.group, LPGENT("Popups"));
- _tcscpy(colour_id_titleunderline.name, LPGENT("Title underline"));
+ mir_tstrcpy(colour_id_titleunderline.group, LPGENT("Popups"));
+ mir_tstrcpy(colour_id_titleunderline.name, LPGENT("Title underline"));
mir_strcpy(colour_id_titleunderline.dbSettingsGroup, MODULE);
mir_strcpy(colour_id_titleunderline.setting, "ColourTitleUnderline");
colour_id_titleunderline.defcolour = GetSysColor(COLOR_3DSHADOW);
diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp index b9b287e37f..af04e7156e 100644 --- a/plugins/wbOSD/src/events.cpp +++ b/plugins/wbOSD/src/events.cpp @@ -156,7 +156,7 @@ int HookedNewEvent(WPARAM wParam, LPARAM hDBEvent) DBVARIANT dbv;
if(!db_get_ts(NULL,THIS_MODULE,"message_format",&dbv)) {
- _tcscpy(buf, dbv.ptszVal);
+ mir_tstrcpy(buf, dbv.ptszVal);
db_free(&dbv);
}
diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp index 5db4ffcf3b..661a5a41a8 100644 --- a/plugins/wbOSD/src/options.cpp +++ b/plugins/wbOSD/src/options.cpp @@ -128,10 +128,10 @@ void loadDBSettings(plgsettings *ps) DBVARIANT dbv;
if (!db_get_ts( NULL, THIS_MODULE, "message_format", &dbv )) {
- _tcscpy(ps->msgformat, dbv.ptszVal);
+ mir_tstrcpy(ps->msgformat, dbv.ptszVal);
db_free(&dbv);
}
- else _tcscpy(ps->msgformat, DEFAULT_MESSAGEFORMAT);
+ else mir_tstrcpy(ps->msgformat, DEFAULT_MESSAGEFORMAT);
ps->announce=db_get_dw(NULL,THIS_MODULE,"announce", DEFAULT_ANNOUNCE);
@@ -150,11 +150,11 @@ void loadDBSettings(plgsettings *ps) ps->lf.lfPitchAndFamily=db_get_b(NULL,THIS_MODULE, "fntPitchAndFamily", DEFAULT_FNT_PITCHANDFAM);
if(!db_get_ts(NULL,THIS_MODULE,"fntFaceName",&dbv)) {
- _tcscpy(ps->lf.lfFaceName, dbv.ptszVal);
+ mir_tstrcpy(ps->lf.lfFaceName, dbv.ptszVal);
db_free(&dbv);
}
else
- _tcscpy(ps->lf.lfFaceName, DEFAULT_FNT_FACENAME);
+ mir_tstrcpy(ps->lf.lfFaceName, DEFAULT_FNT_FACENAME);
}
void saveDBSettings(plgsettings *ps)
|