[Ttssh2-commit] [7492] vs2005でコンパイルできなくなっていた

scmno****@osdn***** scmno****@osdn*****
2019年 3月 18日 (月) 22:57:16 JST


Revision: 7492
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7492
Author:   zmatsuo
Date:     2019-03-18 22:57:16 +0900 (Mon, 18 Mar 2019)
Log Message:
-----------
vs2005でコンパイルできなくなっていた

Modified Paths:
--------------
    branches/cmake/teraterm/teraterm/buffer.c
    branches/cmake/teraterm/ttpcmn/ttcmn.c

-------------- next part --------------
Modified: branches/cmake/teraterm/teraterm/buffer.c
===================================================================
--- branches/cmake/teraterm/teraterm/buffer.c	2019-03-18 13:57:04 UTC (rev 7491)
+++ branches/cmake/teraterm/teraterm/buffer.c	2019-03-18 13:57:16 UTC (rev 7492)
@@ -2376,9 +2376,10 @@
 			CurAttr.Back = AttrBuffBG[TmpPtr+i];
 			CurSel = CheckSelect(i,j);
 			{
+				wchar_t wc;
 				bufA[lenA] = CodeBuff[TmpPtr + i];
 				lenA++;
-				wchar_t wc = CodeBuffW[TmpPtr + i];
+				wc = CodeBuffW[TmpPtr + i];
 				if (wc != 0) {
 					bufW[lenW] = wc;
 					lenW++;
@@ -2394,9 +2395,10 @@
 			        (i+count<NumOfColumns) &&
 			        ((AttrBuff[TmpPtr+i+count-1] & AttrKanji) != 0) ) {
 				{
+					wchar_t wc;
 					bufA[lenA] = CodeBuff[TmpPtr + i + count];
 					lenA++;
-					wchar_t wc = CodeBuffW[TmpPtr + i + count];
+					wc = CodeBuffW[TmpPtr + i + count];
 					if (wc != 0) {
 						bufW[lenW] = wc;
 						lenW++;

Modified: branches/cmake/teraterm/ttpcmn/ttcmn.c
===================================================================
--- branches/cmake/teraterm/ttpcmn/ttcmn.c	2019-03-18 13:57:04 UTC (rev 7491)
+++ branches/cmake/teraterm/ttpcmn/ttcmn.c	2019-03-18 13:57:16 UTC (rev 7492)
@@ -2034,17 +2034,19 @@
 	}
 #endif
 
-	int CodePage = *cv->CodePage;
-	size_t mb_len;
-	int r;
-	char *mb_str = _WideCharToMultiByte(B, C, CodePage, &mb_len);
-	if (mb_str == NULL) {
-		r = 0;
-	} else {
-		r = CommTextOut(cv, mb_str, mb_len);
-		free(mb_str);
+	{
+		int CodePage = *cv->CodePage;
+		size_t mb_len;
+		int r;
+		char *mb_str = _WideCharToMultiByte(B, C, CodePage, &mb_len);
+		if (mb_str == NULL) {
+			r = 0;
+		} else {
+			r = CommTextOut(cv, mb_str, mb_len);
+			free(mb_str);
+		}
+		return r;
 	}
-	return r;
 }
 
 // TODO: UTF-16\x82\xA9\x82璼\x90ڕϊ\xB7\x82\xB5\x82ďo\x97͂\xB7\x82\xE9


Ttssh2-commit メーリングリストの案内