[Ttssh2-commit] [9103] ProtoFlagを TComVar から filesys_proto.cpp へ移動

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2020年 12月 20日 (日) 21:16:14 JST


Revision: 9103
          https://osdn.net/projects/ttssh2/scm/svn/commits/9103
Author:   zmatsuo
Date:     2020-12-20 21:16:14 +0900 (Sun, 20 Dec 2020)
Log Message:
-----------
ProtoFlagを TComVar から filesys_proto.cpp へ移動

Modified Paths:
--------------
    trunk/teraterm/common/tttypes.h
    trunk/teraterm/teraterm/commlib.c
    trunk/teraterm/teraterm/filesys.cpp
    trunk/teraterm/teraterm/filesys.h
    trunk/teraterm/teraterm/filesys_log.cpp
    trunk/teraterm/teraterm/filesys_proto.cpp
    trunk/teraterm/teraterm/teraterm.cpp

-------------- next part --------------
Modified: trunk/teraterm/common/tttypes.h
===================================================================
--- trunk/teraterm/common/tttypes.h	2020-12-20 12:15:58 UTC (rev 9102)
+++ trunk/teraterm/common/tttypes.h	2020-12-20 12:16:14 UTC (rev 9103)
@@ -1043,7 +1043,7 @@
 	int reserve_1[2];		// DStart, DCount;
 	int reserve_8;			// BinSkip;
 	WORD reserve_9;			// FilePause;
-	BOOL ProtoFlag;
+	BOOL reserve_10;		// ProtoFlag;
 	/* message flag */
 	WORD NoMsg;
 	/* if TRUE, teraterm trys to connect other protocol family */

Modified: trunk/teraterm/teraterm/commlib.c
===================================================================
--- trunk/teraterm/teraterm/commlib.c	2020-12-20 12:15:58 UTC (rev 9102)
+++ trunk/teraterm/teraterm/commlib.c	2020-12-20 12:16:14 UTC (rev 9103)
@@ -133,8 +133,6 @@
 	cv->Open = FALSE;
 	cv->Ready = FALSE;
 
-// log-buffer variables
-	cv->ProtoFlag = FALSE;
 /* message flag */
 	cv->NoMsg = 0;
 

Modified: trunk/teraterm/teraterm/filesys.cpp
===================================================================
--- trunk/teraterm/teraterm/filesys.cpp	2020-12-20 12:15:58 UTC (rev 9102)
+++ trunk/teraterm/teraterm/filesys.cpp	2020-12-20 12:16:14 UTC (rev 9103)
@@ -319,7 +319,7 @@
 	if (! cv.Ready || FSend) {
 		return FALSE;
 	}
-	if (cv.ProtoFlag)
+	if (ProtoGetProtoFlag())
 	{
 		FreeFileVar(&SendVar);
 		return FALSE;

Modified: trunk/teraterm/teraterm/filesys.h
===================================================================
--- trunk/teraterm/teraterm/filesys.h	2020-12-20 12:15:58 UTC (rev 9102)
+++ trunk/teraterm/teraterm/filesys.h	2020-12-20 12:16:14 UTC (rev 9103)
@@ -34,8 +34,8 @@
 extern "C" {
 #endif
 
+// filesys.cpp
 BOOL IsSendVarNULL(void);
-BOOL IsFileVarNULL(void);
 
 BOOL FileSendStart(const wchar_t *filename, int binary);
 void FileSend(void);
@@ -42,6 +42,9 @@
 void FileSendEnd(void);
 void FileSendPause(BOOL Pause);
 
+// filesys_proto.cpp
+BOOL ProtoGetProtoFlag(void);
+BOOL IsFileVarNULL(void);
 void ProtoEnd(void);
 int ProtoDlgParse(void);
 void ProtoDlgTimeOut(void);

Modified: trunk/teraterm/teraterm/filesys_log.cpp
===================================================================
--- trunk/teraterm/teraterm/filesys_log.cpp	2020-12-20 12:15:58 UTC (rev 9102)
+++ trunk/teraterm/teraterm/filesys_log.cpp	2020-12-20 12:16:14 UTC (rev 9103)
@@ -58,6 +58,7 @@
 
 #include "filesys_log_res.h"
 #include "filesys_log.h"
+#include "filesys.h"  // for ProtoGetProtoFlag()
 
 /*
    Line Head flag for timestamping
@@ -992,7 +993,7 @@
 	DWORD WriteBufLen = 0;
 	PCHAR WriteBuf = (PCHAR)malloc(WriteBufMax);
 	while (Get1(Buf,&Start,&Count,&b)) {
-		if (FLogIsPause() || (cv.ProtoFlag)) {
+		if (FLogIsPause() || ProtoGetProtoFlag()) {
 			continue;
 		}
 
@@ -1029,7 +1030,7 @@
 		cv_BStart = Start;
 		cv_BCount = Count;
 	}
-	if (FLogIsPause() || cv.ProtoFlag) return;
+	if (FLogIsPause() || ProtoGetProtoFlag()) return;
 	LogVar->FLogDlg->RefreshNum(LogVar->StartTime, LogVar->FileSize, LogVar->ByteCount);
 
 
@@ -1418,7 +1419,7 @@
 //void Log1Bin(PComVar cv, BYTE b)
 static void Log1Bin(BYTE b)
 {
-	if (LogVar->IsPause || cv.ProtoFlag) {
+	if (LogVar->IsPause || ProtoGetProtoFlag()) {
 		return;
 	}
 	if (cv_BinSkip > 0) {

Modified: trunk/teraterm/teraterm/filesys_proto.cpp
===================================================================
--- trunk/teraterm/teraterm/filesys_proto.cpp	2020-12-20 12:15:58 UTC (rev 9102)
+++ trunk/teraterm/teraterm/filesys_proto.cpp	2020-12-20 12:16:14 UTC (rev 9103)
@@ -102,6 +102,7 @@
 extern BOOL FSend;
 
 static PProtoDlg PtDlg = NULL;
+static BOOL cv_ProtoFlag = FALSE;
 
 static void _SetDlgTime(TFileVarProto *fv, DWORD elapsed, int bytes)
 {
@@ -362,7 +363,7 @@
 
 static BOOL ProtoStart(void)
 {
-	if (cv.ProtoFlag)
+	if (cv_ProtoFlag)
 		return FALSE;
 	if (FSend)
 	{
@@ -376,15 +377,15 @@
 	{
 		return FALSE;
 	}
-	cv.ProtoFlag = TRUE;
+	cv_ProtoFlag = TRUE;
 	return TRUE;
 }
 
 void ProtoEnd(void)
 {
-	if (! cv.ProtoFlag)
+	if (! cv_ProtoFlag)
 		return;
-	cv.ProtoFlag = FALSE;
+	cv_ProtoFlag = FALSE;
 
 	/* Enable transmit delay (serial port) */
 	cv.DelayFlag = TRUE;
@@ -734,7 +735,7 @@
 
 /**
  *	OnIdle()#teraterm.cpp\x82\xA9\x82\xE7\x83R\x81[\x83\x8B\x82\xB3\x82\xEA\x82\xE9
- *		cv.ProtoFlag \x82\xAA 0 \x88ȊO\x82̂Ƃ\xAB
+ *		cv_ProtoFlag \x82\xAA 0 \x88ȊO\x82̂Ƃ\xAB
  *	@retval		0		continue
  *				1/2		ActiveWin(\x83O\x83\x8D\x81[\x83o\x83\x8B\x95ϐ\x94)\x82̒l(IdVT=1/IdTek=2)
  *				\x92\x8D \x8D\xA1\x82̂Ƃ\xB1\x82\xEB\x8ÊĂ\xE7\x82\xEA\x82Ă\xA2\x82\xE9
@@ -1675,3 +1676,8 @@
 {
 	return FileVar == NULL;
 }
+
+BOOL ProtoGetProtoFlag(void)
+{
+	return cv_ProtoFlag;
+}

Modified: trunk/teraterm/teraterm/teraterm.cpp
===================================================================
--- trunk/teraterm/teraterm/teraterm.cpp	2020-12-20 12:15:58 UTC (rev 9102)
+++ trunk/teraterm/teraterm/teraterm.cpp	2020-12-20 12:16:14 UTC (rev 9103)
@@ -142,7 +142,7 @@
 		}
 		else {
 			int Change;
-			if (cv.ProtoFlag) Change = ProtoDlgParse();
+			if (ProtoGetProtoFlag()) Change = ProtoDlgParse();
 			else {
 				switch (ActiveWin) {
 				case IdVT:


Ttssh2-commit メーリングリストの案内
Back to archive index