diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 20:07:58 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 20:07:58 +0000 |
commit | c09aa99a7e9915c503064d6eb5e9dd1bdd2a673f (patch) | |
tree | 9b1b1447755b03dc6fcb327b027789b415e3119f /src | |
parent | babf7873a3fe373d60ef22b1b671d98e014d8819 (diff) |
replace _tcscpy to mir_tstrcpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13764 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdchat/src/tools.cpp | 2 | ||||
-rw-r--r-- | src/core/stdfile/src/fileexistsdlg.cpp | 2 | ||||
-rw-r--r-- | src/core/stdfile/src/filesenddlg.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | src/modules/chat/clist.cpp | 2 | ||||
-rw-r--r-- | src/modules/database/database.cpp | 2 | ||||
-rw-r--r-- | src/modules/database/profilemanager.cpp | 6 | ||||
-rw-r--r-- | src/modules/netlib/netlibsecurity.cpp | 2 | ||||
-rw-r--r-- | src/modules/utils/path.cpp | 2 | ||||
-rw-r--r-- | src/modules/utils/timezones.cpp | 2 |
10 files changed, 13 insertions, 13 deletions
diff --git a/src/core/stdchat/src/tools.cpp b/src/core/stdchat/src/tools.cpp index 4ca40f7e48..b886edf0d5 100644 --- a/src/core/stdchat/src/tools.cpp +++ b/src/core/stdchat/src/tools.cpp @@ -51,7 +51,7 @@ bool LoadMessageFont(LOGFONT *lf, COLORREF *colour) DBVARIANT dbv;
if (db_get_ts(NULL, "SRMM", str, &dbv))
- _tcscpy(lf->lfFaceName, _T("Arial"));
+ mir_tstrcpy(lf->lfFaceName, _T("Arial"));
else {
mir_tstrncpy(lf->lfFaceName, dbv.ptszVal, SIZEOF(lf->lfFaceName));
db_free(&dbv);
diff --git a/src/core/stdfile/src/fileexistsdlg.cpp b/src/core/stdfile/src/fileexistsdlg.cpp index 959a14ccdd..1062177c7c 100644 --- a/src/core/stdfile/src/fileexistsdlg.cpp +++ b/src/core/stdfile/src/fileexistsdlg.cpp @@ -290,7 +290,7 @@ INT_PTR CALLBACK DlgProcFileExists(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM _tcsncpy(filter, TranslateT("All files"),SIZEOF(filter)-1);
_tcscat(filter, _T(" (*)"));
pfilter = filter + mir_tstrlen(filter) + 1;
- _tcscpy(pfilter, _T("*"));
+ mir_tstrcpy(pfilter, _T("*"));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
diff --git a/src/core/stdfile/src/filesenddlg.cpp b/src/core/stdfile/src/filesenddlg.cpp index 30eda2fbab..fc410095cb 100644 --- a/src/core/stdfile/src/filesenddlg.cpp +++ b/src/core/stdfile/src/filesenddlg.cpp @@ -111,7 +111,7 @@ static void FilenameToFileList(HWND hwndDlg, FileDlgData* dat, const TCHAR *buf) // Add path to filename and copy into array
memcpy(dat->files[nTemp], buf, (fileOffset - 1)*sizeof(TCHAR));
dat->files[nTemp][fileOffset - 1] = '\\';
- _tcscpy(dat->files[nTemp] + fileOffset - (buf[fileOffset - 2] == '\\' ? 1 : 0), pBuf);
+ mir_tstrcpy(dat->files[nTemp] + fileOffset - (buf[fileOffset - 2] == '\\' ? 1 : 0), pBuf);
// Move pointers to next file...
pBuf += cbFileNameLen + 1;
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index ffe181ffd9..399703ec52 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -961,7 +961,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (buf[0] && OpenClipboard(hwndDlg)) {
EmptyClipboard();
HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, mir_tstrlen(buf) * sizeof(TCHAR)+1);
- _tcscpy((TCHAR*)GlobalLock(hData), buf);
+ mir_tstrcpy((TCHAR*)GlobalLock(hData), buf);
GlobalUnlock(hData);
SetClipboardData(CF_UNICODETEXT, hData);
CloseClipboard();
@@ -1613,7 +1613,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (OpenClipboard(hwndDlg)) {
EmptyClipboard();
HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (mir_tstrlen(tr.lpstrText) + 1) * sizeof(TCHAR));
- _tcscpy((TCHAR*)GlobalLock(hData), tr.lpstrText);
+ mir_tstrcpy((TCHAR*)GlobalLock(hData), tr.lpstrText);
GlobalUnlock(hData);
SetClipboardData(CF_UNICODETEXT, hData);
CloseClipboard();
diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp index 6a2ca27a09..8f8535eea1 100644 --- a/src/modules/chat/clist.cpp +++ b/src/modules/chat/clist.cpp @@ -29,7 +29,7 @@ MCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDi if (groupName)
_tcsncpy_s(pszGroup, groupName, _TRUNCATE);
else
- _tcscpy(pszGroup, _T("Chat rooms"));
+ mir_tstrcpy(pszGroup, _T("Chat rooms"));
if (pszGroup[0]) {
HANDLE hGroup = Clist_GroupExists(pszGroup);
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp index bdf770646d..2f16ad53df 100644 --- a/src/modules/database/database.cpp +++ b/src/modules/database/database.cpp @@ -76,7 +76,7 @@ int getProfilePath(TCHAR *buf, size_t cch) GetPrivateProfileString(_T("Database"), _T("ProfileDir"), _T(""), profiledir, SIZEOF(profiledir), mirandabootini);
if (profiledir[0] == 0)
- _tcscpy(profiledir, _T("%miranda_path%\\Profiles"));
+ mir_tstrcpy(profiledir, _T("%miranda_path%\\Profiles"));
size_t len = PathToAbsoluteT( VARST(profiledir), buf);
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp index 95b62b756e..b7e0d5ee7e 100644 --- a/src/modules/database/profilemanager.cpp +++ b/src/modules/database/profilemanager.cpp @@ -246,7 +246,7 @@ class CChooseProfileDlg : public CDlgBase bool bFileLocked = true; TCHAR *p = _tcsrchr(profile, '.'); - _tcscpy(sizeBuf, _T("0 KB")); + mir_tstrcpy(sizeBuf, _T("0 KB")); if (p != NULL) *p = 0; LVITEM item = { 0 }; @@ -258,11 +258,11 @@ class CChooseProfileDlg : public CDlgBase if (_tstat(tszFullPath, &statbuf) == 0) { if (statbuf.st_size > 1000000) { mir_sntprintf(sizeBuf, SIZEOF(sizeBuf), _T("%.3lf"), (double)statbuf.st_size / 1048576.0); - _tcscpy(sizeBuf + 5, _T(" MB")); + mir_tstrcpy(sizeBuf + 5, _T(" MB")); } else { mir_sntprintf(sizeBuf, SIZEOF(sizeBuf), _T("%.3lf"), (double)statbuf.st_size / 1024.0); - _tcscpy(sizeBuf + 5, _T(" KB")); + mir_tstrcpy(sizeBuf + 5, _T(" KB")); } bFileLocked = !fileExist(tszFullPath); } diff --git a/src/modules/netlib/netlibsecurity.cpp b/src/modules/netlib/netlibsecurity.cpp index a1ddd855aa..31873e94a7 100644 --- a/src/modules/netlib/netlibsecurity.cpp +++ b/src/modules/netlib/netlibsecurity.cpp @@ -294,7 +294,7 @@ char* NtlmCreateResponseFromChallenge(HANDLE hSecurity, const char *szChallenge, _tcsncpy(newLogin, domainName, domainLen);
newLogin[domainLen] = '\\';
- _tcscpy(newLogin + domainLen + 1, login);
+ mir_tstrcpy(newLogin + domainLen + 1, login);
char* szChl = NtlmCreateResponseFromChallenge(hSecurity, NULL, newLogin, psw, http, complete);
mir_free(szChl);
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp index 0a9c1123ad..3564e357f0 100644 --- a/src/modules/utils/path.cpp +++ b/src/modules/utils/path.cpp @@ -195,7 +195,7 @@ static __forceinline char *GetPathVarX(char *, int code) static __forceinline int _xcscmp(const TCHAR *s1, const TCHAR *s2) { return mir_tstrcmp(s1, s2); }
static __forceinline int _xcsncmp(const TCHAR *s1, const TCHAR *s2, size_t n) { return _tcsncmp(s1, s2, n); }
static __forceinline size_t _xcslen(const TCHAR *s1) { return mir_tstrlen(s1); }
-static __forceinline TCHAR *_xcscpy(TCHAR *s1, const TCHAR *s2) { return _tcscpy(s1, s2); }
+static __forceinline TCHAR *_xcscpy(TCHAR *s1, const TCHAR *s2) { return mir_tstrcpy(s1, s2); }
static __forceinline TCHAR *_xcsncpy(TCHAR *s1, const TCHAR *s2, size_t n) { return _tcsncpy(s1, s2, n); }
static __forceinline TCHAR *_xstrselect(TCHAR *, char *s1, TCHAR *s2) { return s2; }
static __forceinline TCHAR *_itox(TCHAR *, int a) { return _itot(a, (TCHAR *)mir_alloc(sizeof(TCHAR)*20), 10); }
diff --git a/src/modules/utils/timezones.cpp b/src/modules/utils/timezones.cpp index ce928fbb24..435d358220 100644 --- a/src/modules/utils/timezones.cpp +++ b/src/modules/utils/timezones.cpp @@ -525,7 +525,7 @@ void InitTimeZones(void) tz->tzi.DaylightDate = tzi.DaylightDate;
tz->tzi.DaylightBias = tzi.DaylightBias;
- _tcscpy(tz->tszName, tszName);
+ mir_tstrcpy(tz->tszName, tszName);
tz->hash = mir_hashstrT(tszName);
tz->offset = INT_MIN;
|