• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision7492 (tree)
Time2019-03-18 22:57:16
Authorzmatsuo

Log Message

vs2005でコンパイルできなくなっていた

Change Summary

Incremental Difference

--- branches/cmake/teraterm/teraterm/buffer.c (revision 7491)
+++ branches/cmake/teraterm/teraterm/buffer.c (revision 7492)
@@ -2376,9 +2376,10 @@
23762376 CurAttr.Back = AttrBuffBG[TmpPtr+i];
23772377 CurSel = CheckSelect(i,j);
23782378 {
2379+ wchar_t wc;
23792380 bufA[lenA] = CodeBuff[TmpPtr + i];
23802381 lenA++;
2381- wchar_t wc = CodeBuffW[TmpPtr + i];
2382+ wc = CodeBuffW[TmpPtr + i];
23822383 if (wc != 0) {
23832384 bufW[lenW] = wc;
23842385 lenW++;
@@ -2394,9 +2395,10 @@
23942395 (i+count<NumOfColumns) &&
23952396 ((AttrBuff[TmpPtr+i+count-1] & AttrKanji) != 0) ) {
23962397 {
2398+ wchar_t wc;
23972399 bufA[lenA] = CodeBuff[TmpPtr + i + count];
23982400 lenA++;
2399- wchar_t wc = CodeBuffW[TmpPtr + i + count];
2401+ wc = CodeBuffW[TmpPtr + i + count];
24002402 if (wc != 0) {
24012403 bufW[lenW] = wc;
24022404 lenW++;
--- branches/cmake/teraterm/ttpcmn/ttcmn.c (revision 7491)
+++ branches/cmake/teraterm/ttpcmn/ttcmn.c (revision 7492)
@@ -2034,17 +2034,19 @@
20342034 }
20352035 #endif
20362036
2037- int CodePage = *cv->CodePage;
2038- size_t mb_len;
2039- int r;
2040- char *mb_str = _WideCharToMultiByte(B, C, CodePage, &mb_len);
2041- if (mb_str == NULL) {
2042- r = 0;
2043- } else {
2044- r = CommTextOut(cv, mb_str, mb_len);
2045- free(mb_str);
2037+ {
2038+ int CodePage = *cv->CodePage;
2039+ size_t mb_len;
2040+ int r;
2041+ char *mb_str = _WideCharToMultiByte(B, C, CodePage, &mb_len);
2042+ if (mb_str == NULL) {
2043+ r = 0;
2044+ } else {
2045+ r = CommTextOut(cv, mb_str, mb_len);
2046+ free(mb_str);
2047+ }
2048+ return r;
20462049 }
2047- return r;
20482050 }
20492051
20502052 // TODO: UTF-16から直接変換して出力する
Show on old repository browser