summaryrefslogtreecommitdiff
path: root/plugins/KeyboardNotify/src
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/KeyboardNotify/src
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/KeyboardNotify/src')
-rw-r--r--plugins/KeyboardNotify/src/flash.cpp2
-rw-r--r--plugins/KeyboardNotify/src/keyboard.cpp8
-rw-r--r--plugins/KeyboardNotify/src/main.cpp8
-rw-r--r--plugins/KeyboardNotify/src/options.cpp46
-rw-r--r--plugins/KeyboardNotify/src/utils.cpp2
5 files changed, 33 insertions, 33 deletions
diff --git a/plugins/KeyboardNotify/src/flash.cpp b/plugins/KeyboardNotify/src/flash.cpp
index bbbcc84da4..6f56a9552d 100644
--- a/plugins/KeyboardNotify/src/flash.cpp
+++ b/plugins/KeyboardNotify/src/flash.cpp
@@ -88,7 +88,7 @@ void setFlashingSequence(void)
FLASHING_SEQUENCE *getCustomSeq(void)
{
- ptrT tszSeq( db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", wCustomTheme)));
+ ptrW tszSeq( db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", wCustomTheme)));
static FLASHING_SEQUENCE Custom = {0};
Custom = str2FS((tszSeq != 0) ? tszSeq : L"");
diff --git a/plugins/KeyboardNotify/src/keyboard.cpp b/plugins/KeyboardNotify/src/keyboard.cpp
index 5fd5116dc5..eaa613c661 100644
--- a/plugins/KeyboardNotify/src/keyboard.cpp
+++ b/plugins/KeyboardNotify/src/keyboard.cpp
@@ -40,11 +40,11 @@ BOOL OpenKeyboardDevice()
wchar_t aux1[MAX_PATH+1], aux2[MAX_PATH+1];
do {
- mir_sntprintf(aux1, L"Kbd%d", i);
- mir_sntprintf(aux2, L"\\Device\\KeyboardClass%d", i);
+ mir_snwprintf(aux1, L"Kbd%d", i);
+ mir_snwprintf(aux2, L"\\Device\\KeyboardClass%d", i);
DefineDosDevice(DDD_RAW_TARGET_PATH, aux1, aux2);
- mir_sntprintf(aux1, L"\\\\.\\Kbd%d", i);
+ mir_snwprintf(aux1, L"\\\\.\\Kbd%d", i);
hKbdDev[i] = CreateFile(aux1, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
} while (hKbdDev[i] != INVALID_HANDLE_VALUE && ++i < MAX_KBDHANDLES);
@@ -80,7 +80,7 @@ void CloseKeyboardDevice()
if (hKbdDev[i] != INVALID_HANDLE_VALUE)
CloseHandle(hKbdDev[i]);
- mir_sntprintf(aux, L"Kbd%d", i);
+ mir_snwprintf(aux, L"Kbd%d", i);
DefineDosDevice(DDD_REMOVE_DEFINITION, aux, NULL);
} while (hKbdDev[i] != INVALID_HANDLE_VALUE && ++i < MAX_KBDHANDLES);
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index 3cafb2523b..2ccf62e6f1 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -829,12 +829,12 @@ void createEventPrefix(wchar_t *prefixName, size_t maxLen)
while (str = wcschr(profileName, '\\'))
*str = '/';
- if ((len = mir_tstrlen(profileName)) <= maxLen)
+ if ((len = mir_wstrlen(profileName)) <= maxLen)
wcsncpy_s(prefixName, maxLen, profileName, _TRUNCATE);
else {
str = profileName + len - maxLen / 2;
wcsncpy_s(prefixName, (maxLen / 2), profileName, _TRUNCATE);
- mir_tstrcat(prefixName, str);
+ mir_wstrcat(prefixName, str);
}
}
@@ -914,9 +914,9 @@ static int ModulesLoaded(WPARAM, LPARAM)
// Create some synchronisation objects
createEventPrefix(eventPrefix, MAX_PATH - 11);
- mir_sntprintf(eventName, L"%s/FlashEvent", eventPrefix);
+ mir_snwprintf(eventName, L"%s/FlashEvent", eventPrefix);
hFlashEvent = CreateEvent(NULL, FALSE, FALSE, eventName);
- mir_sntprintf(eventName, L"%s/ExitEvent", eventPrefix);
+ mir_snwprintf(eventName, L"%s/ExitEvent", eventPrefix);
hExitEvent = CreateEvent(NULL, FALSE, FALSE, eventName);
hThread = mir_forkthread(FlashThreadFunction, 0);
diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp
index 5f5f0bd92d..1fdc35eae0 100644
--- a/plugins/KeyboardNotify/src/options.cpp
+++ b/plugins/KeyboardNotify/src/options.cpp
@@ -46,14 +46,14 @@ static void writeThemeToCombo(const wchar_t *theme, const wchar_t *custom, BOOL
int item = SendDlgItemMessage(hwndTheme, IDC_THEME, CB_FINDSTRINGEXACT, -1, (LPARAM)theme);
if (item == CB_ERR) {
item = SendDlgItemMessage(hwndTheme, IDC_THEME, CB_ADDSTRING, 0, (LPARAM)theme);
- wchar_t *str = mir_tstrdup(custom);
+ wchar_t *str = mir_wstrdup(custom);
SendDlgItemMessage(hwndTheme, IDC_THEME, CB_SETITEMDATA, (WPARAM)item, (LPARAM)str);
}
else
if (overrideExisting) {
wchar_t *str = (wchar_t *)SendDlgItemMessage(hwndTheme, IDC_THEME, CB_GETITEMDATA, (WPARAM)item, 0);
if (str)
- mir_tstrcpy(str, custom);
+ mir_wstrcpy(str, custom);
}
}
@@ -97,12 +97,12 @@ void importThemes(const wchar_t *filename, BOOL overrideExisting)
for (str = buffer; *str && isspace(*str); str++); //ltrim
if (!*str || *str == ';') //empty line or comment
continue;
- for (i = mir_tstrlen(str) - 1; isspace(str[i]); str[i--] = '\0'); //rtrim
+ for (i = mir_wstrlen(str) - 1; isspace(str[i]); str[i--] = '\0'); //rtrim
switch (status) {
case 0:
if (i > 1 && str[0] == '[' && str[i] == ']') {
status = 1;
- mir_tstrcpy(theme, str + 1);
+ mir_wstrcpy(theme, str + 1);
theme[i - 1] = '\0';
}
break;
@@ -127,7 +127,7 @@ static void createProcessListAux(void)
if (!ProcessList.szFileName[i])
ProcessListAux.szFileName[i] = NULL;
else {
- ProcessListAux.szFileName[i] = mir_tstrdup(ProcessList.szFileName[i]);
+ ProcessListAux.szFileName[i] = mir_wstrdup(ProcessList.szFileName[i]);
}
}
@@ -264,7 +264,7 @@ static INT_PTR CALLBACK DlgProcProcesses(HWND hwndDlg, UINT msg, WPARAM wParam,
wchar_t szFileNameAux[MAX_PATH + 1];
SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_GETLBTEXT, (WPARAM)i, (LPARAM)szFileNameAux);
- ProcessListAux.szFileName[i] = mir_tstrdup(szFileNameAux);
+ ProcessListAux.szFileName[i] = mir_wstrdup(szFileNameAux);
}
// fallthrough
@@ -1162,15 +1162,15 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hwndDlg;
ofn.hInstance = NULL;
- mir_tstrcpy(filter, TranslateT("Keyboard Notify Theme"));
+ mir_wstrcpy(filter, TranslateT("Keyboard Notify Theme"));
mir_wstrcat(filter, L" (*.knt)");
- pfilter = filter + mir_tstrlen(filter) + 1;
- mir_tstrcpy(pfilter, L"*.knt");
- pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- mir_tstrcpy(pfilter, TranslateT("All Files"));
- pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- mir_tstrcpy(pfilter, L"*.*");
- pfilter = pfilter + mir_tstrlen(pfilter) + 1;
+ pfilter = filter + mir_wstrlen(filter) + 1;
+ mir_wstrcpy(pfilter, L"*.knt");
+ pfilter = pfilter + mir_wstrlen(pfilter) + 1;
+ mir_wstrcpy(pfilter, TranslateT("All Files"));
+ pfilter = pfilter + mir_wstrlen(pfilter) + 1;
+ mir_wstrcpy(pfilter, L"*.*");
+ pfilter = pfilter + mir_wstrlen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
ofn.lpstrFile = path;
@@ -1190,15 +1190,15 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hwndDlg;
ofn.hInstance = NULL;
- mir_tstrcpy(filter, TranslateT("Keyboard Notify Theme"));
+ mir_wstrcpy(filter, TranslateT("Keyboard Notify Theme"));
mir_wstrcat(filter, L" (*.knt)");
- pfilter = filter + mir_tstrlen(filter) + 1;
- mir_tstrcpy(pfilter, L"*.knt");
- pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- mir_tstrcpy(pfilter, TranslateT("All Files"));
- pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- mir_tstrcpy(pfilter, L"*.*");
- pfilter = pfilter + mir_tstrlen(pfilter) + 1;
+ pfilter = filter + mir_wstrlen(filter) + 1;
+ mir_wstrcpy(pfilter, L"*.knt");
+ pfilter = pfilter + mir_wstrlen(pfilter) + 1;
+ mir_wstrcpy(pfilter, TranslateT("All Files"));
+ pfilter = pfilter + mir_wstrlen(pfilter) + 1;
+ mir_wstrcpy(pfilter, L"*.*");
+ pfilter = pfilter + mir_wstrlen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
ofn.lpstrFile = path;
@@ -1227,7 +1227,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
if (szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", wCustomTheme))) {
- mir_tstrcpy(theme, szTheme);
+ mir_wstrcpy(theme, szTheme);
mir_free(szTheme);
}
else
diff --git a/plugins/KeyboardNotify/src/utils.cpp b/plugins/KeyboardNotify/src/utils.cpp
index b7d59819b8..f7d8bc4ab8 100644
--- a/plugins/KeyboardNotify/src/utils.cpp
+++ b/plugins/KeyboardNotify/src/utils.cpp
@@ -38,7 +38,7 @@ wchar_t *getAbsoluteProfileName(wchar_t *absoluteProfileName, size_t maxLen)
profilePath[0] = profileName[0] = '\0';
CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)profilePath);
CallService(MS_DB_GETPROFILENAMET, MAX_PATH, (LPARAM)profileName);
- mir_sntprintf(absoluteProfileName, maxLen, L"%s\\%s", profilePath, profileName);
+ mir_snwprintf(absoluteProfileName, maxLen, L"%s\\%s", profilePath, profileName);
return absoluteProfileName;
}