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 --- protocols/MSN/src/msn_libstr.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'protocols/MSN/src/msn_libstr.cpp') diff --git a/protocols/MSN/src/msn_libstr.cpp b/protocols/MSN/src/msn_libstr.cpp index 3ce9e5a841..9e0cd37318 100644 --- a/protocols/MSN/src/msn_libstr.cpp +++ b/protocols/MSN/src/msn_libstr.cpp @@ -22,7 +22,7 @@ along with this program. If not, see . #include "stdafx.h" -static TCHAR* a2tf(const TCHAR* str, bool unicode) +static wchar_t* a2tf(const wchar_t* str, bool unicode) { if (str == NULL) return NULL; @@ -30,7 +30,7 @@ static TCHAR* a2tf(const TCHAR* str, bool unicode) return unicode ? mir_tstrdup(str) : mir_a2t((char*)str); } -void overrideStr(TCHAR*& dest, const TCHAR* src, bool unicode, const TCHAR* def) +void overrideStr(wchar_t*& dest, const wchar_t* src, bool unicode, const wchar_t* def) { mir_free(dest); dest = NULL; @@ -298,21 +298,21 @@ void stripHTML(char* str) // Process a string, and double all % characters, according to chat.dll's restrictions // Returns a pointer to the new string (old one is not freed) -TCHAR* EscapeChatTags(const TCHAR* pszText) +wchar_t* EscapeChatTags(const wchar_t* pszText) { int nChars = 0; - for (const TCHAR* p = pszText; (p = _tcschr(p, '%')) != NULL; p++) + for (const wchar_t* p = pszText; (p = wcschr(p, '%')) != NULL; p++) nChars++; if (nChars == 0) return mir_tstrdup(pszText); - TCHAR *pszNewText = (TCHAR*)mir_alloc(sizeof(TCHAR)*(mir_tstrlen(pszText) + 1 + nChars)); + wchar_t *pszNewText = (wchar_t*)mir_alloc(sizeof(wchar_t)*(mir_tstrlen(pszText) + 1 + nChars)); if (pszNewText == NULL) return mir_tstrdup(pszText); - const TCHAR *s = pszText; - TCHAR *d = pszNewText; + const wchar_t *s = pszText; + wchar_t *d = pszNewText; while (*s) { if (*s == '%') *d++ = '%'; @@ -322,9 +322,9 @@ TCHAR* EscapeChatTags(const TCHAR* pszText) return pszNewText; } -TCHAR* UnEscapeChatTags(TCHAR* str_in) +wchar_t* UnEscapeChatTags(wchar_t* str_in) { - TCHAR *s = str_in, *d = str_in; + wchar_t *s = str_in, *d = str_in; while (*s) { if ((*s == '%' && s[1] == '%') || (*s == '\n' && s[1] == '\n')) s++; -- cgit v1.2.3