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/KeyboardNotify/src/main.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'plugins/KeyboardNotify/src/main.cpp') diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 9bccd96da1..3cafb2523b 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -463,7 +463,7 @@ static INT_PTR StartBlinkService(WPARAM wParam, LPARAM lParam) nExternCount += (unsigned int)wParam; if (bFlashOnOther && checkNotifyOptions() && checkGlobalStatus() && checkGlobalXstatus()) { if (lParam) - useExternSequence((TCHAR *)lParam); + useExternSequence((wchar_t *)lParam); SetEvent(hFlashEvent); } @@ -490,10 +490,10 @@ static INT_PTR IsFlashingActiveService(WPARAM, LPARAM) INT_PTR NormalizeSequenceService(WPARAM, LPARAM lParam) { - TCHAR strAux[MAX_PATH + 1], *strIn = (TCHAR*)lParam; + wchar_t strAux[MAX_PATH + 1], *strIn = (wchar_t*)lParam; - _tcsncpy_s(strAux, strIn, _TRUNCATE); - _tcsncpy_s(strIn, MAX_PATH, normalizeCustomString(strAux), _TRUNCATE); + wcsncpy_s(strAux, strIn, _TRUNCATE); + wcsncpy_s(strIn, MAX_PATH, normalizeCustomString(strAux), _TRUNCATE); return (INT_PTR)strIn; } @@ -518,7 +518,7 @@ void createProcessList(void) int count = db_get_w(NULL, KEYBDMODULE, "processcount", 0); ProcessList.count = 0; - ProcessList.szFileName = (TCHAR **)mir_alloc(count * sizeof(TCHAR *)); + ProcessList.szFileName = (wchar_t **)mir_alloc(count * sizeof(wchar_t *)); if (ProcessList.szFileName) { for (int i = 0; i < count; i++) ProcessList.szFileName[i] = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("process%d", i)); @@ -820,20 +820,20 @@ static void destroyProtocolList(void) // We use the profile name to create the first part of each event name // We do so to avoid problems between different instances of the plugin concurrently running -void createEventPrefix(TCHAR *prefixName, size_t maxLen) +void createEventPrefix(wchar_t *prefixName, size_t maxLen) { size_t len; - TCHAR profileName[MAX_PATH + 1], *str; + wchar_t profileName[MAX_PATH + 1], *str; getAbsoluteProfileName(profileName, MAX_PATH); - while (str = _tcschr(profileName, _T('\\'))) - *str = _T('/'); + while (str = wcschr(profileName, '\\')) + *str = '/'; if ((len = mir_tstrlen(profileName)) <= maxLen) - _tcsncpy_s(prefixName, maxLen, profileName, _TRUNCATE); + wcsncpy_s(prefixName, maxLen, profileName, _TRUNCATE); else { str = profileName + len - maxLen / 2; - _tcsncpy_s(prefixName, (maxLen / 2), profileName, _TRUNCATE); + wcsncpy_s(prefixName, (maxLen / 2), profileName, _TRUNCATE); mir_tstrcat(prefixName, str); } } @@ -907,7 +907,7 @@ static int OnPreshutdown(WPARAM, LPARAM) static int ModulesLoaded(WPARAM, LPARAM) { - TCHAR eventPrefix[MAX_PATH + 1], eventName[MAX_PATH + 1]; + wchar_t eventPrefix[MAX_PATH + 1], eventName[MAX_PATH + 1]; createProtocolList(); LoadSettings(); -- cgit v1.2.3