diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-23 18:55:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-23 18:55:59 +0000 |
commit | 2a815f8820ca402626bd283dd5b75744ddeb9812 (patch) | |
tree | b230e7ac7d0330f5a1a0c8891d0a7dda9c5b47c6 /plugins/Exchange/src/utils.cpp | |
parent | 9a177a4e355c52775b580ad5687db2120f9282d5 (diff) |
mir_tstrncpy <> _tcsncpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13791 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Exchange/src/utils.cpp')
-rw-r--r-- | plugins/Exchange/src/utils.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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.
}
|