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/Scriver/src/input.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/Scriver/src/input.cpp') diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp index fcc305a9f4..d9ecad41e3 100644 --- a/plugins/Scriver/src/input.cpp +++ b/plugins/Scriver/src/input.cpp @@ -372,11 +372,11 @@ BOOL HandleLinkClick(HINSTANCE hInstance, HWND hwndDlg, HWND hwndFocus, ENLINK * TEXTRANGE tr; tr.chrg = lParam->chrg; - tr.lpstrText = (LPWSTR)mir_alloc(sizeof(TCHAR)*(tr.chrg.cpMax - tr.chrg.cpMin + 8)); + tr.lpstrText = (LPWSTR)mir_alloc(sizeof(wchar_t)*(tr.chrg.cpMax - tr.chrg.cpMin + 8)); SendMessage(lParam->nmhdr.hwndFrom, EM_GETTEXTRANGE, 0, (LPARAM)&tr); - if (_tcschr(tr.lpstrText, _T('@')) != NULL && _tcschr(tr.lpstrText, _T(':')) == NULL && _tcschr(tr.lpstrText, _T('/')) == NULL) { - memmove(tr.lpstrText + 7, tr.lpstrText, sizeof(TCHAR)*(tr.chrg.cpMax - tr.chrg.cpMin + 1)); - memcpy(tr.lpstrText, L"mailto:", sizeof(TCHAR) * 7); + if (wcschr(tr.lpstrText, '@') != NULL && wcschr(tr.lpstrText, ':') == NULL && wcschr(tr.lpstrText, '/') == NULL) { + memmove(tr.lpstrText + 7, tr.lpstrText, sizeof(wchar_t)*(tr.chrg.cpMax - tr.chrg.cpMin + 1)); + memcpy(tr.lpstrText, L"mailto:", sizeof(wchar_t) * 7); } BOOL bOpenLink = TRUE; @@ -399,7 +399,7 @@ BOOL HandleLinkClick(HINSTANCE hInstance, HWND hwndDlg, HWND hwndFocus, ENLINK * if (!OpenClipboard(hwndDlg)) break; EmptyClipboard(); - HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, sizeof(TCHAR)*(mir_tstrlen(tr.lpstrText) + 1)); + HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, sizeof(wchar_t)*(mir_tstrlen(tr.lpstrText) + 1)); mir_tstrcpy((LPWSTR)GlobalLock(hData), tr.lpstrText); GlobalUnlock(hData); SetClipboardData(CF_UNICODETEXT, hData); -- cgit v1.2.3