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/WhoUsesMyFiles/src/stdafx.h | 4 ++-- plugins/WhoUsesMyFiles/src/wumf.cpp | 4 ++-- plugins/WhoUsesMyFiles/src/wumfplug.cpp | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/WhoUsesMyFiles/src') diff --git a/plugins/WhoUsesMyFiles/src/stdafx.h b/plugins/WhoUsesMyFiles/src/stdafx.h index 1369af3336..66c4fc31fa 100644 --- a/plugins/WhoUsesMyFiles/src/stdafx.h +++ b/plugins/WhoUsesMyFiles/src/stdafx.h @@ -70,13 +70,13 @@ struct WUMF_OPTIONS COLORREF ColorText; COLORREF ColorBack; - TCHAR LogFile[255]; + wchar_t LogFile[255]; }; struct Wumf { DWORD dwID; - TCHAR szID[10], szPerm[10]; + wchar_t szID[10], szPerm[10]; LPTSTR szUser; LPTSTR szPath; LPTSTR szComp; diff --git a/plugins/WhoUsesMyFiles/src/wumf.cpp b/plugins/WhoUsesMyFiles/src/wumf.cpp index 730fbc152f..00508fe262 100644 --- a/plugins/WhoUsesMyFiles/src/wumf.cpp +++ b/plugins/WhoUsesMyFiles/src/wumf.cpp @@ -139,7 +139,7 @@ void LogWumf(PWumf w) if (hLogger == NULL) { hLogger = mir_createLog("wumf", L"WhoIsUsingMyFiles log file", WumfOptions.LogFile, 0); if (hLogger == NULL) { - TCHAR str[256]; + wchar_t str[256]; mir_sntprintf(str, L"Can't open log file %s", WumfOptions.LogFile); MessageBox(NULL, str, TranslateT("Error opening file"), MB_OK | MB_ICONSTOP); WumfOptions.LogToFile = FALSE; @@ -150,7 +150,7 @@ void LogWumf(PWumf w) SYSTEMTIME time; GetLocalTime(&time); - TCHAR lpDateStr[20], lpTimeStr[20]; + wchar_t lpDateStr[20], lpTimeStr[20]; GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &time, NULL, lpDateStr, 20); GetTimeFormat(LOCALE_USER_DEFAULT, TIME_FORCE24HOURFORMAT | TIME_NOTIMEMARKER, &time, NULL, lpTimeStr, 20); mir_writeLogT(hLogger, L"%s %s %20s\t%s\r\n", lpDateStr, lpTimeStr, w->szUser, w->szPath); diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index 5d9bfde86d..f39cb61e82 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -28,7 +28,7 @@ void LoadOptions() memset(&WumfOptions, 0, sizeof(WumfOptions)); if (db_get_ts(NULL, MODULENAME, OPT_FILE, &dbv) == 0) { - _tcsncpy(WumfOptions.LogFile, dbv.ptszVal, 255); + wcsncpy(WumfOptions.LogFile, dbv.ptszVal, 255); db_free(&dbv); } else @@ -116,7 +116,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA void ShowWumfPopup(PWumf w) { - TCHAR text[512], title[512]; + wchar_t text[512], title[512]; if (!WumfOptions.AlertFolders && (w->dwAttr & FILE_ATTRIBUTE_DIRECTORY)) return; mir_sntprintf(title, L"%s (%s)", w->szComp, w->szUser); @@ -222,11 +222,11 @@ static INT_PTR WumfMenuCommand(WPARAM,LPARAM) { if (WumfOptions.PopupsEnabled == TRUE) { WumfOptions.PopupsEnabled = FALSE; - Menu_ModifyItem(hMenuItem, LPGENT("Enable WUMF popups"), LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP))); + Menu_ModifyItem(hMenuItem, LPGENW("Enable WUMF popups"), LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP))); } else { WumfOptions.PopupsEnabled = TRUE; - Menu_ModifyItem(hMenuItem, LPGENT("Disable WUMF popups"), LoadIcon(hInst,MAKEINTRESOURCE(IDI_POPUP))); + Menu_ModifyItem(hMenuItem, LPGENW("Disable WUMF popups"), LoadIcon(hInst,MAKEINTRESOURCE(IDI_POPUP))); } db_set_b(NULL, MODULENAME, POPUPS_ENABLED, (BYTE)WumfOptions.PopupsEnabled); @@ -252,7 +252,7 @@ void DisableDelayOptions(HWND hwndDlg) void ChooseFile(HWND hwndDlg) { - TCHAR szFile[MAX_PATH]; szFile[0]=0; + wchar_t szFile[MAX_PATH]; szFile[0]=0; // Initialize OPENFILENAME OPENFILENAME ofn = {0}; // common dialog box structure @@ -273,7 +273,7 @@ void ChooseFile(HWND hwndDlg) } } else if (CommDlgExtendedError() != 0) { - TCHAR str[256]; + wchar_t str[256]; mir_sntprintf(str, TranslateT("Common Dialog Error 0x%lx"), CommDlgExtendedError()); MessageBox(hwndDlg, str, TranslateT("Error"), MB_OK | MB_ICONSTOP); } @@ -492,7 +492,7 @@ extern "C" __declspec(dllexport) int Load(void) CMenuItem mi; SET_UID(mi, 0xcfce6487, 0x907b, 0x4822, 0xb0, 0x49, 0x18, 0x4e, 0x47, 0x17, 0x0, 0x69); - mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 1999990000); + mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 1999990000); if (WumfOptions.PopupsEnabled == FALSE) { mi.name.a = LPGEN("Enable WUMF popups"); mi.hIcolibItem = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP)); -- cgit v1.2.3