[Ttssh2-commit] [9144] 無効化された BuffCBCopy() を使用していた箇所を削除

Zurück zum Archiv-Index
scmno****@osdn***** scmno****@osdn*****
2021年 2月 6日 (土) 14:43:51 JST


Revision: 9144
          https://osdn.net/projects/ttssh2/scm/svn/commits/9144
Author:   zmatsuo
Date:     2021-02-06 14:43:51 +0900 (Sat, 06 Feb 2021)
Log Message:
-----------
無効化された BuffCBCopy() を使用していた箇所を削除

- UNICODE_INTERNAL_BUFF を削除
- int を size_t へ置換

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtwin.cpp

-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2021-01-29 15:35:36 UTC (rev 9143)
+++ trunk/teraterm/teraterm/vtwin.cpp	2021-02-06 05:43:51 UTC (rev 9144)
@@ -3685,7 +3685,7 @@
 	fopen_s(&fp, cygterm_cfg, "r");
 	if (fp != NULL) {
 		while (fgets(buf, sizeof(buf), fp) != NULL) {
-			int len = strlen(buf);
+			size_t len = strlen(buf);
 
 			if (buf[len - 1] == '\n')
 				buf[len - 1] = '\0';
@@ -3781,7 +3781,7 @@
 {
 	char file[MAX_PATH], *filename;
 	char c, *envptr, *envbuff=NULL;
-	int envbufflen;
+	size_t envbufflen;
 	const char *exename = "cygterm.exe";
 	char cygterm[MAX_PATH];
 	STARTUPINFO si;
@@ -4244,25 +4244,17 @@
 void CVTWindow::OnEditCopy()
 {
 	// copy selected text to clipboard
-#if	UNICODE_INTERNAL_BUFF
 	wchar_t *strW = BuffCBCopyUnicode(FALSE);
 	CBSetTextW(HVTWin, strW, 0);
 	free(strW);
-#else
-	BuffCBCopy(FALSE);
-#endif
 }
 
 void CVTWindow::OnEditCopyTable()
 {
 	// copy selected text to clipboard in Excel format
-#if	UNICODE_INTERNAL_BUFF
 	wchar_t *strW = BuffCBCopyUnicode(TRUE);
 	CBSetTextW(HVTWin, strW, 0);
 	free(strW);
-#else
-	BuffCBCopy(TRUE);
-#endif
 }
 
 void CVTWindow::OnEditPaste()
@@ -5400,17 +5392,16 @@
 
 	// \x96\xA2\x91\x97\x90M\x83f\x81[\x83^\x82\xAA\x82\xA0\x82\xE9\x8Fꍇ\x82͐\xE6\x82ɑ\x97\x90M\x82\xB7\x82\xE9
 	// \x83f\x81[\x83^\x97ʂ\xAA\x91\xBD\x82\xA2\x8Fꍇ\x82͑\x97\x90M\x82\xB5\x82\xAB\x82\xEA\x82Ȃ\xA2\x89”\\x90\xAB\x82\xAA\x82\xA0\x82\xE9
-#if	UNICODE_INTERNAL_BUFF
 	if (TalkStatus == IdTalkSendMem) {
-		SendMemContinuously();
+		SendMemContinuously();	// TODO \x95K\x97v?
 	}
-#endif
+
 	// \x91\x97\x90M\x89”\\x82ȏ\xF3\x91ԂłȂ\xAF\x82\xEA\x82΃G\x83\x89\x81[
 	if (TalkStatus != IdTalkKeyb) {
 		return 0;
 	}
 
-	COPYDATASTRUCT *cds = (COPYDATASTRUCT *)lParam;
+	const COPYDATASTRUCT *cds = (COPYDATASTRUCT *)lParam;
 	BroadCastReceive(cds);
 
 	return 1; // \x91\x97\x90M\x82ł\xAB\x82\xBD\x8Fꍇ\x82\xCD1\x82\xF0\x95Ԃ\xB7


Ttssh2-commit メーリングリストの案内
Zurück zum Archiv-Index