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 /plugins/ListeningTo/src/players | |
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 'plugins/ListeningTo/src/players')
-rw-r--r-- | plugins/ListeningTo/src/players/foobar.cpp | 2 | ||||
-rw-r--r-- | plugins/ListeningTo/src/players/generic.cpp | 12 | ||||
-rw-r--r-- | plugins/ListeningTo/src/players/itunes.cpp | 14 | ||||
-rw-r--r-- | plugins/ListeningTo/src/players/itunes.h | 2 | ||||
-rw-r--r-- | plugins/ListeningTo/src/players/player.h | 6 | ||||
-rw-r--r-- | plugins/ListeningTo/src/players/watrack.cpp | 6 | ||||
-rw-r--r-- | plugins/ListeningTo/src/players/winamp.cpp | 2 | ||||
-rw-r--r-- | plugins/ListeningTo/src/players/wmp.cpp | 6 |
8 files changed, 25 insertions, 25 deletions
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);
|