[Ttssh2-commit] [9148] TermPasteString()内で CommTextOutW(), CommTextEchoW() を使用するよう修正

アーカイブの一覧に戻る
scmno****@osdn***** scmno****@osdn*****
2021年 2月 11日 (木) 00:09:54 JST


Revision: 9148
          https://osdn.net/projects/ttssh2/scm/svn/commits/9148
Author:   zmatsuo
Date:     2021-02-11 00:09:53 +0900 (Thu, 11 Feb 2021)
Log Message:
-----------
TermPasteString()内で CommTextOutW(), CommTextEchoW() を使用するよう修正

- Unicode対応バッファ出力関数
  - CommTextOutW(), CommTextEchoW()
  - 従来は CommTextOut(), CommTextEcho() を使用

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtterm.c
    trunk/teraterm/teraterm/vtterm.h
    trunk/teraterm/teraterm/vtwin.cpp

-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2021-02-06 05:44:50 UTC (rev 9147)
+++ trunk/teraterm/teraterm/vtterm.c	2021-02-10 15:09:53 UTC (rev 9148)
@@ -6881,16 +6881,14 @@
 	}
 }
 
-void TermPasteString(char *str, int len)
+void TermPasteString(const wchar_t *str, size_t len)
 {
 	TermSendStartBracket();
-	CommTextOut(&cv, str, len);
+	CommTextOutW(&cv, str, len);
 	if (ts.LocalEcho) {
-		CommTextEcho(&cv, str, len);
+		CommTextEchoW(&cv, str, len);
 	}
 	TermSendEndBracket();
-
-	return;
 }
 
 void TermSendStartBracket()

Modified: trunk/teraterm/teraterm/vtterm.h
===================================================================
--- trunk/teraterm/teraterm/vtterm.h	2021-02-06 05:44:50 UTC (rev 9147)
+++ trunk/teraterm/teraterm/vtterm.h	2021-02-10 15:09:53 UTC (rev 9148)
@@ -46,7 +46,7 @@
 BOOL WheelToCursorMode();
 void EndTerm();
 void ChangeTerminalID();
-void TermPasteString(char *str, int len);
+void TermPasteString(const wchar_t *str, size_t len);
 void TermSendStartBracket(void);
 void TermSendEndBracket(void);
 

Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2021-02-06 05:44:50 UTC (rev 9147)
+++ trunk/teraterm/teraterm/vtwin.cpp	2021-02-10 15:09:53 UTC (rev 9148)
@@ -1653,7 +1653,8 @@
 		EscapeFilename(str, tmpbuf);
 	}
 
-	SendMemPasteString(tmpbuf);
+	size_t len = wcslen(tmpbuf);
+	TermPasteString(tmpbuf, len);
 }
 
 /* \x93\xFC\x97͂̓t\x83@\x83C\x83\x8B\x82̂\xDD(\x83t\x83H\x83\x8B\x83_\x82͊܂܂\xEA\x82Ȃ\xA2) */


Ttssh2-commit メーリングリストの案内
アーカイブの一覧に戻る