Revision: 9397 https://osdn.net/projects/ttssh2/scm/svn/commits/9397 Author: zmatsuo Date: 2021-09-05 00:13:40 +0900 (Sun, 05 Sep 2021) Log Message: ----------- plugin ReadKeyboardCnf() のファイル名を Unicode化 Modified Paths: -------------- branches/plugin_unicode/teraterm/teraterm/keyboard.c branches/plugin_unicode/teraterm/teraterm/ttsetup.h branches/plugin_unicode/teraterm/ttpset/ttset_keyboard.c branches/plugin_unicode/teraterm/ttpset/ttset_keyboard_entry.c -------------- next part -------------- Modified: branches/plugin_unicode/teraterm/teraterm/keyboard.c =================================================================== --- branches/plugin_unicode/teraterm/teraterm/keyboard.c 2021-09-04 15:13:25 UTC (rev 9396) +++ branches/plugin_unicode/teraterm/teraterm/keyboard.c 2021-09-04 15:13:40 UTC (rev 9397) @@ -131,7 +131,7 @@ } if (LoadTTSET()) - (*ReadKeyboardCnf)(ts.KeyCnfFN, KeyMap, TRUE); + (*ReadKeyboardCnf)(ts.KeyCnfFNW, KeyMap, TRUE); FreeTTSET(); } Modified: branches/plugin_unicode/teraterm/teraterm/ttsetup.h =================================================================== --- branches/plugin_unicode/teraterm/teraterm/ttsetup.h 2021-09-04 15:13:25 UTC (rev 9396) +++ branches/plugin_unicode/teraterm/teraterm/ttsetup.h 2021-09-04 15:13:40 UTC (rev 9397) @@ -44,8 +44,8 @@ typedef void (PASCAL *PReadIniFile)(const wchar_t *FName, PTTSet ts); //typedef void (PASCAL *PWriteIniFile)(PCHAR FName, PTTSet ts); typedef void (PASCAL *PWriteIniFile)(const wchar_t *FName, PTTSet ts); -typedef void (PASCAL *PReadKeyboardCnf) - (PCHAR FName, PKeyMap KeyMap, BOOL ShowWarning); +//typedef void (PASCAL *PReadKeyboardCnf)(PCHAR FName, PKeyMap KeyMap, BOOL ShowWarning); +typedef void (PASCAL *PReadKeyboardCnf)(const wchar_t *FName, PKeyMap KeyMap, BOOL ShowWarning); typedef void (PASCAL *PCopyHostList) (PCHAR IniSrc, PCHAR IniDest); typedef void (PASCAL *PAddHostToList) Modified: branches/plugin_unicode/teraterm/ttpset/ttset_keyboard.c =================================================================== --- branches/plugin_unicode/teraterm/ttpset/ttset_keyboard.c 2021-09-04 15:13:25 UTC (rev 9396) +++ branches/plugin_unicode/teraterm/ttpset/ttset_keyboard.c 2021-09-04 15:13:40 UTC (rev 9397) @@ -239,10 +239,9 @@ * ttpset.dll ttste_keyboard_entry.c \x82\xCC ReadKeyboardCnf() \x82\xA9\x82炱\x82\xB1\x82\xAA\x83R\x81[\x83\x8B\x82\xB3\x82\xEA\x82\xE9 * KeyMap \x82͏\x89\x8A\xFA\x89\xBB\x8Dς\xDD */ -__declspec(dllexport) void ReadKeyboardCnfExe(PCHAR FNameA, PKeyMap KeyMap, BOOL ShowWarning) +__declspec(dllexport) void ReadKeyboardCnfExe(const wchar_t *FName, PKeyMap KeyMap, BOOL ShowWarning) { int i, j; - const wchar_t *FName = ToWcharA(FNameA); ReadKeyboardMap(KeyMap, FName); ReadUserkeysSection(FName, KeyMap); @@ -263,6 +262,4 @@ } KeyMap->Map[i] = 0xFFFF; } - - free((void *)FName); } Modified: branches/plugin_unicode/teraterm/ttpset/ttset_keyboard_entry.c =================================================================== --- branches/plugin_unicode/teraterm/ttpset/ttset_keyboard_entry.c 2021-09-04 15:13:25 UTC (rev 9396) +++ branches/plugin_unicode/teraterm/ttpset/ttset_keyboard_entry.c 2021-09-04 15:13:40 UTC (rev 9397) @@ -32,13 +32,13 @@ #include "dllutil.h" #include "../teraterm/keyboard_i.h" -void PASCAL ReadKeyboardCnf(PCHAR FNameA, PKeyMap KeyMap, BOOL ShowWarning) +void PASCAL ReadKeyboardCnf(const wchar_t *FName, PKeyMap KeyMap, BOOL ShowWarning) { - void (*ReadKeyboardCnfExe)(PCHAR FNameA, PKeyMap KeyMap, BOOL ShowWarning); + void (*ReadKeyboardCnfExe)(const wchar_t *FName, PKeyMap KeyMap, BOOL ShowWarning); DWORD r = DLLGetApiAddress(L"ttermpro.exe", DLL_LOAD_LIBRARY_CURRENT, "ReadKeyboardCnfExe", (void **)&ReadKeyboardCnfExe); if (r != NO_ERROR) { return; } - ReadKeyboardCnfExe(FNameA, KeyMap, ShowWarning); + ReadKeyboardCnfExe(FName, KeyMap, ShowWarning); }