summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-24 12:35:03 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-24 12:35:03 +0000
commitee697e0b699bcefec907c089e3ad455538c72c2f (patch)
tree030a675c2c93dc8b34a13b7fc9a3bea7477d84ba
parent5aed15a8d8d8e4f913539761be496e0d1ba2c4f0 (diff)
replace wcscpy to mir_wstrcpy
replace wcscat to mir_wstrcat replace wcsncat to mir_wstrncat replace wcscmp to mir_wstrcmp replace wcsicmp to mir_wstrcmpi git-svn-id: http://svn.miranda-ng.org/main/trunk@13814 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/DbEditorPP/src/copymodule.cpp2
-rw-r--r--plugins/DbEditorPP/src/main.cpp2
-rw-r--r--plugins/DbEditorPP/src/moduletree.cpp2
-rw-r--r--plugins/ExternalAPI/m_folders.h4
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp4
-rw-r--r--plugins/HistoryStats/src/_strfunc.h2
-rw-r--r--plugins/IEView/src/IEView.cpp4
-rw-r--r--plugins/IEView/src/TextToken.cpp12
-rw-r--r--plugins/IEView/src/Utils.cpp4
-rw-r--r--plugins/KeyboardNotify/src/flash.cpp4
-rw-r--r--plugins/KeyboardNotify/src/options.cpp8
-rw-r--r--plugins/MirOTR/src/dbfilter.cpp2
-rw-r--r--plugins/SecureIM/src/crypt_lists.cpp4
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/mir_string.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/options.cpp4
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp4
-rw-r--r--plugins/TabSRMM/src/utils.cpp4
-rw-r--r--plugins/YAMN/src/browser/mailbrowser.cpp4
-rw-r--r--plugins/YAMN/src/mails/mime.cpp4
-rw-r--r--plugins/YAMN/src/proto/pop3/pop3opt.cpp4
-rw-r--r--plugins/YAPP/src/services.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp4
-rw-r--r--protocols/MSN/src/msn_mime.cpp2
-rw-r--r--src/modules/clist/contacts.cpp4
-rw-r--r--src/modules/protocols/protoaccs.cpp4
-rw-r--r--src/modules/utils/timezones.cpp2
-rw-r--r--src/modules/xml/xmlParser.cpp4
29 files changed, 53 insertions, 53 deletions
diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp
index 1e580ba6a4..03630c496b 100644
--- a/plugins/DbEditorPP/src/copymodule.cpp
+++ b/plugins/DbEditorPP/src/copymodule.cpp
@@ -70,7 +70,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
else
mir_snwprintf(nick, SIZEOF(nick), L"%s (%s) %s", GetContactName(hContact, szProto, 1), protoW, L"(UNLOADED)");
}
- else wcscpy(nick, nick_unknownW);
+ else mir_wstrcpy(nick, nick_unknownW);
}
else {
if (Order)
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index a821adde05..3db3a53ab9 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -485,7 +485,7 @@ WCHAR* GetContactName(MCONTACT hContact, const char *szProto, int unicode)
if (len && len < SIZEOF(res) - 2) {
if (unicode)
- wcscat(res, L" ");
+ mir_wstrcat(res, L" ");
else
mir_strcat((char*)res, " ");
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp
index e2d2345edc..151a081de3 100644
--- a/plugins/DbEditorPP/src/moduletree.cpp
+++ b/plugins/DbEditorPP/src/moduletree.cpp
@@ -67,7 +67,7 @@ int doContacts(HWND hwnd2Tree, HTREEITEM contactsRoot, ModuleSettingLL *modlist,
mir_snwprintf(nick, SIZEOF(nick), L"%s (%s) %s", GetContactName(hContact, szProto, 1), protoW, L"(UNLOADED)");
}
else
- wcscpy(nick, nick_unknownW);
+ mir_wstrcpy(nick, nick_unknownW);
}
else {
tvi.item.iSelectedImage = (tvi.item.iImage = icon); //GetProtoIcon(szProto, 7));
diff --git a/plugins/ExternalAPI/m_folders.h b/plugins/ExternalAPI/m_folders.h
index 34c00ac33e..076247480d 100644
--- a/plugins/ExternalAPI/m_folders.h
+++ b/plugins/ExternalAPI/m_folders.h
@@ -232,10 +232,10 @@ __inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pa
}
if (pathW[0] != '\0')
- wcsncat(pathW, L"\\", size - mir_wstrlen(pathW));
+ mir_wstrncat(pathW, L"\\", size - mir_wstrlen(pathW));
if (fileNameW)
- wcsncat(pathW, fileNameW, size - mir_wstrlen(pathW));
+ mir_wstrncat(pathW, fileNameW, size - mir_wstrlen(pathW));
return res;
}
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index 3202d22ff5..ae149b9115 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -343,7 +343,7 @@ void __fastcall GetIconsIndexesA(LPSTR szMirVer, short *base, short *overlay, sh
void __fastcall GetIconsIndexesW(LPWSTR wszMirVer, short *base, short *overlay, short *overlay2, short *overlay3, short *overlay4)
{
- if (wcscmp(wszMirVer, L"?") == 0)
+ if (mir_wstrcmp(wszMirVer, L"?") == 0)
{
*base = UNKNOWN_MASK_NUMBER;
*overlay = -1;
@@ -787,7 +787,7 @@ static INT_PTR ServiceGetClientDescrW(WPARAM wParam, LPARAM)
return 0;
LPWSTR wszMirVerUp = NEWWSTR_ALLOCA(wszMirVer); _wcsupr(wszMirVerUp);
- if (wcscmp(wszMirVerUp, L"?") == 0)
+ if (mir_wstrcmp(wszMirVerUp, L"?") == 0)
return (INT_PTR)def_kn_fp_mask[UNKNOWN_MASK_NUMBER].szClientDescription;
for (int index = 0; index < DEFAULT_KN_FP_MASK_COUNT; index++)
diff --git a/plugins/HistoryStats/src/_strfunc.h b/plugins/HistoryStats/src/_strfunc.h
index c0a7a1084f..f00af2f367 100644
--- a/plugins/HistoryStats/src/_strfunc.h
+++ b/plugins/HistoryStats/src/_strfunc.h
@@ -28,7 +28,7 @@ namespace ext
{
public:
static const WCHAR* chr(const WCHAR* string, WCHAR c) { return wcschr(string, c); }
- static int cmp(const WCHAR* string1, const WCHAR* string2) { return wcscmp(string1, string2); }
+ static int cmp(const WCHAR* string1, const WCHAR* string2) { return mir_wstrcmp(string1, string2); }
static int icmp(const WCHAR* string1, const WCHAR* string2) { return _wcsicmp(string1, string2); }
static int coll(const WCHAR* string1, const WCHAR* string2) { return wcscoll(string1, string2); }
static int icoll(const WCHAR* string1, const WCHAR* string2) { return _wcsicoll(string1, string2); }
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp
index 0f016dfb93..098cb1a71f 100644
--- a/plugins/IEView/src/IEView.cpp
+++ b/plugins/IEView/src/IEView.cpp
@@ -652,7 +652,7 @@ STDMETHODIMP IEView::GetSecuritySite(IInternetSecurityMgrSite **)
STDMETHODIMP IEView::MapUrlToZone(LPCWSTR pwszUrl, DWORD *pdwZone, DWORD)
{
- if (pdwZone != NULL && pwszUrl != NULL && !wcscmp(pwszUrl, L"about:blank")) {
+ if (pdwZone != NULL && pwszUrl != NULL && !mir_wstrcmp(pwszUrl, L"about:blank")) {
*pdwZone = URLZONE_LOCAL_MACHINE;
return S_OK;
}
@@ -667,7 +667,7 @@ STDMETHODIMP IEView::GetSecurityId(LPCWSTR, BYTE *, DWORD *, DWORD_PTR)
STDMETHODIMP IEView::ProcessUrlAction(LPCWSTR pwszUrl, DWORD dwAction, BYTE *pPolicy, DWORD cbPolicy, BYTE *, DWORD, DWORD, DWORD)
{
DWORD dwPolicy = URLPOLICY_ALLOW;
- if (pwszUrl != NULL && !wcscmp(pwszUrl, L"about:blank")) {
+ if (pwszUrl != NULL && !mir_wstrcmp(pwszUrl, L"about:blank")) {
if (dwAction <= URLACTION_ACTIVEX_MAX && dwAction >= URLACTION_ACTIVEX_MIN) {
//dwPolicy = URLPOLICY_DISALLOW;
//dwPolicy = URLPOLICY_ALLOW;
diff --git a/plugins/IEView/src/TextToken.cpp b/plugins/IEView/src/TextToken.cpp
index ad08ee7856..1818154309 100644
--- a/plugins/IEView/src/TextToken.cpp
+++ b/plugins/IEView/src/TextToken.cpp
@@ -479,18 +479,18 @@ wchar_t *TextToken::htmlEncode(const wchar_t *str)
wchar_t *output = new wchar_t[c + 1];
for (out = output, ptr = str; *ptr != '\0'; ptr++) {
if (*ptr == ' ' && wasSpace) {
- wcscpy(out, L"&nbsp;");
+ mir_wstrcpy(out, L"&nbsp;");
out += 6;
}
else {
wasSpace = false;
switch (*ptr) {
- case '\n': wcscpy(out, L"<br>"); out += 4; break;
+ case '\n': mir_wstrcpy(out, L"<br>"); out += 4; break;
case '\r': break;
- case '&': wcscpy(out, L"&amp;"); out += 5; break;
- case '>': wcscpy(out, L"&gt;"); out += 4; break;
- case '<': wcscpy(out, L"&lt;"); out += 4; break;
- case '"': wcscpy(out, L"&quot;"); out += 6; break;
+ case '&': mir_wstrcpy(out, L"&amp;"); out += 5; break;
+ case '>': mir_wstrcpy(out, L"&gt;"); out += 4; break;
+ case '<': mir_wstrcpy(out, L"&lt;"); out += 4; break;
+ case '"': mir_wstrcpy(out, L"&quot;"); out += 6; break;
case ' ': wasSpace = true;
default: *out = *ptr; out++;
}
diff --git a/plugins/IEView/src/Utils.cpp b/plugins/IEView/src/Utils.cpp
index 1655b06c95..1330f14e89 100644
--- a/plugins/IEView/src/Utils.cpp
+++ b/plugins/IEView/src/Utils.cpp
@@ -36,8 +36,8 @@ wchar_t* Utils::toAbsolute(wchar_t* relative)
long tlen = len + (int)mir_wstrlen(relative);
wchar_t* result = (wchar_t*)mir_alloc(sizeof(wchar_t)*(tlen + 1));
if (result) {
- wcscpy(result, bdir);
- wcscpy(result + len, relative);
+ mir_wstrcpy(result, bdir);
+ mir_wstrcpy(result + len, relative);
}
return result;
}
diff --git a/plugins/KeyboardNotify/src/flash.cpp b/plugins/KeyboardNotify/src/flash.cpp
index 22a86b2d63..6ec3f6a133 100644
--- a/plugins/KeyboardNotify/src/flash.cpp
+++ b/plugins/KeyboardNotify/src/flash.cpp
@@ -200,7 +200,7 @@ void useExternSequence(TCHAR *extStr)
static FLASHING_SEQUENCE Extern = {0};
TCHAR externStr[MAX_PATH+1];
- wcscpy(externStr, extStr);
+ mir_wstrcpy(externStr, extStr);
Extern = str2FS(normalizeCustomString(externStr));
@@ -215,7 +215,7 @@ TCHAR *normalizeCustomString(TCHAR *customStr)
BOOL used[4];
TCHAR strAux[MAX_PATH+1], *str;
- for (wcscpy(str=strAux, customStr); *str; str++) {
+ for (mir_wstrcpy(str=strAux, customStr); *str; str++) {
switch (*str) {
case _T('['):
if (status == 0) {
diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp
index 75bbbda4b4..b21f7f8a3b 100644
--- a/plugins/KeyboardNotify/src/options.cpp
+++ b/plugins/KeyboardNotify/src/options.cpp
@@ -787,7 +787,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
str = (TCHAR *)SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETITEMDATA, (WPARAM)item, 0);
if (str) {
GetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, customAux, SIZEOF(customAux));
- if (wcscmp(str, customAux))
+ if (mir_wstrcmp(str, customAux))
EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATE), TRUE);
else
EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATE), FALSE);
@@ -872,7 +872,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
ofn.hwndOwner = hwndDlg;
ofn.hInstance = NULL;
mir_tstrcpy(filter, TranslateT("Keyboard Notify Theme"));
- wcscat(filter, _T(" (*.knt)"));
+ mir_wstrcat(filter, _T(" (*.knt)"));
pfilter = filter + mir_tstrlen(filter) + 1;
mir_tstrcpy(pfilter, _T("*.knt"));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
@@ -900,7 +900,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
ofn.hwndOwner = hwndDlg;
ofn.hInstance = NULL;
mir_tstrcpy(filter, TranslateT("Keyboard Notify Theme"));
- wcscat(filter, _T(" (*.knt)"));
+ mir_wstrcat(filter, _T(" (*.knt)"));
pfilter = filter + mir_tstrlen(filter) + 1;
mir_tstrcpy(pfilter, _T("*.knt"));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
@@ -953,7 +953,7 @@ INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
else
db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), _T(""));
- if (!wcscmp(theme, themeAux))
+ if (!mir_wstrcmp(theme, themeAux))
wCustomTheme = i;
// Here we will update the theme combo on the Flashing tab: horrible but can't imagine a better way right now
diff --git a/plugins/MirOTR/src/dbfilter.cpp b/plugins/MirOTR/src/dbfilter.cpp
index d8e1f8524e..57ff93e159 100644
--- a/plugins/MirOTR/src/dbfilter.cpp
+++ b/plugins/MirOTR/src/dbfilter.cpp
@@ -133,7 +133,7 @@ int OnDatabaseEventPreAdd(WPARAM hContact, LPARAM lParam)
mir_strncat(newmsg, msg, alloclen + datalen - mir_strlen(newmsg));
wchar_t *p = (wchar_t*) newmsg + (msglen + prefixlen + 1);
wcsncpy(p, prefixw, prefixlenw);
- wcsncat(p, msgw, msglenw - mir_wstrlen(p));
+ mir_wstrncat(p, msgw, msglenw - mir_wstrlen(p));
mir_free(prefix);
mir_free(prefixw);
// append additional data
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp
index b0407c4a55..3ea94b4b62 100644
--- a/plugins/SecureIM/src/crypt_lists.cpp
+++ b/plugins/SecureIM/src/crypt_lists.cpp
@@ -196,7 +196,7 @@ void getContactNameA(MCONTACT hContact, LPSTR szName)
void getContactName(MCONTACT hContact, LPSTR szName)
{
- wcscpy((LPWSTR)szName, (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GSMDF_UNICODE));
+ mir_wstrcpy((LPWSTR)szName, (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GSMDF_UNICODE));
}
void getContactUinA(MCONTACT hContact, LPSTR szUIN)
@@ -230,7 +230,7 @@ void getContactUin(MCONTACT hContact, LPSTR szUIN)
getContactUinA(hContact, szUIN);
if (*szUIN) {
LPWSTR tmp = mir_a2u(szUIN);
- wcscpy((LPWSTR)szUIN, tmp);
+ mir_wstrcpy((LPWSTR)szUIN, tmp);
mir_free(tmp);
}
}
diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp
index e3ec5a8df7..fd7ab70eb4 100644
--- a/plugins/SendScreenshotPlus/src/Utils.cpp
+++ b/plugins/SendScreenshotPlus/src/Utils.cpp
@@ -364,7 +364,7 @@ BOOL GetEncoderClsid(wchar_t *wchMimeType, CLSID& clsidEncoder) {
if(pImageCodecInfo){
Gdiplus::GetImageEncoders(uiNum,uiSize,pImageCodecInfo);
for( UINT i=0; i<uiNum; ++i){
- if(!wcscmp(pImageCodecInfo[i].MimeType,wchMimeType)){
+ if(!mir_wstrcmp(pImageCodecInfo[i].MimeType,wchMimeType)){
clsidEncoder=pImageCodecInfo[i].Clsid;
bOk=TRUE;
}
diff --git a/plugins/SendScreenshotPlus/src/mir_string.cpp b/plugins/SendScreenshotPlus/src/mir_string.cpp
index d22754bd89..0a11dfa287 100644
--- a/plugins/SendScreenshotPlus/src/mir_string.cpp
+++ b/plugins/SendScreenshotPlus/src/mir_string.cpp
@@ -59,7 +59,7 @@ void mir_wstradd(wchar_t* &pszDest, const wchar_t* pszSrc)
size_t lenNew = lenDest + lenSrc + 1;
pszDest = (wchar_t *) mir_realloc(pszDest, sizeof(wchar_t)*lenNew);
- wcscpy(pszDest + lenDest, pszSrc);
+ mir_wstrcpy(pszDest + lenDest, pszSrc);
pszDest[lenNew-1] = 0;
}
}
diff --git a/plugins/StopSpamMod/src/options.cpp b/plugins/StopSpamMod/src/options.cpp
index 0548dff6fc..8ca2b6fca7 100755
--- a/plugins/StopSpamMod/src/options.cpp
+++ b/plugins/StopSpamMod/src/options.cpp
@@ -306,7 +306,7 @@ INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
static tstring NewGroupName, CurrentGroupName;
NewGroupName = GetDlgItemString(hwnd, ID_SPECIALGROUPNAME);
CurrentGroupName = gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", _T("0"));
- if (wcscmp(CurrentGroupName.c_str(), NewGroupName.c_str()) != 0) {
+ if (mir_wstrcmp(CurrentGroupName.c_str(), NewGroupName.c_str()) != 0) {
bool GroupExist = Clist_GroupExists(NewGroupName.c_str()) != NULL;
db_set_ws(NULL,pluginName, "SpammersGroup", NewGroupName.c_str());
gbSpammersGroup = DBGetContactSettingStringPAN(NULL,pluginName,"SpammersGroup", _T("Spammers"));
@@ -331,7 +331,7 @@ INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
static tstring NewAGroupName, CurrentAGroupName;
NewAGroupName = GetDlgItemString(hwnd, IDC_AUTOADDGROUP);
CurrentAGroupName = gbAutoAuthGroup = DBGetContactSettingStringPAN(NULL, pluginName, "AutoAuthGroup", _T("0"));
- if (wcscmp(CurrentAGroupName.c_str(), NewAGroupName.c_str()) != 0) {
+ if (mir_wstrcmp(CurrentAGroupName.c_str(), NewAGroupName.c_str()) != 0) {
bool GroupExist = Clist_GroupExists(NewAGroupName.c_str()) != NULL;
db_set_ws(NULL,pluginName, "AutoAuthGroup", NewAGroupName.c_str());
gbAutoAuthGroup = DBGetContactSettingStringPAN(NULL,pluginName,"AutoAuthGroup", _T("Not Spammers"));
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index e966ef0c66..5474b3bab3 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -83,7 +83,7 @@ void DeleteCListGroupsByName(TCHAR* szGroupName)
TCHAR *szGroup;
for (int i=1; (szGroup = pcli->pfnGetGroupName(i, NULL)) != NULL; i++)
- if( !wcscmp(szGroupName, szGroup))
+ if( !mir_wstrcmp(szGroupName, szGroup))
CallService(MS_CLIST_GROUPDELETE, i, 0);
if(ConfirmDelete)
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index fb30a32607..a7e2b8e29b 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -496,8 +496,8 @@ LBL_SkipEnd:
ptrT szReplace;
if (!isRoom && !isTopic && g_Settings.bAddColonToAutoComplete && start == 0) {
szReplace = (TCHAR*)mir_alloc((mir_wstrlen(pszName) + 4) * sizeof(TCHAR));
- wcscpy(szReplace, pszName);
- wcscat(szReplace, L": ");
+ mir_wstrcpy(szReplace, pszName);
+ mir_wstrcat(szReplace, L": ");
pszName = szReplace;
}
SendMessage(hwnd, EM_SETSEL, start, end);
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 378b5a8869..54faf0ff79 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -984,7 +984,7 @@ void Utils::sanitizeFilename(wchar_t* tszFilename)
void Utils::ensureTralingBackslash(wchar_t *szPathname)
{
if (szPathname[mir_wstrlen(szPathname) - 1] != '\\')
- wcscat(szPathname, L"\\");
+ mir_wstrcat(szPathname, L"\\");
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1204,7 +1204,7 @@ LRESULT CWarning::show(const int uId, DWORD dwFlags, const wchar_t* tszTxt)
if (0 == (mask & val) || dwFlags & CWF_NOALLOWHIDE) {
wchar_t *s = reinterpret_cast<wchar_t *>(mir_alloc((mir_wstrlen(_s) + 1) * 2));
- wcscpy(s, _s);
+ mir_wstrcpy(s, _s);
separator_pos = wcschr(s, '|');
if (separator_pos) {
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp
index e34fe308c5..3f506bfb74 100644
--- a/plugins/YAMN/src/browser/mailbrowser.cpp
+++ b/plugins/YAMN/src/browser/mailbrowser.cpp
@@ -1384,11 +1384,11 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
if (!str2) { str2 = (WCHAR *)str_nul; }// the header value may be NULL
if (!From) if (!_stricmp(Header->name, "From")) {
From = new WCHAR[mir_wstrlen(str2) + 1];
- wcscpy(From, str2);
+ mir_wstrcpy(From, str2);
}
if (!Subj) if (!_stricmp(Header->name, "Subject")) {
Subj = new WCHAR[mir_wstrlen(str2) + 1];
- wcscpy(Subj, str2);
+ mir_wstrcpy(Subj, str2);
}
//if (!hasBody) if (!mir_strcmp(Header->name,"Body")) hasBody = true;
int count = 0; WCHAR **split = 0;
diff --git a/plugins/YAMN/src/mails/mime.cpp b/plugins/YAMN/src/mails/mime.cpp
index 582db8d5a2..aa0d0b0782 100644
--- a/plugins/YAMN/src/mails/mime.cpp
+++ b/plugins/YAMN/src/mails/mime.cpp
@@ -697,7 +697,7 @@ FailBackRaw:
destpos += 3;
ConvertStringToUnicode(infoline,CP_ACP,&temp);
size_t wsize = mir_wstrlen(temp);
- wcscpy(&dest[destpos],temp);
+ mir_wstrcpy(&dest[destpos],temp);
destpos += wsize;
delete[] temp;
}
@@ -705,7 +705,7 @@ FailBackRaw:
if (partData[i].wBody) {
size_t wsize = mir_wstrlen(partData[i].wBody);
- wcscpy(&dest[destpos],partData[i].wBody);
+ mir_wstrcpy(&dest[destpos],partData[i].wBody);
destpos += wsize;
delete[] partData[i].wBody;
}
diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
index f4bb745659..76d45d294a 100644
--- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp
+++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
@@ -1066,13 +1066,13 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara
if (NULL != ActualAccount->NewMailN.App)
delete[] ActualAccount->NewMailN.App;
ActualAccount->NewMailN.App=new WCHAR[mir_wstrlen(TextW)+1];
- wcscpy(ActualAccount->NewMailN.App,TextW);
+ mir_wstrcpy(ActualAccount->NewMailN.App,TextW);
GetDlgItemTextW(hDlg,IDC_EDITAPPPARAM,TextW,SIZEOF(TextW));
if (NULL != ActualAccount->NewMailN.AppParam)
delete[] ActualAccount->NewMailN.AppParam;
ActualAccount->NewMailN.AppParam=new WCHAR[mir_wstrlen(TextW)+1];
- wcscpy(ActualAccount->NewMailN.AppParam,TextW);
+ mir_wstrcpy(ActualAccount->NewMailN.AppParam,TextW);
ActualAccount->Server->Port=Port;
ActualAccount->Interval=Interval*60;
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp
index f694e17a27..67261cc058 100644
--- a/plugins/YAPP/src/services.cpp
+++ b/plugins/YAPP/src/services.cpp
@@ -305,7 +305,7 @@ static INT_PTR ShowMessageW(WPARAM wParam, LPARAM lParam)
if (db_get_b(0, "Popup", "ModuleIsEnabled", 1)) {
POPUPDATAW pd = {0};
- wcscpy(pd.lpwzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification");
+ mir_wstrcpy(pd.lpwzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification");
pd.lchIcon = LoadIcon(0, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION);
wcsncpy(pd.lpwzText, (wchar_t *)wParam, MAX_SECONDLINE);
CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, 0);
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index 1b1133c447..a469c5ea39 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -1003,7 +1003,7 @@ INT_PTR CIcqProto::GetXStatusEx(WPARAM hContact, LPARAM lParam)
char *str = getSettingStringUtf(hContact, DBSETTING_XSTATUS_NAME, "");
WCHAR *wstr = make_unicode_string(str);
- wcscpy(pData->pwszName, wstr);
+ mir_wstrcpy(pData->pwszName, wstr);
SAFE_FREE(&str);
SAFE_FREE(&wstr);
}
@@ -1023,7 +1023,7 @@ INT_PTR CIcqProto::GetXStatusEx(WPARAM hContact, LPARAM lParam)
char *str = getSettingStringUtf(hContact, CheckContactCapabilities(hContact, CAPF_STATUS_MOOD) ? DBSETTING_STATUS_NOTE : DBSETTING_XSTATUS_MSG, "");
WCHAR *wstr = make_unicode_string(str);
- wcscpy(pData->pwszMessage, wstr);
+ mir_wstrcpy(pData->pwszMessage, wstr);
SAFE_FREE(&str);
SAFE_FREE(&wstr);
}
diff --git a/protocols/MSN/src/msn_mime.cpp b/protocols/MSN/src/msn_mime.cpp
index 7c3274e6cf..9d70aeba6e 100644
--- a/protocols/MSN/src/msn_mime.cpp
+++ b/protocols/MSN/src/msn_mime.cpp
@@ -392,7 +392,7 @@ static size_t utf8toutf16(char* str, wchar_t* res)
{
wchar_t *dec = mir_utf8decodeW(str);
if (dec == NULL) dec = mir_a2u(str);
- wcscpy(res, dec);
+ mir_wstrcpy(res, dec);
mir_free(dec);
return mir_wstrlen(res);
}
diff --git a/src/modules/clist/contacts.cpp b/src/modules/clist/contacts.cpp
index d6dc9d044d..497527bc8d 100644
--- a/src/modules/clist/contacts.cpp
+++ b/src/modules/clist/contacts.cpp
@@ -187,7 +187,7 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam)
size_t len = mir_wstrlen(dbv.pwszVal) + mir_wstrlen(dbv2.pwszVal) + 2;
WCHAR* buf = (WCHAR*)mir_alloc(sizeof(WCHAR)*len);
if (buf != NULL)
- wcscat(wcscat(wcscpy(buf, dbv.pwszVal), L" "), dbv2.pwszVal);
+ mir_wstrcat(mir_wstrcat(mir_wstrcpy(buf, dbv.pwszVal), L" "), dbv2.pwszVal);
ci->pszVal = (TCHAR*)buf;
}
else {
@@ -312,7 +312,7 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam)
size_t len = mir_wstrlen(dbv.pwszVal) + mir_wstrlen(dbv2.pwszVal) + 2;
WCHAR* buf = (WCHAR*)mir_alloc(sizeof(WCHAR)*len);
if (buf != NULL)
- wcscat(wcscat(wcscpy(buf, dbv.pwszVal), L" "), dbv2.pwszVal);
+ mir_wstrcat(mir_wstrcat(mir_wstrcpy(buf, dbv.pwszVal), L" "), dbv2.pwszVal);
ci->pszVal = (TCHAR*)buf;
}
else {
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp
index 9dd7e5f9ee..4e863b235f 100644
--- a/src/modules/protocols/protoaccs.cpp
+++ b/src/modules/protocols/protoaccs.cpp
@@ -394,7 +394,7 @@ static INT_PTR stub43(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam)
p->format = tmp.format;
wchar_t filename[MAX_PATH];
- wcscpy(filename, tmp.filename);
+ mir_wstrcpy(filename, tmp.filename);
GetShortPathNameW(tmp.filename, filename, SIZEOF(filename));
WideCharToMultiByte(CP_ACP, 0, filename, -1, p->filename, MAX_PATH, 0, 0);
@@ -407,7 +407,7 @@ static INT_PTR stub44(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam)
int result = CallProtoServiceInt(NULL, ppi->m_szModuleName, PS_GETMYAVATARW, WPARAM(buf), lParam);
if (result == 0) {
wchar_t* filename = (wchar_t*)_alloca(sizeof(wchar_t) * (lParam + 1));
- wcscpy(filename, buf);
+ mir_wstrcpy(filename, buf);
GetShortPathNameW(buf, filename, lParam + 1);
WideCharToMultiByte(CP_ACP, 0, filename, -1, (char*)wParam, lParam, 0, 0);
diff --git a/src/modules/utils/timezones.cpp b/src/modules/utils/timezones.cpp
index 435d358220..961d6e6661 100644
--- a/src/modules/utils/timezones.cpp
+++ b/src/modules/utils/timezones.cpp
@@ -480,7 +480,7 @@ extern "C" __declspec(dllexport) void RecalculateTime(void)
tz.offset = INT_MIN;
if (!found) {
- if (!wcscmp(tz.tzi.StandardName, myInfo.myTZ.tzi.StandardName) || !wcscmp(tz.tzi.DaylightName, myInfo.myTZ.tzi.DaylightName)) {
+ if (!mir_wstrcmp(tz.tzi.StandardName, myInfo.myTZ.tzi.StandardName) || !mir_wstrcmp(tz.tzi.DaylightName, myInfo.myTZ.tzi.DaylightName)) {
_tcsncpy_s(myInfo.myTZ.tszName, tz.tszName, _TRUNCATE);
found = true;
}
diff --git a/src/modules/xml/xmlParser.cpp b/src/modules/xml/xmlParser.cpp
index 885d6d81c1..eae664e888 100644
--- a/src/modules/xml/xmlParser.cpp
+++ b/src/modules/xml/xmlParser.cpp
@@ -207,7 +207,7 @@ static inline int xstrnicmp(XMLCSTR c1, XMLCSTR c2, int l) { return _wcsnicmp(c1
static inline int xstrncmp(XMLCSTR c1, XMLCSTR c2, int l) { return wcsncmp(c1, c2, l);}
static inline int xstricmp(XMLCSTR c1, XMLCSTR c2) { return _wcsicmp(c1, c2); }
static inline XMLSTR xstrstr(XMLCSTR c1, XMLCSTR c2) { return (XMLSTR)wcsstr(c1, c2); }
-static inline XMLSTR xstrcpy(XMLSTR c1, XMLCSTR c2) { return (XMLSTR)wcscpy(c1, c2); }
+static inline XMLSTR xstrcpy(XMLSTR c1, XMLCSTR c2) { return (XMLSTR)mir_wstrcpy(c1, c2); }
#else
char *myWideCharToMultiByte(const wchar_t *s)
{
@@ -313,7 +313,7 @@ static inline int xstrnicmp(XMLCSTR c1, XMLCSTR c2, int l)
#endif
#endif
static inline XMLSTR xstrstr(XMLCSTR c1, XMLCSTR c2) { return (XMLSTR)wcsstr(c1, c2); }
-static inline XMLSTR xstrcpy(XMLSTR c1, XMLCSTR c2) { return (XMLSTR)wcscpy(c1, c2); }
+static inline XMLSTR xstrcpy(XMLSTR c1, XMLCSTR c2) { return (XMLSTR)mir_wstrcpy(c1, c2); }
static inline FILE *xfopen(XMLCSTR filename, XMLCSTR mode)
{
char *filenameAscii = myWideCharToMultiByte(filename);