[Ttssh2-commit] [5331] logautoclosemode マクロコマンドを追加した。

svnno****@sourc***** svnno****@sourc*****
2013年 6月 24日 (月) 21:45:33 JST


Revision: 5331
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5331
Author:   yutakapon
Date:     2013-06-24 21:45:31 +0900 (Mon, 24 Jun 2013)
Log Message:
-----------
logautoclosemode マクロコマンドを追加した。

マクロ内で logopen でログを開いている状態で、マクロを停止させた場合、
自動的にログファイルをクローズする。
マクロを終了させたのに、裏でログが採取され続けているような状況を回避したい場合に利用する。

Modified Paths:
--------------
    trunk/teraterm/common/helpid.h
    trunk/teraterm/teraterm/ttdde.c
    trunk/teraterm/ttpmacro/ttl.c
    trunk/teraterm/ttpmacro/ttmdde.h
    trunk/teraterm/ttpmacro/ttmparse.c
    trunk/teraterm/ttpmacro/ttmparse.h

-------------- next part --------------
Modified: trunk/teraterm/common/helpid.h
===================================================================
--- trunk/teraterm/common/helpid.h	2013-06-23 14:24:47 UTC (rev 5330)
+++ trunk/teraterm/common/helpid.h	2013-06-24 12:45:31 UTC (rev 5331)
@@ -255,6 +255,7 @@
 #define HlpMacroCommandKmtsend          92057
 #define HlpMacroCommandListBox          92198
 #define HlpMacroCommandLoadkeymap       92058
+#define HlpMacroCommandLogautoclose     92211
 #define HlpMacroCommandLogclose         92059
 #define HlpMacroCommandLoginfo          92152
 #define HlpMacroCommandLogopen          92060

Modified: trunk/teraterm/teraterm/ttdde.c
===================================================================
--- trunk/teraterm/teraterm/ttdde.c	2013-06-23 14:24:47 UTC (rev 5330)
+++ trunk/teraterm/teraterm/ttdde.c	2013-06-24 12:45:31 UTC (rev 5331)
@@ -55,6 +55,8 @@
 static WORD ParamXmodemOpt;
 static char ParamSecondFileName[MaxStrLen];
 
+static BOOL AutoLogClose = FALSE;
+
 #define CBBufSize TermWidthMax
 
 
@@ -368,6 +370,7 @@
 #define CmdDispStr      'U'
 #define CmdLogInfo      'V'
 #define CmdLogRotate    'W'
+#define CmdLogAutoClose 'X'
 
 HDDEDATA AcceptExecute(HSZ TopicHSz, HDDEDATA Data)
 {
@@ -560,6 +563,10 @@
 		}
 		break;
 
+	case CmdLogAutoClose:
+		AutoLogClose = (ParamBinaryFlag!=0);
+		break;
+
 	case CmdLogClose:
 		if (LogVar != NULL) FileTransEnd(OpLog);
 		break;
@@ -1040,6 +1047,10 @@
 			}
 			break;
 		case XTYP_DISCONNECT:
+			// \x83}\x83N\x83\x8D\x8FI\x97\xB9\x8E\x9E\x81A\x83\x8D\x83O\x8D̎\xE6\x82\xF0\x8E\xA9\x93\xAE\x93I\x82ɒ\xE2\x8E~\x82\xB7\x82\xE9\x81B(2013.6.24 yutaka)
+			if (AutoLogClose) {
+				if (LogVar != NULL) FileTransEnd(OpLog);
+			}
 			ConvH = 0;
 			PostMessage(HVTWin,WM_USER_DDEEND,0,0);
 			break;

Modified: trunk/teraterm/ttpmacro/ttl.c
===================================================================
--- trunk/teraterm/ttpmacro/ttl.c	2013-06-23 14:24:47 UTC (rev 5330)
+++ trunk/teraterm/ttpmacro/ttl.c	2013-06-24 12:45:31 UTC (rev 5331)
@@ -5860,6 +5860,8 @@
 			Err = TTLListBox(); break;
 		case RsvLoadKeyMap:
 			Err = TTLCommCmdFile(CmdLoadKeyMap,0); break;
+		case RsvLogAutoClose:
+			Err = TTLCommCmdBin(CmdLogAutoClose, 0); break;
 		case RsvLogClose:
 			Err = TTLCommCmd(CmdLogClose,0); break;
 		case RsvLogInfo:

Modified: trunk/teraterm/ttpmacro/ttmdde.h
===================================================================
--- trunk/teraterm/ttpmacro/ttmdde.h	2013-06-23 14:24:47 UTC (rev 5330)
+++ trunk/teraterm/ttpmacro/ttmdde.h	2013-06-24 12:45:31 UTC (rev 5331)
@@ -61,6 +61,7 @@
 #define CmdDispStr      'U'
 #define CmdLogInfo      'V'
 #define CmdLogRotate    'W'
+#define CmdLogAutoClose 'X'
 
 #ifdef __cplusplus
 extern "C" {

Modified: trunk/teraterm/ttpmacro/ttmparse.c
===================================================================
--- trunk/teraterm/ttpmacro/ttmparse.c	2013-06-23 14:24:47 UTC (rev 5330)
+++ trunk/teraterm/ttpmacro/ttmparse.c	2013-06-24 12:45:31 UTC (rev 5331)
@@ -275,6 +275,7 @@
 	case 'l':
 		if (_stricmp(Str,"listbox")==0) *WordId = RsvListBox;
 		else if (_stricmp(Str,"loadkeymap")==0) *WordId = RsvLoadKeyMap;
+		else if (_stricmp(Str,"logautoclosemode")==0) *WordId = RsvLogAutoClose;
 		else if (_stricmp(Str,"logclose")==0) *WordId = RsvLogClose;
 		else if (_stricmp(Str,"loginfo")==0) *WordId = RsvLogInfo;
 		else if (_stricmp(Str,"logopen")==0) *WordId = RsvLogOpen;

Modified: trunk/teraterm/ttpmacro/ttmparse.h
===================================================================
--- trunk/teraterm/ttpmacro/ttmparse.h	2013-06-23 14:24:47 UTC (rev 5330)
+++ trunk/teraterm/ttpmacro/ttmparse.h	2013-06-24 12:45:31 UTC (rev 5331)
@@ -240,6 +240,7 @@
 #define RsvChecksum32   208
 #define RsvChecksum32File   209
 #define RsvBringupBox   210
+#define RsvLogAutoClose 211
 
 #define RsvOperator     1000
 #define RsvBNot         1001



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