summaryrefslogtreecommitdiff
path: root/plugins/ListeningTo
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/ListeningTo
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (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 'plugins/ListeningTo')
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp98
-rw-r--r--plugins/ListeningTo/src/options.cpp16
-rw-r--r--plugins/ListeningTo/src/options.h10
-rw-r--r--plugins/ListeningTo/src/players/foobar.cpp2
-rw-r--r--plugins/ListeningTo/src/players/generic.cpp12
-rw-r--r--plugins/ListeningTo/src/players/itunes.cpp14
-rw-r--r--plugins/ListeningTo/src/players/itunes.h2
-rw-r--r--plugins/ListeningTo/src/players/player.h6
-rw-r--r--plugins/ListeningTo/src/players/watrack.cpp6
-rw-r--r--plugins/ListeningTo/src/players/winamp.cpp2
-rw-r--r--plugins/ListeningTo/src/players/wmp.cpp6
-rw-r--r--plugins/ListeningTo/src/stdafx.h8
12 files changed, 91 insertions, 91 deletions
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index a383681c07..6292695560 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -62,7 +62,7 @@ INT_PTR ListeningToEnabled(WPARAM wParam, LPARAM lParam);
INT_PTR EnableListeningTo(WPARAM wParam, LPARAM lParam);
INT_PTR EnableListeningTo(char *proto = NULL, bool enabled = false);
INT_PTR GetTextFormat(WPARAM wParam, LPARAM lParam);
-TCHAR* GetParsedFormat(LISTENINGTOINFO *lti);
+wchar_t* GetParsedFormat(LISTENINGTOINFO *lti);
INT_PTR GetParsedFormat(WPARAM wParam, LPARAM lParam);
INT_PTR GetOverrideContactOption(WPARAM wParam, LPARAM lParam);
INT_PTR GetUnknownText(WPARAM wParam, LPARAM lParam);
@@ -73,21 +73,21 @@ INT_PTR HotkeysEnable(WPARAM wParam, LPARAM lParam);
INT_PTR HotkeysDisable(WPARAM wParam, LPARAM lParam);
INT_PTR HotkeysToggle(WPARAM wParam, LPARAM lParam);
-TCHAR* VariablesParseInfo(ARGUMENTSINFO *ai);
-TCHAR* VariablesParseType(ARGUMENTSINFO *ai);
-TCHAR* VariablesParseArtist(ARGUMENTSINFO *ai);
-TCHAR* VariablesParseAlbum(ARGUMENTSINFO *ai);
-TCHAR* VariablesParseTitle(ARGUMENTSINFO *ai);
-TCHAR* VariablesParseTrack(ARGUMENTSINFO *ai);
-TCHAR* VariablesParseYear(ARGUMENTSINFO *ai);
-TCHAR* VariablesParseGenre(ARGUMENTSINFO *ai);
-TCHAR* VariablesParseLength(ARGUMENTSINFO *ai);
-TCHAR* VariablesParsePlayer(ARGUMENTSINFO *ai);
+wchar_t* VariablesParseInfo(ARGUMENTSINFO *ai);
+wchar_t* VariablesParseType(ARGUMENTSINFO *ai);
+wchar_t* VariablesParseArtist(ARGUMENTSINFO *ai);
+wchar_t* VariablesParseAlbum(ARGUMENTSINFO *ai);
+wchar_t* VariablesParseTitle(ARGUMENTSINFO *ai);
+wchar_t* VariablesParseTrack(ARGUMENTSINFO *ai);
+wchar_t* VariablesParseYear(ARGUMENTSINFO *ai);
+wchar_t* VariablesParseGenre(ARGUMENTSINFO *ai);
+wchar_t* VariablesParseLength(ARGUMENTSINFO *ai);
+wchar_t* VariablesParsePlayer(ARGUMENTSINFO *ai);
#define XSTATUS_MUSIC 11
-#define UNKNOWN(_X_) ( _X_ == NULL || _X_[0] == _T('\0') ? opts.unknown : _X_ )
+#define UNKNOWN(_X_) ( _X_ == NULL || _X_[0] == '\0' ? opts.unknown : _X_ )
// Functions ////////////////////////////////////////////////////////////////////////////
@@ -185,7 +185,7 @@ void RebuildMenu()
if (info->hMenu != NULL)
Menu_RemoveItem(info->hMenu);
- TCHAR text[512];
+ wchar_t text[512];
mir_sntprintf(text, TranslateT("Send to %s"), info->account);
CMenuItem mi;
@@ -193,7 +193,7 @@ void RebuildMenu()
mi.root = hMainMenuGroup;
mi.position = 500080000 + i;
mi.pszService = MS_LISTENINGTO_MAINMENU;
- mi.name.t = text;
+ mi.name.w = text;
mi.flags = CMIF_TCHAR | CMIF_UNMOVABLE
| (ListeningToEnabled(info->proto, TRUE) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
@@ -205,7 +205,7 @@ void RebuildMenu()
UpdateGlobalStatusMenus();
}
-void RegisterProtocol(char *proto, TCHAR *account)
+void RegisterProtocol(char *proto, wchar_t *account)
{
if (!ProtoServiceExists(proto, PS_SET_LISTENINGTO) && !ProtoServiceExists(proto, PS_SETCUSTOMSTATUSEX) && !ProtoServiceExists(proto, PS_SETAWAYMSG))
return;
@@ -220,8 +220,8 @@ void RegisterProtocol(char *proto, TCHAR *account)
proto_items[id].hMenu = NULL;
proto_items[id].old_xstatus = 0;
- proto_items[id].old_xstatus_name[0] = _T('\0');
- proto_items[id].old_xstatus_message[0] = _T('\0');
+ proto_items[id].old_xstatus_name[0] = '\0';
+ proto_items[id].old_xstatus_message[0] = '\0';
}
@@ -236,7 +236,7 @@ int AccListChanged(WPARAM wParam, LPARAM lParam)
if (wParam == PRAC_UPGRADED || wParam == PRAC_CHANGED) {
mir_tstrncpy(info->account, proto->tszAccountName, _countof(info->account));
- TCHAR text[512];
+ wchar_t text[512];
mir_sntprintf(text, TranslateT("Send to %s"), info->account);
Menu_ModifyItem(info->hMenu, text);
}
@@ -286,7 +286,7 @@ int ModulesLoaded(WPARAM, LPARAM)
CMenuItem mi;
SET_UID(mi, 0xe8e4e594, 0x255e, 0x434d, 0x83, 0x74, 0x79, 0x44, 0x1b, 0x4e, 0xe7, 0x16);
mi.position = 500080000;
- mi.name.t = LPGENT("Listening to");
+ mi.name.w = LPGENW("Listening to");
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = iconList[0].hIcolib;
hMainMenuGroup = Menu_AddMainMenuItem(&mi);
@@ -298,7 +298,7 @@ int ModulesLoaded(WPARAM, LPARAM)
// Add all protos
SET_UID(mi, 0xc396a9dd, 0x9a00, 0x46af, 0x96, 0x2e, 0x5, 0x5a, 0xbc, 0x52, 0xfc, 0x9b);
- mi.name.t = LPGENT("Send to all protocols");
+ mi.name.w = LPGENW("Send to all protocols");
mi.flags = CMIF_TCHAR
| (ListeningToEnabled(NULL, true) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
@@ -307,8 +307,8 @@ int ModulesLoaded(WPARAM, LPARAM)
proto_items[0].proto[0] = 0;
proto_items[0].account[0] = 0;
proto_items[0].old_xstatus = 0;
- proto_items[0].old_xstatus_name[0] = _T('\0');
- proto_items[0].old_xstatus_message[0] = _T('\0');
+ proto_items[0].old_xstatus_name[0] = '\0';
+ proto_items[0].old_xstatus_message[0] = '\0';
// Add each proto
PROTOACCOUNT **protos;
@@ -529,8 +529,8 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL)
ProtocolInfo *pi = GetProtoInfo(proto);
if (pi != NULL) {
pi->old_xstatus = 0;
- pi->old_xstatus_name[0] = _T('\0');
- pi->old_xstatus_message[0] = _T('\0');
+ pi->old_xstatus_name[0] = '\0';
+ pi->old_xstatus_message[0] = '\0';
}
}
return;
@@ -538,13 +538,13 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL)
if (opts.xstatus_set == CHECK_XSTATUS_MUSIC) {
// Set text to nothing
- TCHAR *fr[] = {
+ wchar_t *fr[] = {
L"listening", opts.nothing
};
- Buffer<TCHAR> name;
+ Buffer<wchar_t> name;
ReplaceTemplate(&name, NULL, opts.xstatus_name, fr, _countof(fr));
- Buffer<TCHAR> msg;
+ Buffer<wchar_t> msg;
ReplaceTemplate(&msg, NULL, opts.xstatus_message, fr, _countof(fr));
ics.flags = CSSF_TCHAR | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE;
@@ -577,8 +577,8 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL)
if (pi != NULL) {
pi->old_xstatus = 0;
- pi->old_xstatus_name[0] = _T('\0');
- pi->old_xstatus_message[0] = _T('\0');
+ pi->old_xstatus_name[0] = '\0';
+ pi->old_xstatus_message[0] = '\0';
}
}
}
@@ -610,7 +610,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL)
}
}
- TCHAR *fr[] = {
+ wchar_t *fr[] = {
L"listening", GetParsedFormat(lti),
L"artist", UNKNOWN(lti->ptszArtist),
L"album", UNKNOWN(lti->ptszAlbum),
@@ -623,9 +623,9 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL)
L"type", UNKNOWN(lti->ptszType)
};
- Buffer<TCHAR> name;
+ Buffer<wchar_t> name;
ReplaceTemplate(&name, NULL, opts.xstatus_name, fr, _countof(fr));
- Buffer<TCHAR> msg;
+ Buffer<wchar_t> msg;
ReplaceTemplate(&msg, NULL, opts.xstatus_message, fr, _countof(fr));
status = XSTATUS_MUSIC;
@@ -716,12 +716,12 @@ INT_PTR GetTextFormat(WPARAM, LPARAM)
return (INT_PTR)mir_tstrdup(opts.templ);
}
-TCHAR *GetParsedFormat(LISTENINGTOINFO *lti)
+wchar_t *GetParsedFormat(LISTENINGTOINFO *lti)
{
if (lti == NULL)
return NULL;
- TCHAR *fr[] = {
+ wchar_t *fr[] = {
L"artist", UNKNOWN(lti->ptszArtist),
L"album", UNKNOWN(lti->ptszAlbum),
L"title", UNKNOWN(lti->ptszTitle),
@@ -733,7 +733,7 @@ TCHAR *GetParsedFormat(LISTENINGTOINFO *lti)
L"type", UNKNOWN(lti->ptszType)
};
- Buffer<TCHAR> ret;
+ Buffer<wchar_t> ret;
ReplaceTemplate(&ret, NULL, opts.templ, fr, _countof(fr));
return ret.detach();
}
@@ -759,7 +759,7 @@ void SetListeningInfos(LISTENINGTOINFO *lti)
for (unsigned int i = 1; i < proto_items.size(); ++i)
SetListeningInfo(proto_items[i].proto, lti);
- TCHAR *fr = NULL;
+ wchar_t *fr = NULL;
char *info = NULL;
if (lti) {
@@ -902,7 +902,7 @@ INT_PTR SetNewSong(WPARAM wParam, LPARAM lParam)
return 0;
}
-TCHAR* VariablesParseInfo(ARGUMENTSINFO *ai)
+wchar_t* VariablesParseInfo(ARGUMENTSINFO *ai)
{
if (ai->cbSize < sizeof(ARGUMENTSINFO))
return NULL;
@@ -913,7 +913,7 @@ TCHAR* VariablesParseInfo(ARGUMENTSINFO *ai)
return mir_tstrdup(L"");
}
- TCHAR *fr[] = {
+ wchar_t *fr[] = {
L"artist", UNKNOWN(lti->ptszArtist),
L"album", UNKNOWN(lti->ptszAlbum),
L"title", UNKNOWN(lti->ptszTitle),
@@ -925,7 +925,7 @@ TCHAR* VariablesParseInfo(ARGUMENTSINFO *ai)
L"type", UNKNOWN(lti->ptszType)
};
- Buffer<TCHAR> ret;
+ Buffer<wchar_t> ret;
ReplaceTemplate(&ret, NULL, opts.templ, fr, _countof(fr));
return ret.detach();
}
@@ -948,52 +948,52 @@ TCHAR* VariablesParseInfo(ARGUMENTSINFO *ai)
else \
{ \
ai->flags = AIF_DONTPARSE; \
- TCHAR *ret = mir_tstrdup(lti->__field__); \
+ wchar_t *ret = mir_tstrdup(lti->__field__); \
return ret; \
}
-TCHAR* VariablesParseType(ARGUMENTSINFO *ai)
+wchar_t* VariablesParseType(ARGUMENTSINFO *ai)
{
VARIABLES_PARSE_BODY(ptszType);
}
-TCHAR* VariablesParseArtist(ARGUMENTSINFO *ai)
+wchar_t* VariablesParseArtist(ARGUMENTSINFO *ai)
{
VARIABLES_PARSE_BODY(ptszArtist);
}
-TCHAR* VariablesParseAlbum(ARGUMENTSINFO *ai)
+wchar_t* VariablesParseAlbum(ARGUMENTSINFO *ai)
{
VARIABLES_PARSE_BODY(ptszAlbum);
}
-TCHAR* VariablesParseTitle(ARGUMENTSINFO *ai)
+wchar_t* VariablesParseTitle(ARGUMENTSINFO *ai)
{
VARIABLES_PARSE_BODY(ptszTitle);
}
-TCHAR* VariablesParseTrack(ARGUMENTSINFO *ai)
+wchar_t* VariablesParseTrack(ARGUMENTSINFO *ai)
{
VARIABLES_PARSE_BODY(ptszTrack);
}
-TCHAR* VariablesParseYear(ARGUMENTSINFO *ai)
+wchar_t* VariablesParseYear(ARGUMENTSINFO *ai)
{
VARIABLES_PARSE_BODY(ptszYear);
}
-TCHAR* VariablesParseGenre(ARGUMENTSINFO *ai)
+wchar_t* VariablesParseGenre(ARGUMENTSINFO *ai)
{
VARIABLES_PARSE_BODY(ptszGenre);
}
-TCHAR* VariablesParseLength(ARGUMENTSINFO *ai)
+wchar_t* VariablesParseLength(ARGUMENTSINFO *ai)
{
VARIABLES_PARSE_BODY(ptszLength);
}
-TCHAR* VariablesParsePlayer(ARGUMENTSINFO *ai)
+wchar_t* VariablesParsePlayer(ARGUMENTSINFO *ai)
{
VARIABLES_PARSE_BODY(ptszPlayer);
}
diff --git a/plugins/ListeningTo/src/options.cpp b/plugins/ListeningTo/src/options.cpp
index 2e36c42b2a..121a5e5869 100644
--- a/plugins/ListeningTo/src/options.cpp
+++ b/plugins/ListeningTo/src/options.cpp
@@ -52,10 +52,10 @@ static OptPageControl optionsControls[] = {
static OptPageControl formatControls[] = {
{ &opts.templ, CONTROL_TEXT, IDC_TEMPLATE, "Template", (ULONG_PTR)L"%artist% - %title%" },
- { &opts.unknown, CONTROL_TEXT, IDC_UNKNOWN, "Unknown", (ULONG_PTR)LPGENT("<Unknown>"), 0, 0, 128 },
- { &opts.xstatus_name, CONTROL_TEXT, IDC_XSTATUS_NAME, "XStatusName", (ULONG_PTR)LPGENT("Listening to") },
+ { &opts.unknown, CONTROL_TEXT, IDC_UNKNOWN, "Unknown", (ULONG_PTR)LPGENW("<Unknown>"), 0, 0, 128 },
+ { &opts.xstatus_name, CONTROL_TEXT, IDC_XSTATUS_NAME, "XStatusName", (ULONG_PTR)LPGENW("Listening to") },
{ &opts.xstatus_message, CONTROL_TEXT, IDC_XSTATUS_MESSAGE, "XStatusMessage", (ULONG_PTR)L"%listening%" },
- { &opts.nothing, CONTROL_TEXT, IDC_NOTHING, "Nothing", (ULONG_PTR)LPGENT("<Nothing is playing now>"), 0, 0, 128 }
+ { &opts.nothing, CONTROL_TEXT, IDC_NOTHING, "Nothing", (ULONG_PTR)LPGENW("<Nothing is playing now>"), 0, 0, 128 }
};
static OptPageControl playersControls[] = {
@@ -131,11 +131,11 @@ BOOL IsTypeEnabled(LISTENINGTOINFO *lti)
return TRUE;
if (lti->dwFlags & LTI_UNICODE) {
- if (mir_tstrcmpi(lti->ptszType, LPGENT("Music")) == 0)
+ if (mir_tstrcmpi(lti->ptszType, LPGENW("Music")) == 0)
return opts.enable_music;
- if (mir_tstrcmpi(lti->ptszType, LPGENT("Radio")) == 0)
+ if (mir_tstrcmpi(lti->ptszType, LPGENW("Radio")) == 0)
return opts.enable_radio;
- if (mir_tstrcmpi(lti->ptszType, LPGENT("Video")) == 0)
+ if (mir_tstrcmpi(lti->ptszType, LPGENW("Video")) == 0)
return opts.enable_video;
return opts.enable_others;
}
@@ -192,9 +192,9 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM)L"2");
if (total > 0) {
- TCHAR tmp[10];
+ wchar_t tmp[10];
for (int i = first; i <= total; i++)
- SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM)_itot(i - first + 3, tmp, 10));
+ SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM)_itow(i - first + 3, tmp, 10));
}
}
diff --git a/plugins/ListeningTo/src/options.h b/plugins/ListeningTo/src/options.h
index 0aff9030fd..002237cf17 100644
--- a/plugins/ListeningTo/src/options.h
+++ b/plugins/ListeningTo/src/options.h
@@ -48,8 +48,8 @@ struct Options {
bool enable_video;
bool enable_others;
- TCHAR templ[1024];
- TCHAR unknown[128];
+ wchar_t templ[1024];
+ wchar_t unknown[128];
bool override_contact_template;
bool show_adv_icon;
@@ -61,9 +61,9 @@ struct Options {
int time_to_pool;
WORD xstatus_set;
- TCHAR xstatus_name[1024];
- TCHAR xstatus_message[1024];
- TCHAR nothing[128];
+ wchar_t xstatus_name[1024];
+ wchar_t xstatus_message[1024];
+ wchar_t nothing[128];
};
extern Options opts;
diff --git a/plugins/ListeningTo/src/players/foobar.cpp b/plugins/ListeningTo/src/players/foobar.cpp
index eb06043b11..8e9f14eaac 100644
--- a/plugins/ListeningTo/src/players/foobar.cpp
+++ b/plugins/ListeningTo/src/players/foobar.cpp
@@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA.
#include "../stdafx.h"
-static TCHAR *wcs[] = {
+static wchar_t *wcs[] = {
L"{DA7CD0DE-1602-45e6-89A1-C2CA151E008E}/1", // Foobar 0.9.1
L"{DA7CD0DE-1602-45e6-89A1-C2CA151E008E}",
L"{97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}", // Foobar 0.9.5.3
diff --git a/plugins/ListeningTo/src/players/generic.cpp b/plugins/ListeningTo/src/players/generic.cpp
index 62456fd480..551d0d2a5e 100644
--- a/plugins/ListeningTo/src/players/generic.cpp
+++ b/plugins/ListeningTo/src/players/generic.cpp
@@ -24,7 +24,7 @@ static HANDLE hLog = NULL;
GenericPlayer *singleton = NULL;
-void m_log(const TCHAR *function, const TCHAR *fmt, ...)
+void m_log(const wchar_t *function, const wchar_t *fmt, ...)
{
if (hLog == NULL) {
hLog = mir_createLog(MODULE_NAME, L"ListeningTo log", L"c:\\temp\\listeningto.txt", 0);
@@ -80,7 +80,7 @@ GenericPlayer::GenericPlayer()
RegisterClass(&wc);
- hWnd = CreateWindow(MIRANDA_WINDOWCLASS, LPGENT("Miranda ListeningTo receiver"),
+ hWnd = CreateWindow(MIRANDA_WINDOWCLASS, LPGENW("Miranda ListeningTo receiver"),
0, 0, 0, 0, 0, NULL, NULL, hInst, NULL);
}
@@ -118,14 +118,14 @@ void GenericPlayer::ProcessReceived()
int pCount = 0;
WCHAR *p = received;
do {
- *p1 = _T('\0');
+ *p1 = '\0';
parts[pCount] = p;
pCount++;
p = p1 + 2;
p1 = wcsstr(p, L"\\0");
} while (p1 != NULL && pCount < 10);
if (p1 != NULL)
- *p1 = _T('\0');
+ *p1 = '\0';
parts[pCount] = p;
if (pCount < 5)
@@ -170,7 +170,7 @@ void GenericPlayer::ProcessReceived()
if (parts[9] != NULL) {
long length = _wtoi(parts[9]);
if (length > 0) {
- li->ptszLength = (TCHAR*)mir_alloc(10 * sizeof(TCHAR));
+ li->ptszLength = (wchar_t*)mir_alloc(10 * sizeof(wchar_t));
int s = length % 60;
int m = (length / 60) % 60;
@@ -212,7 +212,7 @@ static VOID CALLBACK SendTimerProc(HWND, UINT, UINT_PTR, DWORD)
void GenericPlayer::NewData(const WCHAR *data, size_t len)
{
- if (data[0] == _T('\0'))
+ if (data[0] == '\0')
return;
mir_cslock lck(cs);
diff --git a/plugins/ListeningTo/src/players/itunes.cpp b/plugins/ListeningTo/src/players/itunes.cpp
index 79cea49a13..fa6f2478e6 100644
--- a/plugins/ListeningTo/src/players/itunes.cpp
+++ b/plugins/ListeningTo/src/players/itunes.cpp
@@ -103,14 +103,14 @@ BOOL ITunes::FillCache()
CALL(track->get_Year(&lret));
if (lret > 0) {
- listening_info.ptszYear = (TCHAR*)mir_alloc(10 * sizeof(TCHAR));
- _itot(lret, listening_info.ptszYear, 10);
+ listening_info.ptszYear = (wchar_t*)mir_alloc(10 * sizeof(wchar_t));
+ _itow(lret, listening_info.ptszYear, 10);
}
CALL(track->get_TrackNumber(&lret));
if (lret > 0) {
- listening_info.ptszTrack = (TCHAR*)mir_alloc(10 * sizeof(TCHAR));
- _itot(lret, listening_info.ptszTrack, 10);
+ listening_info.ptszTrack = (wchar_t*)mir_alloc(10 * sizeof(wchar_t));
+ _itow(lret, listening_info.ptszTrack, 10);
}
CALL(track->get_Genre(&ret));
@@ -118,7 +118,7 @@ BOOL ITunes::FillCache()
CALL(track->get_Duration(&lret));
if (lret > 0) {
- listening_info.ptszLength = (TCHAR*)mir_alloc(10 * sizeof(TCHAR));
+ listening_info.ptszLength = (wchar_t*)mir_alloc(10 * sizeof(wchar_t));
int s = lret % 60;
int m = (lret / 60) % 60;
@@ -142,9 +142,9 @@ BOOL ITunes::FillCache()
listening_info.ptszTitle = mir_u2t(p);
- TCHAR *pt = _tcsrchr(listening_info.ptszTitle, '.');
+ wchar_t *pt = wcsrchr(listening_info.ptszTitle, '.');
if (pt != NULL)
- *p = _T('\0');
+ *p = '\0';
}
listening_info.ptszPlayer = mir_tstrdup(name);
diff --git a/plugins/ListeningTo/src/players/itunes.h b/plugins/ListeningTo/src/players/itunes.h
index bce9318f1a..cc5c496910 100644
--- a/plugins/ListeningTo/src/players/itunes.h
+++ b/plugins/ListeningTo/src/players/itunes.h
@@ -38,7 +38,7 @@ protected:
BOOL InitTempData();
void FreeTempData();
BOOL InitAndGetFilename();
- int GetMetadata(char *metadata, TCHAR **data);
+ int GetMetadata(char *metadata, wchar_t **data);
BOOL FillCache();
public:
diff --git a/plugins/ListeningTo/src/players/player.h b/plugins/ListeningTo/src/players/player.h
index 83a14e3a69..f5505b7374 100644
--- a/plugins/ListeningTo/src/players/player.h
+++ b/plugins/ListeningTo/src/players/player.h
@@ -29,7 +29,7 @@ protected:
public:
BOOL enabled;
BOOL needPoll;
- TCHAR *name;
+ wchar_t *name;
Player();
virtual ~Player();
@@ -48,7 +48,7 @@ public:
class ExternalPlayer : public Player
{
protected:
- TCHAR **window_classes;
+ wchar_t **window_classes;
int num_window_classes;
BOOL found_window;
@@ -66,7 +66,7 @@ class CodeInjectionPlayer : public ExternalPlayer
{
protected:
char *dll_name;
- TCHAR *message_window_class;
+ wchar_t *message_window_class;
DWORD next_request_time;
virtual void InjectCode();
diff --git a/plugins/ListeningTo/src/players/watrack.cpp b/plugins/ListeningTo/src/players/watrack.cpp
index 3a7cd24a0f..d76b79571b 100644
--- a/plugins/ListeningTo/src/players/watrack.cpp
+++ b/plugins/ListeningTo/src/players/watrack.cpp
@@ -88,14 +88,14 @@ void WATrack::GetData()
listening_info.ptszYear = DUP(si->year);
if (si->track > 0) {
- listening_info.ptszTrack = (TCHAR*)mir_alloc(10 * sizeof(TCHAR));
- _itot(si->track, listening_info.ptszTrack, 10);
+ listening_info.ptszTrack = (wchar_t*)mir_alloc(10 * sizeof(wchar_t));
+ _itow(si->track, listening_info.ptszTrack, 10);
}
listening_info.ptszGenre = DUP(si->genre);
if (si->total > 0) {
- listening_info.ptszLength = (TCHAR*)mir_alloc(10 * sizeof(TCHAR));
+ listening_info.ptszLength = (wchar_t*)mir_alloc(10 * sizeof(wchar_t));
int s = si->total % 60;
int m = (si->total / 60) % 60;
diff --git a/plugins/ListeningTo/src/players/winamp.cpp b/plugins/ListeningTo/src/players/winamp.cpp
index 35bfde5cfe..685459fb63 100644
--- a/plugins/ListeningTo/src/players/winamp.cpp
+++ b/plugins/ListeningTo/src/players/winamp.cpp
@@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA.
#include "../stdafx.h"
-static TCHAR *wcs[] = {
+static wchar_t *wcs[] = {
L"Winamp v1.x"
};
diff --git a/plugins/ListeningTo/src/players/wmp.cpp b/plugins/ListeningTo/src/players/wmp.cpp
index 639c384b40..c3131e8718 100644
--- a/plugins/ListeningTo/src/players/wmp.cpp
+++ b/plugins/ListeningTo/src/players/wmp.cpp
@@ -30,7 +30,7 @@ WindowsMediaPlayer *singleton = NULL;
WindowsMediaPlayer::WindowsMediaPlayer()
{
name = L"WindowsMediaPlayer";
- received[0] = _T('\0');
+ received[0] = '\0';
singleton = this;
WNDCLASS wc = { 0 };
@@ -40,7 +40,7 @@ WindowsMediaPlayer::WindowsMediaPlayer()
RegisterClass(&wc);
- hWnd = CreateWindow(WMP_WINDOWCLASS, LPGENT("Miranda ListeningTo WMP receiver"),
+ hWnd = CreateWindow(WMP_WINDOWCLASS, LPGENW("Miranda ListeningTo WMP receiver"),
0, 0, 0, 0, 0, NULL, NULL, hInst, NULL);
}
@@ -132,7 +132,7 @@ void WindowsMediaPlayer::NewData(const WCHAR *data, size_t len)
len = min(len, 1023);
if (wcsncmp(received, data, len) != 0) {
wcsncpy(received, data, len);
- received[len] = _T('\0');
+ received[len] = '\0';
if (hTimer)
KillTimer(NULL, hTimer);
diff --git a/plugins/ListeningTo/src/stdafx.h b/plugins/ListeningTo/src/stdafx.h
index 81ba49f016..535d581660 100644
--- a/plugins/ListeningTo/src/stdafx.h
+++ b/plugins/ListeningTo/src/stdafx.h
@@ -87,15 +87,15 @@ void StartTimer();
struct ProtocolInfo
{
char proto[128];
- TCHAR account[128];
+ wchar_t account[128];
HGENMENU hMenu;
int old_xstatus;
- TCHAR old_xstatus_name[1024];
- TCHAR old_xstatus_message[1024];
+ wchar_t old_xstatus_name[1024];
+ wchar_t old_xstatus_message[1024];
};
ProtocolInfo *GetProtoInfo(char *proto);
-void m_log(const TCHAR *function, const TCHAR *fmt, ...);
+void m_log(const wchar_t *function, const wchar_t *fmt, ...);
static bool IsEmpty(const char *str)