[Ttssh2-commit] [7499] 誤ってコミットしてしまったためリバート

scmno****@osdn***** scmno****@osdn*****
2019年 3月 18日 (月) 23:13:16 JST


Revision: 7499
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7499
Author:   zmatsuo
Date:     2019-03-18 23:13:16 +0900 (Mon, 18 Mar 2019)
Log Message:
-----------
誤ってコミットしてしまったためリバート

Modified Paths:
--------------
    trunk/teraterm/teraterm/CMakeLists.txt
    trunk/teraterm/teraterm/buffer.c
    trunk/teraterm/teraterm/teraterm.cpp
    trunk/teraterm/teraterm/ttermpro.vcproj
    trunk/teraterm/teraterm/vtdisp.c
    trunk/teraterm/teraterm/vtterm.c
    trunk/teraterm/teraterm/vtwin.cpp

Removed Paths:
-------------
    trunk/teraterm/teraterm/vtdisp_delay.c
    trunk/teraterm/teraterm/vtdisp_delay.h

-------------- next part --------------
Modified: trunk/teraterm/teraterm/CMakeLists.txt
===================================================================
--- trunk/teraterm/teraterm/CMakeLists.txt	2019-03-18 14:01:57 UTC (rev 7498)
+++ trunk/teraterm/teraterm/CMakeLists.txt	2019-03-18 14:13:16 UTC (rev 7499)
@@ -98,8 +98,6 @@
   ttwsk.h
   vtdisp.c
   vtdisp.h
-  vtdisp_delay.c
-  vtdisp_delay.h
   vtterm.c
   vtterm.h
   vtwin.cpp

Modified: trunk/teraterm/teraterm/buffer.c
===================================================================
--- trunk/teraterm/teraterm/buffer.c	2019-03-18 14:01:57 UTC (rev 7498)
+++ trunk/teraterm/teraterm/buffer.c	2019-03-18 14:13:16 UTC (rev 7499)
@@ -88,7 +88,7 @@
 static BOOL BoxSelect;
 static POINT DblClkStart, DblClkEnd;
 
-int StrChangeStart, StrChangeCount;
+static int StrChangeStart, StrChangeCount;
 
 static BOOL SeveralPageSelect;  // add (2005.5.15 yutaka)
 
@@ -1900,7 +1900,6 @@
 			StrChangeStart = CursorX;
 		}
 		StrChangeCount++;
-		UpdateStr();
 	}
 }
 
@@ -2025,7 +2024,7 @@
 	}
 }
 
-void BuffUpdateRect2
+void BuffUpdateRect
   (int XStart, int YStart, int XEnd, int YEnd)
 // Display text in a rectangular region in the screen
 //   XStart: x position of the upper-left corner (screen cordinate)
@@ -2122,7 +2121,6 @@
 	}
 }
 
-#if 0
 void UpdateStr()
 // Display not-yet-displayed string
 {
@@ -2177,7 +2175,6 @@
 
 	StrChangeCount = 0;
 }
-#endif
 
 #if 0
 void UpdateStrUnicode(void)

Modified: trunk/teraterm/teraterm/teraterm.cpp
===================================================================
--- trunk/teraterm/teraterm/teraterm.cpp	2019-03-18 14:01:57 UTC (rev 7498)
+++ trunk/teraterm/teraterm/teraterm.cpp	2019-03-18 14:13:16 UTC (rev 7499)
@@ -47,7 +47,6 @@
 #include "keyboard.h"
 #include "dllutil.h"
 #include "compat_win.h"
-#include "vtdisp_delay.h"
 
 #include "teraapp.h"
 
@@ -303,13 +302,6 @@
 		Busy--;
 	}
 
-	if (Busy == 0) {
-		if (IsUpdateTerm()) {
-			UpdateTerm();
-			Busy++;
-		}
-	}
-
 	return (Busy>0);
 }
 

Modified: trunk/teraterm/teraterm/ttermpro.vcproj
===================================================================
--- trunk/teraterm/teraterm/ttermpro.vcproj	2019-03-18 14:01:57 UTC (rev 7498)
+++ trunk/teraterm/teraterm/ttermpro.vcproj	2019-03-18 14:13:16 UTC (rev 7499)
@@ -430,10 +430,6 @@
 				RelativePath="..\common\win16api.h"
 				>
 			</File>
-			<File
-				RelativePath="vtdisp_delay.c"
-				>
-			</File>
 		</Filter>
 	</Files>
 	<Globals>

Modified: trunk/teraterm/teraterm/vtdisp.c
===================================================================
--- trunk/teraterm/teraterm/vtdisp.c	2019-03-18 14:01:57 UTC (rev 7498)
+++ trunk/teraterm/teraterm/vtdisp.c	2019-03-18 14:13:16 UTC (rev 7499)
@@ -80,7 +80,7 @@
   {168,168,168}, {178,178,178}, {188,188,188}, {198,198,198}, {208,208,208}, {218,218,218}, {228,228,228}, {238,238,238}   // 248 - 255
 };
 
-int WinWidth, WinHeight;								// \x89\xE6\x96ʂɕ\\x8E\xA6\x82\xB3\x82\xEA\x82Ă\xA2\x82镶\x8E\x9A\x90\x94
+int WinWidth, WinHeight;
 static BOOL Active = FALSE;
 static BOOL CompletelyVisible;
 HFONT VTFont[AttrFontMask+1];
@@ -95,12 +95,10 @@
 RECT VirtualScreen;
 
 // --- scrolling status flags
-int WinOrgX, WinOrgY;		// \x8C\xBB\x8D݂̕\\x8E\xA6\x88ʒu
-int NewOrgX, NewOrgY;		// \x8DX\x90V\x8C\xE3\x82̕\\x8E\xA6\x88ʒu
-int ScrollBarVPos;			// \x83X\x83N\x83\x8D\x81[\x83\x8B\x83o\x81[\x82̈ʒu
+int WinOrgX, WinOrgY, NewOrgX, NewOrgY;
 
-int NumOfLines, NumOfColumns;	// \x83o\x83b\x83t\x83@\x83\x8A\x83\x93\x83O\x82\xB5\x82Ă\xA2\x82镶\x8E\x9A\x90\x94
-int PageStart, BuffEnd;			// \x95\\x8E\xA6\x82\xB5\x82Ă\xA2\x82\xE9\x83o\x83b\x83t\x83@\x93\xE0\x82̈ʒu
+int NumOfLines, NumOfColumns;
+int PageStart, BuffEnd;
 
 static BOOL CursorOnDBCS = FALSE;
 static LOGFONT VTlf;
@@ -132,7 +130,7 @@
 
 // scrolling
 static int ScrollCount = 0;
-int dScroll = 0;
+static int dScroll = 0;
 static int SRegionTop;
 static int SRegionBottom;
 
@@ -3181,7 +3179,6 @@
   if (ScrollCount>=ts.ScrollThreshold) DispUpdateScroll();
 }
 
-#if 0
 void DispUpdateScroll()
 {
   int d;
@@ -3287,7 +3284,6 @@
 
   if (IsCaretOn()) CaretOn();
 }
-#endif
 
 void DispScrollHomePos()
 {

Deleted: trunk/teraterm/teraterm/vtdisp_delay.c
===================================================================
--- trunk/teraterm/teraterm/vtdisp_delay.c	2019-03-18 14:01:57 UTC (rev 7498)
+++ trunk/teraterm/teraterm/vtdisp_delay.c	2019-03-18 14:13:16 UTC (rev 7499)
@@ -1,185 +0,0 @@
-/* Tera Term \x8D\x82\x91\xAC\x89\xBB\x83e\x83X\x83g */
-
-#include <windows.h>
-#include <time.h>
-#include <stdio.h>
-
-#include "tttypes.h"
-#include "ttwinman.h"
-#include "ttlib.h"
-#include "vtdisp.h"
-#include "vtdisp_delay.h"
-
-// buffer.c
-extern int StrChangeStart, StrChangeCount;
-extern int dScroll;
-
-#define DISPLAY_INTERVAL	(1000 / 30)		// (ms)
-//#define DISPLAY_INTERVAL	(1000)	// (ms)
-
-#define OutputDebugPrintf(...)
-
-void BuffUpdateRect2(int XStart, int YStart, int XEnd, int YEnd);
-
-////////////////////////////////////////
-
-typedef struct {
-	enum {
-		NONE,				// \x95`\x89\xE6\x82Ȃ\xB5
-		ONE_LINE,			// 1\x8Ds\x95`\x89\xE6
-		WHOLE_TERM,			// \x91S\x89\xE6\x96ʕ`\x89\xE6
-	} Type;
-
-	// ONE_LINE\x8E\x9E\x82̃f\x81[\x83^
-	int StrChangeStart;		// cursor\x82\xCCX
-	int CursorY;			// cursor\x82\xCCY
-	int StrChangeCount;		// \x95\xB6\x8E\x9A\x90\x94
-
-	// \x95\\x8E\xA6\x8AJ\x8En\x88ʒu
-	int NewOrgX;
-	int NewOrgY;
-
-	DWORD UpdateTick;
-
-	// scroll bar\x8F\xEE\x95\xF1
-	int ScrollBarVPos;
-} UpdateInfo_t;
-
-static UpdateInfo_t UpdateInfo;
-
-void UpdateStr()
-{
-	if (UpdateInfo.Type == NONE) {
-		if (StrChangeCount != 0) {
-			UpdateInfo.Type = ONE_LINE;
-			UpdateInfo.CursorY = CursorY;
-			UpdateInfo.StrChangeStart = StrChangeStart;
-			UpdateInfo.StrChangeCount = StrChangeCount;
-		}
-	} else if (UpdateInfo.Type == ONE_LINE) {
-		if (StrChangeCount == 0) {
-			;
-		} else if (UpdateInfo.CursorY != CursorY) {
-			UpdateInfo.Type = WHOLE_TERM;
-		} else if (UpdateInfo.StrChangeStart + UpdateInfo.StrChangeCount == StrChangeStart ) {
-			UpdateInfo.StrChangeCount += StrChangeCount;
-		} else {
-			UpdateInfo.StrChangeStart = 0;
-			UpdateInfo.StrChangeCount = NumOfColumns;
-		}
-	}
-
-	OutputDebugPrintf("%d (%d,%d)%d , (%d,%d)%d\n",
-					  UpdateInfo.Type,
-					  StrChangeStart, CursorY, StrChangeCount,
-					  UpdateInfo.StrChangeStart, UpdateInfo.CursorY, UpdateInfo.StrChangeCount);
-
-	StrChangeCount = 0;
-}
-
-void BuffUpdateRect(int XStart, int YStart, int XEnd, int YEnd)
-{
-	OutputDebugPrintf("BuffUpdateRect(%d,%d,%d,%d)\n",
-					  XStart, YStart, XEnd, YEnd);
-	UpdateInfo.Type = WHOLE_TERM;
-}
-
-void DispUpdateScroll()
-{
-	OutputDebugPrintf("DispUpdateScroll\n");
-	UpdateInfo.Type = WHOLE_TERM;
-	UpdateInfo.NewOrgX = NewOrgX;
-	UpdateInfo.NewOrgY = NewOrgY;
-	dScroll = 0;
-}
-
-void UpdateTerm()
-{
-	DWORD now = timeGetTime();
-	int NewOrgX;
-	int NewOrgY;
-	int ScrollBarUpdated = 0;
-	OutputDebugPrintf("UpdateTerm %d\n", UpdateInfo.Type);
-
-	if (UpdateInfo.Type == NONE) {
-		return;
-	}
-
-	NewOrgX = UpdateInfo.NewOrgX;
-	NewOrgY = UpdateInfo.NewOrgY;
-
-	/* Update normal scroll */
-	if (NewOrgX < 0) NewOrgX = 0;
-	if (NewOrgX > NumOfColumns - WinWidth)
-		NewOrgX = NumOfColumns - WinWidth;
-	if (NewOrgY < -PageStart)
-		NewOrgY = -PageStart;
-	if (NewOrgY > BuffEnd - WinHeight - PageStart)
-		NewOrgY = BuffEnd - WinHeight - PageStart;
-
-	if (NewOrgX != WinOrgX) {
-		SetScrollPos(HVTWin, SB_HORZ, NewOrgX, TRUE);
-		ScrollBarUpdated = 1;
-	}
-
-	if (((ts.AutoScrollOnlyInBottomLine != 0 || NewOrgY!=WinOrgY)) &&
-		(UpdateInfo.ScrollBarVPos != NewOrgY + PageStart))
-	{
-		SCROLLINFO scroll_info;
-		scroll_info.cbSize = sizeof(scroll_info);
-		scroll_info.fMask = SIF_PAGE | SIF_RANGE | SIF_POS;
-		scroll_info.nPage = WinHeight;
-		scroll_info.nMin = 0;
-		scroll_info.nMax = BuffEnd-WinHeight;
-
-		if ((BuffEnd==WinHeight) && (ts.EnableScrollBuff>0)) {
-			scroll_info.nMax = BuffEnd;
-			scroll_info.nPos = 0;
-		} else {
-			int max = BuffEnd - WinHeight;
-			scroll_info.nMax = BuffEnd;
-			scroll_info.nPos = NewOrgY+PageStart;
-		}
-
-		SetScrollInfo(HVTWin, SB_VERT, &scroll_info, TRUE);
-		UpdateInfo.ScrollBarVPos = scroll_info.nPos;
-		ScrollBarUpdated = 1;
-		OutputDebugPrintf("sb_vert %d-%d-%d,%d\n",
-						  scroll_info.nMin,
-						  scroll_info.nPos,
-						  scroll_info.nMax,
-						  scroll_info.nPage);
-	}
-
-#if 0
-	if (ScrollBarUpdated) {
-		// \x83X\x83N\x83\x8D\x81[\x83\x8B\x83o\x81[\x82\xAA\x8DX\x90V\x82\xB3\x82ꂽ\x8Fꍇ\x82͂\xB7\x82\xAE\x82ɕ`\x89悷\x82\xE9
-		InvalidateRect(HVTWin, NULL, FALSE);
-	} else
-#endif
-	if (UpdateInfo.Type == WHOLE_TERM || NewOrgY != WinOrgY) {
-		if ((now - UpdateInfo.UpdateTick) < DISPLAY_INTERVAL) {
-			return;
-		}
-		InvalidateRect(HVTWin, NULL, FALSE);
-	} else if (UpdateInfo.Type == ONE_LINE) {
-		BuffUpdateRect2(UpdateInfo.StrChangeStart, UpdateInfo.CursorY,
-						UpdateInfo.StrChangeStart + UpdateInfo.StrChangeCount, UpdateInfo.CursorY);
-	}
-
-	WinOrgX = NewOrgX;
-	WinOrgY = NewOrgY;
-	UpdateInfo.NewOrgX = 0;
-	UpdateInfo.NewOrgY = 0;
-	UpdateInfo.UpdateTick = now;
-	UpdateInfo.Type = NONE;
-
-}
-
-int IsUpdateTerm()
-{
-	if (UpdateInfo.Type == NONE) {
-		return 0;
-	}
-	return 1;
-}

Deleted: trunk/teraterm/teraterm/vtdisp_delay.h
===================================================================
--- trunk/teraterm/teraterm/vtdisp_delay.h	2019-03-18 14:01:57 UTC (rev 7498)
+++ trunk/teraterm/teraterm/vtdisp_delay.h	2019-03-18 14:13:16 UTC (rev 7499)
@@ -1,10 +0,0 @@
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int IsUpdateTerm();
-void UpdateTerm();
-
-#ifdef __cplusplus
-}
-#endif

Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2019-03-18 14:01:57 UTC (rev 7498)
+++ trunk/teraterm/teraterm/vtterm.c	2019-03-18 14:13:16 UTC (rev 7499)
@@ -54,8 +54,6 @@
 #include "clipboar.h"
 #include "codeconv.h"
 
-#include "vtdisp_delay.h"
-
 #include "vtterm.h"
 
 #ifdef _DEBUG
@@ -5750,12 +5748,7 @@
 
 	c = CommRead1Byte(&cv,&b);
 
-	if (c==0) {
-		if (IsUpdateTerm()) {
-			UpdateTerm();
-		}
-		return 0;
-	}
+	if (c==0) return 0;
 
 	CaretOff();
 	UpdateCaretPosition(FALSE);	// \x94\xF1\x83A\x83N\x83e\x83B\x83u\x82̏ꍇ\x82̂ݍĕ`\x89悷\x82\xE9
@@ -5814,9 +5807,7 @@
 			c = CommRead1Byte(&cv,&b);
 	}
 
-	if (IsUpdateTerm()) {
-		UpdateTerm();
-	}
+	BuffUpdateScroll();
 
 	BuffSetCaretWidth();
 	UnlockBuffer();

Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2019-03-18 14:01:57 UTC (rev 7498)
+++ trunk/teraterm/teraterm/vtwin.cpp	2019-03-18 14:13:16 UTC (rev 7499)
@@ -94,8 +94,6 @@
 static char THIS_FILE[] = __FILE__;
 #endif
 
-extern "C" void BuffUpdateRect2(int XStart, int YStart, int XEnd, int YEnd);
-
 // \x83E\x83B\x83\x93\x83h\x83E\x8Dő剻\x83{\x83^\x83\x93\x82\xF0\x97L\x8C\xF8\x82ɂ\xB7\x82\xE9 (2005.1.15 yutaka)
 #define WINDOW_MAXMIMUM_ENABLED 1
 
@@ -2657,7 +2655,7 @@
 
 	PaintWindow(PaintDC,ps.rcPaint,ps.fErase, &Xs,&Ys,&Xe,&Ye);
 	LockBuffer();
-	BuffUpdateRect2(Xs,Ys,Xe,Ye);
+	BuffUpdateRect(Xs,Ys,Xe,Ye);
 	UnlockBuffer();
 	DispEndPaint();
 


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