[Ttssh2-commit] [9069] ファイル送信ポーズフラグを filesys.cpp へ移動

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


Revision: 9069
          https://osdn.net/projects/ttssh2/scm/svn/commits/9069
Author:   zmatsuo
Date:     2020-12-20 21:09:44 +0900 (Sun, 20 Dec 2020)
Log Message:
-----------
ファイル送信ポーズフラグを filesys.cpp へ移動

- TComVar 構造体から FilePause を削除
- TFileVar#filesys.cpp へ FilePause を追加
- FileTransPause()#filesys.cpp -> FileSendPause()

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/ftdlg.cpp

-------------- next part --------------
Modified: trunk/teraterm/common/tttypes.h
===================================================================
--- trunk/teraterm/common/tttypes.h	2020-12-20 12:09:35 UTC (rev 9068)
+++ trunk/teraterm/common/tttypes.h	2020-12-20 12:09:44 UTC (rev 9069)
@@ -1071,7 +1071,7 @@
 	int reserve_7[3];		// BinPtr, BStart, BCount;
 	int reserve_1[2];		// DStart, DCount;
 	int reserve_8;			// BinSkip;
-	WORD FilePause;
+	WORD reserve_9;			// FilePause;
 	BOOL ProtoFlag;
 	/* message flag */
 	WORD NoMsg;

Modified: trunk/teraterm/teraterm/commlib.c
===================================================================
--- trunk/teraterm/teraterm/commlib.c	2020-12-20 12:09:35 UTC (rev 9068)
+++ trunk/teraterm/teraterm/commlib.c	2020-12-20 12:09:44 UTC (rev 9069)
@@ -134,7 +134,6 @@
 	cv->Ready = FALSE;
 
 // log-buffer variables
-	cv->FilePause = 0;
 	cv->ProtoFlag = FALSE;
 /* message flag */
 	cv->NoMsg = 0;

Modified: trunk/teraterm/teraterm/filesys.cpp
===================================================================
--- trunk/teraterm/teraterm/filesys.cpp	2020-12-20 12:09:35 UTC (rev 9068)
+++ trunk/teraterm/teraterm/filesys.cpp	2020-12-20 12:09:44 UTC (rev 9069)
@@ -67,6 +67,7 @@
 	int ProgStat;
 
 	DWORD StartTime;
+	BOOL FilePause;
 } TFileVar;
 typedef TFileVar *PFileVar;
 
@@ -105,7 +106,7 @@
 
 	fv->StartTime = 0;
 	fv->ProgStat = 0;
-	cv.FilePause &= ~(OpSendFile);
+	fv->FilePause = FALSE;
 
 	if (FTDlg!=NULL)
 	{
@@ -415,13 +416,14 @@
 	EndDdeCmnd(0);
 }
 
-void FileTransPause(WORD OpId, BOOL Pause)
+void FileSendPause(BOOL Pause)
 {
+	PFileVar fv = SendVar;
 	if (Pause) {
-		cv.FilePause |= OpId;
+		fv->FilePause = TRUE;
 	}
 	else {
-		cv.FilePause &= ~OpId;
+		fv->FilePause = FALSE;
 	}
 }
 
@@ -453,9 +455,9 @@
 	WORD c, fc;
 	LONG BCOld;
 	DWORD read_bytes;
+	PFileVar fv = SendVar;
 
-	if ((SendDlg == NULL) ||
-		((cv.FilePause & OpSendFile) != 0))
+	if ((SendDlg == NULL) || (fv->FilePause == TRUE))
 		return;
 
 	BCOld = SendVar->ByteCount;
@@ -510,6 +512,7 @@
 	WORD c, fc;
 	LONG BCOld;
 	DWORD read_bytes;
+	PFileVar fv = SendVar;
 
 	if (cv.PortType == IdSerial && ts.FileSendHighSpeedMode &&
 	    BinaryMode && !FileBracketMode && !cv.TelFlag &&
@@ -517,8 +520,7 @@
 		return FileSendBinayBoost();
 	}
 
-	if ((SendDlg==NULL) ||
-	    ((cv.FilePause & OpSendFile) !=0))
+	if ((SendDlg == NULL) || (fv->FilePause == TRUE))
 		return;
 
 	BCOld = SendVar->ByteCount;

Modified: trunk/teraterm/teraterm/filesys.h
===================================================================
--- trunk/teraterm/teraterm/filesys.h	2020-12-20 12:09:35 UTC (rev 9068)
+++ trunk/teraterm/teraterm/filesys.h	2020-12-20 12:09:44 UTC (rev 9069)
@@ -41,7 +41,7 @@
 BOOL FileSendStart2(const char *filename, int binary);
 void FileSend(void);
 void FileSendEnd(void);
-void FileTransPause(WORD OpId, BOOL Pause);
+void FileSendPause(BOOL Pause);
 
 void ProtoEnd(void);
 int ProtoDlgParse(void);

Modified: trunk/teraterm/teraterm/ftdlg.cpp
===================================================================
--- trunk/teraterm/teraterm/ftdlg.cpp	2020-12-20 12:09:35 UTC (rev 9068)
+++ trunk/teraterm/teraterm/ftdlg.cpp	2020-12-20 12:09:44 UTC (rev 9069)
@@ -303,7 +303,7 @@
 				FLogPause(Pause);
 			}
 			else {
-				FileTransPause(OpId, Pause);
+				FileSendPause(Pause);
 			}
 			return TRUE;
 		case IDC_TRANSHELP:


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