From 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Jul 2016 09:20:25 +0000 Subject: 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 --- plugins/Variables/src/parse_external.cpp | 34 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'plugins/Variables/src/parse_external.cpp') 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"); -- cgit v1.2.3