From 2a815f8820ca402626bd283dd5b75744ddeb9812 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 23 May 2015 18:55:59 +0000 Subject: mir_tstrncpy <> _tcsncpy git-svn-id: http://svn.miranda-ng.org/main/trunk@13791 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Exchange/src/MirandaExchange.cpp | 2 +- plugins/Exchange/src/utils.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins/Exchange') diff --git a/plugins/Exchange/src/MirandaExchange.cpp b/plugins/Exchange/src/MirandaExchange.cpp index 6b4a6996e5..52a21e8a18 100644 --- a/plugins/Exchange/src/MirandaExchange.cpp +++ b/plugins/Exchange/src/MirandaExchange.cpp @@ -435,7 +435,7 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass TCHAR szPID[20]; _tstrtime(szPID); - mir_tstrncpy(szPIDandName, m_szUsername, SIZEOF(szPIDandName)-1); + _tcsncpy(szPIDandName, m_szUsername, SIZEOF(szPIDandName)-1); mir_tstrncat(szPIDandName, szPID, SIZEOF(szPIDandName) - mir_tstrlen(szPIDandName)); hr = CreateProfile(szPIDandName); diff --git a/plugins/Exchange/src/utils.cpp b/plugins/Exchange/src/utils.cpp index 0186ea9a07..e89a170732 100644 --- a/plugins/Exchange/src/utils.cpp +++ b/plugins/Exchange/src/utils.cpp @@ -95,15 +95,15 @@ char *BinToHex(int size, PBYTE data) void HexToBin(TCHAR *inData, ULONG &size, LPBYTE &outData) { TCHAR buffer[32] = {0}; - mir_tstrncpy(buffer, _T("0x"),_countof(_T("0x"))); - mir_tstrncpy(buffer + 2, inData, HEX_SIZE); + _tcsncpy(buffer, _T("0x"),_countof(_T("0x"))); + _tcsncpy(buffer + 2, inData, HEX_SIZE); _stscanf(buffer, _T("%x"), &size); outData = (unsigned char*)new char[size*2]; TCHAR *tmp = inData + HEX_SIZE; buffer[4] = '\0'; //mark the end of the string for (UINT i = 0; i < size; i++) { - mir_tstrncpy(buffer + 2, &tmp[i * 2], 2); + _tcsncpy(buffer + 2, &tmp[i * 2], 2); _stscanf(buffer, _T("%x"), &outData[i]); } } @@ -118,7 +118,7 @@ int GetStringFromDatabase(char *szSettingName, TCHAR *szError, TCHAR *szResult, res = 0; int tmp = mir_tstrlen(dbv.ptszVal); len = (tmp < size - 1) ? tmp : size - 1; - mir_tstrncpy(szResult, dbv.ptszVal, len); + _tcsncpy(szResult, dbv.ptszVal, len); szResult[len] = '\0'; mir_free(dbv.ptszVal); } @@ -126,7 +126,7 @@ int GetStringFromDatabase(char *szSettingName, TCHAR *szError, TCHAR *szResult, res = 1; int tmp = mir_tstrlen(szError); len = (tmp < size - 1) ? tmp : size - 1; - mir_tstrncpy(szResult, szError, len); + _tcsncpy(szResult, szError, len); szResult[len] = '\0'; } return res; @@ -225,7 +225,7 @@ void _popupUtil(TCHAR* szMsg) { POPUPDATAT ppd = {0}; ppd.lchIcon = hiMailIcon; - mir_tstrncpy(ppd.lptzContactName, _T("Exchange notifier"), MAX_CONTACTNAME-1); - mir_tstrncpy(ppd.lptzText, szMsg,MAX_SECONDLINE-1); + _tcsncpy(ppd.lptzContactName, _T("Exchange notifier"), MAX_CONTACTNAME-1); + _tcsncpy(ppd.lptzText, szMsg,MAX_SECONDLINE-1); PUAddPopupT(&ppd); //show a popup to tell the user what we're doing. } -- cgit v1.2.3