summaryrefslogtreecommitdiff
path: root/plugins/WhoUsesMyFiles
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
commit2f261839b60692e33d0e160344d0d636d49c90ba (patch)
tree187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/WhoUsesMyFiles
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WhoUsesMyFiles')
-rw-r--r--plugins/WhoUsesMyFiles/src/list.cpp18
-rw-r--r--plugins/WhoUsesMyFiles/src/wumf.cpp8
-rw-r--r--plugins/WhoUsesMyFiles/src/wumfplug.cpp12
3 files changed, 19 insertions, 19 deletions
diff --git a/plugins/WhoUsesMyFiles/src/list.cpp b/plugins/WhoUsesMyFiles/src/list.cpp
index 2a1c189c9b..028d17f035 100644
--- a/plugins/WhoUsesMyFiles/src/list.cpp
+++ b/plugins/WhoUsesMyFiles/src/list.cpp
@@ -13,18 +13,18 @@ PWumf new_wumf( DWORD dwID,
if (!w)
return NULL;
- w->szUser = mir_tstrdup(szUser);
- w->szPath = mir_tstrdup(szPath);
- w->szComp = mir_tstrdup(szComp);
- w->szUNC = mir_tstrdup(szUNC);
+ w->szUser = mir_wstrdup(szUser);
+ w->szPath = mir_wstrdup(szPath);
+ w->szComp = mir_wstrdup(szComp);
+ w->szUNC = mir_wstrdup(szUNC);
switch(dwPerm) {
- case PERM_FILE_READ: mir_tstrcpy(w->szPerm, L"Read");break;
- case PERM_FILE_WRITE: mir_tstrcpy(w->szPerm, L"Write");break;
- case PERM_FILE_CREATE: mir_tstrcpy(w->szPerm, L"Create");break;
- default: mir_tstrcpy(w->szPerm, L"Execute");
+ case PERM_FILE_READ: mir_wstrcpy(w->szPerm, L"Read");break;
+ case PERM_FILE_WRITE: mir_wstrcpy(w->szPerm, L"Write");break;
+ case PERM_FILE_CREATE: mir_wstrcpy(w->szPerm, L"Create");break;
+ default: mir_wstrcpy(w->szPerm, L"Execute");
}
- mir_sntprintf(w->szID, L"%i", dwID);
+ mir_snwprintf(w->szID, L"%i", dwID);
w->dwID = dwID;
w->dwSess = dwSess;
diff --git a/plugins/WhoUsesMyFiles/src/wumf.cpp b/plugins/WhoUsesMyFiles/src/wumf.cpp
index 00508fe262..99e2102d04 100644
--- a/plugins/WhoUsesMyFiles/src/wumf.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumf.cpp
@@ -5,8 +5,8 @@
#define NAME "WUMF"
#define WM_MYCMD 0x0401
-static PWumf list = NULL;
-static PWumf lst = NULL;
+PWumf list = NULL;
+PWumf lst = NULL;
HANDLE hLogger = NULL;
BOOL wumf();
@@ -140,7 +140,7 @@ void LogWumf(PWumf w)
hLogger = mir_createLog("wumf", L"WhoIsUsingMyFiles log file", WumfOptions.LogFile, 0);
if (hLogger == NULL) {
wchar_t str[256];
- mir_sntprintf(str, L"Can't open log file %s", WumfOptions.LogFile);
+ mir_snwprintf(str, L"Can't open log file %s", WumfOptions.LogFile);
MessageBox(NULL, str, TranslateT("Error opening file"), MB_OK | MB_ICONSTOP);
WumfOptions.LogToFile = FALSE;
return;
@@ -153,7 +153,7 @@ void LogWumf(PWumf w)
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);
+ mir_writeLogW(hLogger, L"%s %s %20s\t%s\r\n", lpDateStr, lpTimeStr, w->szUser, w->szPath);
}
BOOL wumf()
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
index f39cb61e82..fc2ff253db 100644
--- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
@@ -119,8 +119,8 @@ void ShowWumfPopup(PWumf w)
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);
- mir_sntprintf(text, L"%s (%s)", w->szPath, w->szPerm);
+ mir_snwprintf(title, L"%s (%s)", w->szComp, w->szUser);
+ mir_snwprintf(text, L"%s (%s)", w->szPath, w->szPerm);
ShowThePopup(w, title, text);
}
@@ -137,8 +137,8 @@ void ShowThePopup(PWumf w, LPTSTR title, LPTSTR text)
else if (WumfOptions.DelaySet)
ppd.iSeconds = WumfOptions.DelaySec;
- mir_tstrncpy(ppd.lptzContactName, title, MAX_CONTACTNAME);
- mir_tstrncpy(ppd.lptzText, text, MAX_SECONDLINE);
+ mir_wstrncpy(ppd.lptzContactName, title, MAX_CONTACTNAME);
+ mir_wstrncpy(ppd.lptzText, text, MAX_SECONDLINE);
if (WumfOptions.UseWinColor) {
ppd.colorBack = GetSysColor(COLOR_WINDOW);
ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
@@ -268,13 +268,13 @@ void ChooseFile(HWND hwndDlg)
HANDLE hf = CreateFile(szFile,GENERIC_WRITE,0,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL, NULL);
if (hf != INVALID_HANDLE_VALUE) {
SetDlgItemText(hwndDlg,IDC_FILE,szFile);
- mir_tstrncpy(WumfOptions.LogFile, szFile, MAX_PATH);
+ mir_wstrncpy(WumfOptions.LogFile, szFile, MAX_PATH);
CloseHandle(hf);
}
}
else if (CommDlgExtendedError() != 0) {
wchar_t str[256];
- mir_sntprintf(str, TranslateT("Common Dialog Error 0x%lx"), CommDlgExtendedError());
+ mir_snwprintf(str, TranslateT("Common Dialog Error 0x%lx"), CommDlgExtendedError());
MessageBox(hwndDlg, str, TranslateT("Error"), MB_OK | MB_ICONSTOP);
}
}