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/Variables/src/parse_external.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 'plugins/Variables/src/parse_external.cpp')
-rw-r--r-- | plugins/Variables/src/parse_external.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/plugins/Variables/src/parse_external.cpp b/plugins/Variables/src/parse_external.cpp index 4dca2905f2..873be4f90b 100644 --- a/plugins/Variables/src/parse_external.cpp +++ b/plugins/Variables/src/parse_external.cpp @@ -19,7 +19,7 @@ #include "stdafx.h"
-static TCHAR *getFullWinampTitleText()
+static wchar_t *getFullWinampTitleText()
{
HWND hwndWinamp = FindWindow(L"STUDIO", NULL);
if (hwndWinamp == NULL)
@@ -29,7 +29,7 @@ static TCHAR *getFullWinampTitleText() return NULL;
SIZE_T dwWinTextLength = (GetWindowTextLength(hwndWinamp) + 1);
- TCHAR *szWinText = (TCHAR*)mir_alloc(dwWinTextLength * sizeof(TCHAR));
+ wchar_t *szWinText = (wchar_t*)mir_alloc(dwWinTextLength * sizeof(wchar_t));
if (szWinText == NULL)
return NULL;
@@ -37,7 +37,7 @@ static TCHAR *getFullWinampTitleText() mir_free(szWinText);
return NULL;
}
- TCHAR *szTitle = (TCHAR*)mir_alloc((2 * mir_tstrlen(szWinText) + 1)*sizeof(TCHAR));
+ wchar_t *szTitle = (wchar_t*)mir_alloc((2 * mir_tstrlen(szWinText) + 1)*sizeof(wchar_t));
if (szTitle == NULL) {
mir_free(szWinText);
return NULL;
@@ -49,19 +49,19 @@ static TCHAR *getFullWinampTitleText() return szTitle;
}
-static TCHAR *parseWinampSong(ARGUMENTSINFO *ai)
+static wchar_t *parseWinampSong(ARGUMENTSINFO *ai)
{
if (ai->argc != 1)
return NULL;
- TCHAR *res = NULL;
- TCHAR *szTitle = getFullWinampTitleText();
+ wchar_t *res = NULL;
+ wchar_t *szTitle = getFullWinampTitleText();
if (szTitle == NULL)
return NULL;
- TCHAR *scur = _tcschr(szTitle, '.');
- TCHAR *cur;
- if ((scur == NULL) || ((cur = _tcsstr(scur, L" - Winamp")) == NULL) || (scur >= cur) || (scur > (szTitle + mir_tstrlen(szTitle) - 2)) || (cur > (szTitle + mir_tstrlen(szTitle)))) {
+ wchar_t *scur = wcschr(szTitle, '.');
+ wchar_t *cur;
+ if ((scur == NULL) || ((cur = wcsstr(scur, L" - Winamp")) == NULL) || (scur >= cur) || (scur > (szTitle + mir_tstrlen(szTitle) - 2)) || (cur > (szTitle + mir_tstrlen(szTitle)))) {
mir_free(szTitle);
return NULL;
}
@@ -75,23 +75,23 @@ static TCHAR *parseWinampSong(ARGUMENTSINFO *ai) return res;
}
-static TCHAR *parseWinampState(ARGUMENTSINFO *ai)
+static wchar_t *parseWinampState(ARGUMENTSINFO *ai)
{
if (ai->argc != 1)
return NULL;
- TCHAR *res = NULL;
- TCHAR *szTitle = getFullWinampTitleText();
+ wchar_t *res = NULL;
+ wchar_t *szTitle = getFullWinampTitleText();
if (szTitle == NULL)
return NULL;
- TCHAR *scur = _tcschr(szTitle, '.');
- TCHAR *cur;
- if (scur == NULL || (cur = _tcsstr(scur, L" - Winamp")) == NULL)
+ wchar_t *scur = wcschr(szTitle, '.');
+ wchar_t *cur;
+ if (scur == NULL || (cur = wcsstr(scur, L" - Winamp")) == NULL)
res = mir_tstrdup(TranslateT("Stopped"));
- else if ((!_tcsncmp(cur + 10, L"[Stopped]", 9)))
+ else if ((!wcsncmp(cur + 10, L"[Stopped]", 9)))
res = mir_tstrdup(TranslateT("Stopped"));
- else if ((!_tcsncmp(cur + 10, L"[Paused]", 8)))
+ else if ((!wcsncmp(cur + 10, L"[Paused]", 8)))
res = mir_tstrdup(TranslateT("Paused"));
else
res = mir_tstrdup(L"Playing");
|