[ttssh2-commit] [9385] 新しい接続ダイアログで Unicode版lng ファイルを参照

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2021年 8月 29日 (日) 00:33:12 JST


Revision: 9385
          https://osdn.net/projects/ttssh2/scm/svn/commits/9385
Author:   zmatsuo
Date:     2021-08-29 00:33:11 +0900 (Sun, 29 Aug 2021)
Log Message:
-----------
新しい接続ダイアログで Unicode版lng ファイルを参照

Modified Paths:
--------------
    trunk/teraterm/common/tttypes.h
    trunk/teraterm/teraterm/vtwin.cpp
    trunk/teraterm/ttpdlg/ttdlg.c
    trunk/ttssh2/ttxssh/ttxssh.c

-------------- next part --------------
Modified: trunk/teraterm/common/tttypes.h
===================================================================
--- trunk/teraterm/common/tttypes.h	2021-08-28 15:32:58 UTC (rev 9384)
+++ trunk/teraterm/common/tttypes.h	2021-08-28 15:33:11 UTC (rev 9385)
@@ -789,6 +789,7 @@
 /* GetHostName dialog record */
 typedef struct {
 	PCHAR SetupFN; // setup file name
+	const wchar_t *SetupFNW;
 	WORD PortType; // TCPIP/Serial
 	PCHAR HostName; // host name
 	WORD Telnet; // non-zero: enable telnet

Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2021-08-28 15:32:58 UTC (rev 9384)
+++ trunk/teraterm/teraterm/vtwin.cpp	2021-08-28 15:33:11 UTC (rev 9385)
@@ -3478,6 +3478,7 @@
 
 	HelpId = HlpFileNewConnection;
 	GetHNRec.SetupFN = ts.SetupFName;
+	GetHNRec.SetupFNW = ts.SetupFNameW;
 	GetHNRec.PortType = ts.PortType;
 	GetHNRec.Telnet = ts.Telnet;
 	GetHNRec.TelPort = ts.TelPort;

Modified: trunk/teraterm/ttpdlg/ttdlg.c
===================================================================
--- trunk/teraterm/ttpdlg/ttdlg.c	2021-08-28 15:32:58 UTC (rev 9384)
+++ trunk/teraterm/ttpdlg/ttdlg.c	2021-08-28 15:33:11 UTC (rev 9385)
@@ -1624,7 +1624,7 @@
 			ts = (PTTSet)lParam;
 			SetWindowLongPtr(Dialog, DWLP_USER, lParam);
 
-			SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile);
+			SetDlgTextsW(Dialog, TextInfos, _countof(TextInfos), ts->UILanguageFileW);
 
 			SendDlgItemMessage(Dialog, IDC_TCPIPHOST, EM_LIMITTEXT,
 			                   HostNameMaxLength-1, 0);

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2021-08-28 15:32:58 UTC (rev 9384)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2021-08-28 15:33:11 UTC (rev 9385)
@@ -1009,8 +1009,8 @@
 		{ IDOK, "BTN_OK" },
 		{ IDCANCEL, "BTN_CANCEL" },
 	};
-	static char *ssh_version[] = {"SSH1", "SSH2", NULL};
-	static char *ProtocolFamilyList[] = { "AUTO", "IPv6", "IPv4", NULL };
+	static const char *ssh_version[] = {"SSH1", "SSH2", NULL};
+	static const char *ProtocolFamilyList[] = { "AUTO", "IPv6", "IPv4", NULL };
 	PGetHNRec GetHNRec;
 	char EntName[128];
 	WORD i, j, w;
@@ -1039,21 +1039,19 @@
 			GetHNRec->PortType = IdTCPIP;
 
 		{
-			wchar_t *SetupFnW = ToWcharA(GetHNRec->SetupFN);
 			i = 1;
 			do {
 				wchar_t EntNameW[128];
-				wchar_t TempHostW[HostNameMaxLength + 1];
+				wchar_t *TempHostW;
 				_snwprintf_s(EntNameW, _countof(EntNameW), _TRUNCATE, L"host%d", i);
-				GetPrivateProfileStringW(L"Hosts", EntNameW, L"",
-										 TempHostW, _countof(TempHostW),
-										 SetupFnW);
-				if (TempHostW[0] != 0)
+				hGetPrivateProfileStringW(L"Hosts", EntNameW, L"", GetHNRec->SetupFNW, &TempHostW);
+				if (TempHostW[0] != 0) {
 					SendDlgItemMessageW(dlg, IDC_HOSTNAME, CB_ADDSTRING,
 										0, (LPARAM) TempHostW);
+				}
+				free(TempHostW);
 				i++;
 			} while (i <= MAXHOSTLIST);
-			free(SetupFnW);
 		}
 
 		SendDlgItemMessage(dlg, IDC_HOSTNAME, EM_LIMITTEXT,
@@ -1783,6 +1781,7 @@
 	}
 
 	free(option);
+	free(option2);
 
 	FWDUI_load_settings(pvar);
 
@@ -4835,6 +4834,7 @@
 		// \x83\x8A\x81[\x83N\x8E\x9E\x82̃u\x83\x8D\x83b\x83N\x94ԍ\x86\x82\xF0\x8C\xB3\x82Ƀu\x83\x8C\x81[\x83N\x82\xF0\x8Ed\x8A|\x82\xAF\x82\xE9\x82ɂ́A\x88ȉ\xBA\x82̂悤\x82ɂ\xB7\x82\xE9\x81B
 		//_CrtSetBreakAlloc(3228);
 #endif
+//		_CrtSetBreakAlloc(259);
 		DisableThreadLibraryCalls(hInstance);
 		hInst = hInstance;
 		pvar = &InstVar;


ttssh2-commit メーリングリストの案内
Back to archive index