diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /protocols/MSN/src/msn_svcs.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_svcs.cpp')
-rw-r--r-- | protocols/MSN/src/msn_svcs.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 0a9e5b5b0b..a0cc11efe2 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -41,14 +41,14 @@ INT_PTR CMsnProto::GetMyAwayMsg(WPARAM wParam, LPARAM lParam) INT_PTR CMsnProto::GetAvatar(WPARAM wParam, LPARAM lParam)
{
- TCHAR* buf = (TCHAR*)wParam;
+ wchar_t* buf = (wchar_t*)wParam;
int size = (int)lParam;
if (buf == NULL || size <= 0)
return -1;
MSN_GetAvatarFileName(NULL, buf, size, NULL);
- return _taccess(buf, 0);
+ return _waccess(buf, 0);
}
@@ -64,7 +64,7 @@ void CMsnProto::sttFakeAvatarAck(void* arg) INT_PTR CMsnProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
{
PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION*)lParam;
- TCHAR filename[MAX_PATH];
+ wchar_t filename[MAX_PATH];
MsnContact *cont = NULL;
if (pai->hContact) {
@@ -185,11 +185,11 @@ INT_PTR CMsnProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) INT_PTR CMsnProto::SetAvatar(WPARAM, LPARAM lParam)
{
- TCHAR* szFileName = (TCHAR*)lParam;
+ wchar_t* szFileName = (wchar_t*)lParam;
- TCHAR tFileName[MAX_PATH];
+ wchar_t tFileName[MAX_PATH];
MSN_GetAvatarFileName(NULL, tFileName, _countof(tFileName), NULL);
- _tremove(tFileName);
+ _wremove(tFileName);
if (szFileName == NULL) {
delSetting("PictObject");
@@ -197,7 +197,7 @@ INT_PTR CMsnProto::SetAvatar(WPARAM, LPARAM lParam) ForkThread(&CMsnProto::msn_storeAvatarThread, NULL);
}
else {
- int fileId = _topen(szFileName, _O_RDONLY | _O_BINARY, _S_IREAD);
+ int fileId = _wopen(szFileName, _O_RDONLY | _O_BINARY, _S_IREAD);
if (fileId < 0) return 1;
size_t dwPngSize = _filelengthi64(fileId);
@@ -210,8 +210,8 @@ INT_PTR CMsnProto::SetAvatar(WPARAM, LPARAM lParam) _read(fileId, pData, (unsigned)dwPngSize);
_close(fileId);
- TCHAR drive[_MAX_DRIVE], dir[_MAX_DIR], fname[_MAX_FNAME], ext[_MAX_EXT];
- _tsplitpath(szFileName, drive, dir, fname, ext);
+ wchar_t drive[_MAX_DRIVE], dir[_MAX_DIR], fname[_MAX_FNAME], ext[_MAX_EXT];
+ _wsplitpath(szFileName, drive, dir, fname, ext);
MSN_SetMyAvatar(fname, pData, dwPngSize);
@@ -355,11 +355,11 @@ INT_PTR CMsnProto::SetCurrentMedia(WPARAM, LPARAM lParam) if (msnCurrentMedia.cbSize == 0)
delSetting("ListeningTo");
else {
- TCHAR *text;
+ wchar_t *text;
if (ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT))
- text = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%title% - %artist%", (LPARAM)&msnCurrentMedia);
+ text = (wchar_t *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%title% - %artist%", (LPARAM)&msnCurrentMedia);
else {
- text = (TCHAR *)mir_alloc(128 * sizeof(TCHAR));
+ text = (wchar_t *)mir_alloc(128 * sizeof(wchar_t));
mir_sntprintf(text, 128, L"%s - %s", (msnCurrentMedia.ptszTitle ? msnCurrentMedia.ptszTitle : L""),
(msnCurrentMedia.ptszArtist ? msnCurrentMedia.ptszArtist : L""));
}
|