summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-22 20:07:58 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-22 20:07:58 +0000
commitc09aa99a7e9915c503064d6eb5e9dd1bdd2a673f (patch)
tree9b1b1447755b03dc6fcb327b027789b415e3119f /protocols
parentbabf7873a3fe373d60ef22b1b671d98e014d8819 (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 'protocols')
-rw-r--r--protocols/AimOscar/src/ui.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp4
-rw-r--r--protocols/IcqOscarJ/src/icq_avatar.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp6
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp2
-rw-r--r--protocols/JabberG/src/jabber_privacy.cpp2
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp6
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp8
-rw-r--r--protocols/JabberG/src/jabber_xstatus.cpp6
-rw-r--r--protocols/MSN/src/msn_chat.cpp2
-rw-r--r--protocols/MSN/src/msn_misc.cpp2
-rw-r--r--protocols/MSN/src/msn_p2p.cpp2
-rw-r--r--protocols/MSN/src/msn_svcs.cpp4
-rw-r--r--protocols/SkypeClassic/src/gchat.cpp6
15 files changed, 30 insertions, 30 deletions
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp
index 2d2ba33223..7830e6fa46 100644
--- a/protocols/AimOscar/src/ui.cpp
+++ b/protocols/AimOscar/src/ui.cpp
@@ -112,7 +112,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L
cf.cbSize = sizeof(cf);
cf.yHeight=12*20;
cf.dwMask=CFM_SIZE|CFM_FACE;
- _tcscpy(cf.szFaceName, TEXT("Arial"));
+ mir_tstrcpy(cf.szFaceName, TEXT("Arial"));
SendDlgItemMessage(hwndDlg, IDC_PROFILE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
}
else
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 1e194c6ece..0b9b9e21e0 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -315,7 +315,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count
// Here we put nice new hash sign
TCHAR *name = (TCHAR*)calloc(mir_tstrlen(gcwindow.ptszName) + 2, sizeof(TCHAR));
- *name = '#'; _tcscpy(name + 1, gcwindow.ptszName);
+ *name = '#'; mir_tstrcpy(name + 1, gcwindow.ptszName);
gcwindow.ptszName = name;
// Create new room
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index 467487cfe5..986cbfff12 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -817,7 +817,7 @@ int GGPROTO::img_displayasmsg(MCONTACT hContact, void *img)
mir_free(tmpPath);
}
else {
- _tcscpy(szPath, path);
+ mir_tstrcpy(szPath, path);
tPathLen = mir_tstrlen(szPath);
}
@@ -1024,7 +1024,7 @@ void* GGPROTO::img_loadpicture(gg_event* e, TCHAR *szFileName)
if (*szImgType) {
dat->lpszFileName = (TCHAR*)calloc(sizeof(TCHAR), mir_tstrlen(tmpFileName) + mir_tstrlen(szImgType) + 1);
if (dat->lpszFileName != NULL) {
- _tcscpy(dat->lpszFileName, tmpFileName);
+ mir_tstrcpy(dat->lpszFileName, tmpFileName);
_tcscat(dat->lpszFileName, szImgType);
}
}
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp
index 81ace619cb..6854c4acba 100644
--- a/protocols/IcqOscarJ/src/icq_avatar.cpp
+++ b/protocols/IcqOscarJ/src/icq_avatar.cpp
@@ -94,19 +94,19 @@ void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, TCHAR *pszDest,
_ltot(dwUin, pszDest + tPathLen, 10);
else if (szUid) {
TCHAR* p = mir_a2t(szUid);
- _tcscpy(pszDest + tPathLen, p);
+ mir_tstrcpy(pszDest + tPathLen, p);
mir_free(p);
}
else {
TCHAR szBuf[MAX_PATH];
if (CallService(MS_DB_GETPROFILENAMET, MAX_PATH, (LPARAM)szBuf))
- _tcscpy(pszDest + tPathLen, _T("avatar"));
+ mir_tstrcpy(pszDest + tPathLen, _T("avatar"));
else {
TCHAR *szLastDot = _tcsrchr(szBuf, '.');
if (szLastDot)
szLastDot[0] = '\0';
- _tcscpy(pszDest + tPathLen, szBuf);
+ mir_tstrcpy(pszDest + tPathLen, szBuf);
_tcscat(pszDest + tPathLen, _T("_avt"));
}
}
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index 7d2aa51625..ee19586cbe 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -122,15 +122,15 @@ static HANDLE LoadXStatusIconLibrary(TCHAR *path, const TCHAR *sub)
TCHAR* p = _tcsrchr(path, '\\');
HANDLE hLib;
- _tcscpy(p, sub);
+ mir_tstrcpy(p, sub);
_tcscat(p, _T("\\xstatus_ICQ.dll"));
if (hLib = LoadLibrary(path))
return hLib;
- _tcscpy(p, sub);
+ mir_tstrcpy(p, sub);
_tcscat(p, _T("\\xstatus_icons.dll"));
if (hLib = LoadLibrary(path))
return hLib;
- _tcscpy(p, _T("\\"));
+ mir_tstrcpy(p, _T("\\"));
return hLib;
}
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index 1fce21f81a..12a822279c 100644
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -405,7 +405,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo)
*szPos = 0;
szPos += mir_tstrlen(szGroupDelimeter);
TCHAR *szNewGroup = (TCHAR *)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(item->group) + mir_tstrlen(szPos) + 2));
- _tcscpy(szNewGroup, item->group);
+ mir_tstrcpy(szNewGroup, item->group);
_tcscat(szNewGroup, _T("\\"));
_tcscat(szNewGroup, szPos);
mir_free(item->group);
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp
index 64b33c7916..1a38d4f043 100644
--- a/protocols/JabberG/src/jabber_privacy.cpp
+++ b/protocols/JabberG/src/jabber_privacy.cpp
@@ -1011,7 +1011,7 @@ void CJabberDlgPrivacyLists::ShowAdvancedList(CPrivacyList *pList)
if (!dwPackets)
dwPackets = JABBER_PL_RULE_TYPE_ALL;
if (dwPackets == JABBER_PL_RULE_TYPE_ALL)
- _tcscpy(szPackets, _T("all"));
+ mir_tstrcpy(szPackets, _T("all"));
else {
if (dwPackets & JABBER_PL_RULE_TYPE_MESSAGE)
_tcscat(szPackets, _T("messages"));
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 282f3f93bb..773dcb7800 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -280,13 +280,13 @@ LBL_FatalError:
if (m_options.HostNameAsResource) {
DWORD dwCompNameLen = SIZEOF(info.resource) - 1;
if (!GetComputerName(info.resource, &dwCompNameLen))
- _tcscpy(info.resource, _T("Miranda"));
+ mir_tstrcpy(info.resource, _T("Miranda"));
}
else {
if ((tszValue = getTStringA("Resource")) != NULL)
_tcsncpy_s(info.resource, tszValue, _TRUNCATE);
else
- _tcscpy(info.resource, _T("Miranda"));
+ mir_tstrcpy(info.resource, _T("Miranda"));
}
TCHAR jidStr[512];
@@ -1266,7 +1266,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
if (ptszUrl != NULL && *ptszUrl) {
size_t cbLen = (szMessage ? mir_tstrlen(szMessage) : 0) + mir_tstrlen(ptszUrl) + 32;
TCHAR *szTmp = (TCHAR *)alloca(sizeof(TCHAR)* cbLen);
- _tcscpy(szTmp, ptszUrl);
+ mir_tstrcpy(szTmp, ptszUrl);
if (szMessage) {
_tcscat(szTmp, _T("\r\n"));
_tcscat(szTmp, szMessage);
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index 2fd95e9f14..c5e7ba3036 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -291,13 +291,13 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
dat->ppro->GetAvatarFileName(NULL, szAvatarFileName, SIZEOF(szAvatarFileName));
if (_taccess(szAvatarFileName, 0) == 0) {
if (GetTempPath(SIZEOF(szTempPath), szTempPath) <= 0)
- _tcscpy(szTempPath, _T(".\\"));
+ mir_tstrcpy(szTempPath, _T(".\\"));
if (GetTempFileName(szTempPath, _T("jab"), 0, szTempFileName) > 0) {
dat->ppro->debugLog(_T("Temp file = %s"), szTempFileName);
if (CopyFile(szAvatarFileName, szTempFileName, FALSE) == TRUE) {
if ((dat->hBitmap = (HBITMAP)CallService(MS_UTILS_LOADBITMAPT, 0, (LPARAM)szTempFileName)) != NULL) {
FIP->FI_Premultiply(dat->hBitmap);
- _tcscpy(dat->ppro->m_szPhotoFileName, szTempFileName);
+ mir_tstrcpy(dat->ppro->m_szPhotoFileName, szTempFileName);
EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), TRUE);
}
else DeleteFile(szTempFileName);
@@ -357,7 +357,7 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
break;
}
if (GetTempPath(SIZEOF(szTempPath), szTempPath) <= 0)
- _tcscpy(szTempPath, _T(".\\"));
+ mir_tstrcpy(szTempPath, _T(".\\"));
if (GetTempFileName(szTempPath, _T("jab"), 0, szTempFileName) > 0) {
dat->ppro->debugLog(_T("Temp file = %s"), szTempFileName);
if (CopyFile(szFileName, szTempFileName, FALSE) == TRUE) {
@@ -369,7 +369,7 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
}
dat->hBitmap = hNewBitmap;
- _tcscpy(dat->ppro->m_szPhotoFileName, szTempFileName);
+ mir_tstrcpy(dat->ppro->m_szPhotoFileName, szTempFileName);
dat->ppro->m_bPhotoChanged = TRUE;
EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), TRUE);
InvalidateRect(hwndDlg, NULL, TRUE);
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp
index 0bbcf35434..49f1bd03a5 100644
--- a/protocols/JabberG/src/jabber_xstatus.cpp
+++ b/protocols/JabberG/src/jabber_xstatus.cpp
@@ -1511,15 +1511,15 @@ void g_XstatusIconsInit()
TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, SIZEOF(szFile));
if (TCHAR *p = _tcsrchr(szFile, '\\'))
- _tcscpy(p + 1, _T("..\\Icons\\xstatus_jabber.dll"));
+ mir_tstrcpy(p + 1, _T("..\\Icons\\xstatus_jabber.dll"));
TCHAR szSection[100];
- _tcscpy(szSection, _T("Protocols/Jabber/")LPGENT("Moods"));
+ mir_tstrcpy(szSection, _T("Protocols/Jabber/")LPGENT("Moods"));
for (int i = 1; i < SIZEOF(g_arrMoods); i++)
g_MoodIcons.RegisterIcon(g_arrMoods[i].szTag, szFile, -(200 + i), szSection, TranslateTS(g_arrMoods[i].szName));
- _tcscpy(szSection, _T("Protocols/Jabber/")LPGENT("Activities"));
+ mir_tstrcpy(szSection, _T("Protocols/Jabber/")LPGENT("Activities"));
for (int k = 0; k < SIZEOF(g_arrActivities); k++) {
if (g_arrActivities[k].szFirst)
g_ActivityIcons.RegisterIcon(g_arrActivities[k].szFirst, szFile, g_arrActivities[k].iconid, szSection, TranslateTS(g_arrActivities[k].szTitle));
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp
index dd35207888..4e9b439eb7 100644
--- a/protocols/MSN/src/msn_chat.cpp
+++ b/protocols/MSN/src/msn_chat.cpp
@@ -125,7 +125,7 @@ void CMsnProto::MSN_ChatStart(ezxml_t xmli)
info->mJoinedContacts.insert(gcu);
strncpy(gcu->WLID, mri, sizeof(gcu->WLID));
}
- _tcscpy(gcu->role, _A2T(role));
+ mir_tstrcpy(gcu->role, _A2T(role));
if (pszCreator && !mir_strcmp(mri, pszCreator)) info->mCreator = gcu;
char* szEmail, *szNet;
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index 84b629f168..0169140612 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -332,7 +332,7 @@ void CMsnProto::MSN_GetCustomSmileyFileName(MCONTACT hContact, TCHAR* pszDest, s
mir_free(tmpPath);
}
else {
- _tcscpy(pszDest, path);
+ mir_tstrcpy(pszDest, path);
tPathLen = mir_tstrlen(pszDest);
}
diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp
index 4116b0a3f4..948e466fb9 100644
--- a/protocols/MSN/src/msn_p2p.cpp
+++ b/protocols/MSN/src/msn_p2p.cpp
@@ -262,7 +262,7 @@ void CMsnProto::p2p_savePicture2disk(filetransfer* ft)
cont.type = 1;
TCHAR* pathcpy = mir_tstrdup(ft->std.tszCurrentFile);
- _tcscpy(_tcsrchr(pathcpy, '.') + 1, ext);
+ mir_tstrcpy(_tcsrchr(pathcpy, '.') + 1, ext);
_trename(ft->std.tszCurrentFile, pathcpy);
cont.path = pathcpy;
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp
index 8a70038f54..b758348cdd 100644
--- a/protocols/MSN/src/msn_svcs.cpp
+++ b/protocols/MSN/src/msn_svcs.cpp
@@ -81,7 +81,7 @@ INT_PTR CMsnProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
MSN_GetAvatarFileName(NULL, filename, SIZEOF(filename), NULL);
AI->format = ProtoGetAvatarFormat(filename);
if (AI->format != PA_FORMAT_UNKNOWN)
- _tcscpy(AI->filename, filename);
+ mir_tstrcpy(AI->filename, filename);
return AI->format == PA_FORMAT_UNKNOWN ? GAIR_NOAVATAR : GAIR_SUCCESS;
}
@@ -113,7 +113,7 @@ INT_PTR CMsnProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
mir_free(szAvatarHash);
}
}
- _tcscpy(AI->filename, filename);
+ mir_tstrcpy(AI->filename, filename);
return GAIR_SUCCESS;
}
diff --git a/protocols/SkypeClassic/src/gchat.cpp b/protocols/SkypeClassic/src/gchat.cpp
index 2d29dd6b86..c8e4dca6b5 100644
--- a/protocols/SkypeClassic/src/gchat.cpp
+++ b/protocols/SkypeClassic/src/gchat.cpp
@@ -139,8 +139,8 @@ static int AddChatContact(gchat_contacts *gc, char *who, TCHAR *pszRole)
if ((gc->mJoinedContacts=(gchat_contact*)realloc(gc->mJoinedContacts, (gc->mJoinedCount+1)*sizeof(gchat_contact))))
{
gc->mJoinedContacts[i=gc->mJoinedCount].hContact=hContact;
- _tcscpy (gc->mJoinedContacts[i].szRole, gce.ptszStatus);
- _tcscpy (gc->mJoinedContacts[i].who, twho);
+ mir_tstrcpy (gc->mJoinedContacts[i].szRole, gce.ptszStatus);
+ mir_tstrcpy (gc->mJoinedContacts[i].who, twho);
gc->mJoinedCount++;
}
}
@@ -674,7 +674,7 @@ int GCEventHook(WPARAM,LPARAM lParam) {
TCHAR *ptr, buf[MAX_BUF];
ptr = SkypeGetT ("CHAT", (TCHAR*)gch->pDest->ptszID, "TOPIC");
- _tcscpy(buf, ptr);
+ mir_tstrcpy(buf, ptr);
free(ptr);
if (DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INPUTBOX), NULL, InputBoxDlgProc, (LPARAM)&buf))
SetChatTopic(gch->pDest->ptszID, buf, TRUE);