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/Ping/src/log.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/Ping/src/log.cpp') diff --git a/plugins/Ping/src/log.cpp b/plugins/Ping/src/log.cpp index 59538f577e..01bb07e671 100644 --- a/plugins/Ping/src/log.cpp +++ b/plugins/Ping/src/log.cpp @@ -2,7 +2,7 @@ INT_PTR Log(WPARAM wParam, LPARAM) { - TCHAR buf[1024], tbuf[512], dbuf[512]; + wchar_t buf[1024], tbuf[512], dbuf[512]; CallService(PLUG "/GetLogFilename", (WPARAM)1024, (LPARAM)buf); //char TBcapt[255]; @@ -13,15 +13,15 @@ INT_PTR Log(WPARAM wParam, LPARAM) { GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systime, 0, tbuf, 512); GetDateFormat(LOCALE_USER_DEFAULT, 0, &systime, 0, dbuf, 512); - TCHAR *line = (TCHAR *)wParam; + wchar_t *line = (wchar_t *)wParam; - FILE *f = _tfopen(buf, L"a+"); + FILE *f = _wfopen(buf, L"a+"); if (f) { if (options.log_csv) { - _ftprintf(f, L"%s, %s, %s\n", dbuf, tbuf, line); + fwprintf(f, L"%s, %s, %s\n", dbuf, tbuf, line); } else { - _ftprintf(f, L"%s, %s: %s\n", dbuf, tbuf, line); + fwprintf(f, L"%s, %s: %s\n", dbuf, tbuf, line); } fclose(f); } @@ -31,7 +31,7 @@ INT_PTR Log(WPARAM wParam, LPARAM) { INT_PTR GetLogFilename(WPARAM wParam, LPARAM lParam) { DBVARIANT dbv; - TCHAR *filename = (TCHAR *)lParam; + wchar_t *filename = (wchar_t *)lParam; if (db_get_ts(0, PLUG, "LogFilename", &dbv)) { CallService(MS_DB_GETPROFILEPATHT, wParam, (LPARAM)filename); mir_tstrncat(filename, L"\\ping_log.txt", wParam - mir_tstrlen(filename)); @@ -41,18 +41,18 @@ INT_PTR GetLogFilename(WPARAM wParam, LPARAM lParam) { db_free(&dbv); } - ((TCHAR *)lParam)[wParam - 1] = 0; + ((wchar_t *)lParam)[wParam - 1] = 0; return 0; } INT_PTR SetLogFilename(WPARAM, LPARAM lParam) { - db_set_ts(0, PLUG, "LogFilename", (TCHAR *)lParam); + db_set_ts(0, PLUG, "LogFilename", (wchar_t *)lParam); return 0; } INT_PTR ViewLogData(WPARAM wParam, LPARAM) { - TCHAR buf[MAX_PATH]; + wchar_t buf[MAX_PATH]; CallService(PLUG "/GetLogFilename", (WPARAM)MAX_PATH, (LPARAM)buf); return (INT_PTR)ShellExecute((HWND)wParam, L"edit", buf, L"", L"", SW_SHOW); } -- cgit v1.2.3