[Ttssh2-commit] [6889] senlnmulticast を追加 Ticket : #37414

svnno****@sourc***** svnno****@sourc*****
2017年 8月 4日 (金) 12:05:44 JST


Revision: 6889
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6889
Author:   doda
Date:     2017-08-04 12:05:43 +0900 (Fri, 04 Aug 2017)
Log Message:
-----------
senlnmulticast を追加 Ticket: #37414

取りあえず動作は sendlnbroadcast 準拠。(同じ関数を使っているから)

Ticket Links:
------------
    http://sourceforge.jp/projects/ttssh2/tracker/detail/37414

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/history.html
    trunk/teraterm/ttpmacro/ttl.c
    trunk/teraterm/ttpmacro/ttmparse.c
    trunk/teraterm/ttpmacro/ttmparse.h

Added Paths:
-----------
    trunk/doc/en/html/macro/command/sendlnmulticast.html
    trunk/doc/ja/html/macro/command/sendlnmulticast.html
    trunk/tests/#37414-sendlnmulticast.ttl

-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2017-07-26 03:47:58 UTC (rev 6888)
+++ trunk/doc/en/html/about/history.html	2017-08-04 03:05:43 UTC (rev 6889)
@@ -44,6 +44,7 @@
         <ul>
           <li>added the <a href="../setup/teraterm-misc.html#LogTimestampUTC">LogTimestampUTC</a> entry in the teraterm.ini file. The default is off.</li>
         </ul></li>
+      <li>added the <a href="../macro/command/sendlnmulticast.html">sendlnmulticast</a> command.</li>
     </ul>
   </li>
 

Added: trunk/doc/en/html/macro/command/sendlnmulticast.html
===================================================================
--- trunk/doc/en/html/macro/command/sendlnmulticast.html	                        (rev 0)
+++ trunk/doc/en/html/macro/command/sendlnmulticast.html	2017-08-04 03:05:43 UTC (rev 6889)
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+  "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+  <title>sendlnmulticast</title>
+  <meta http-equiv="Content-Style-Type" content="text/css">
+  <link rel="stylesheet" href="../../style.css" type="text/css">
+</head>
+
+<body>
+
+
+<h1>sendlnmulticast</h1>
+
+<p>
+Multicast the data with new-line.
+</p>
+
+<pre class="macro-syntax">
+sendlnmulticast &lt;multicastname&gt; &lt;data1&gt; &lt;data2&gt;....
+</pre>
+
+<h2>Remarks</h2>
+
+<p>
+Causes Tera Term to multicast characters followed by a new-line character to selected terminals, and then the data is sent to the host.<br>
+Format of &lt;data&gt; is the same as the "<a href="sendmulticast.html">sendmulticast</a>" command.
+</p>
+
+<h2>Example</h2>
+
+<pre class="macro-example">
+mcastname = "multicast-test"
+
+connect "server-a"
+setmulticastname mcastname
+
+unlink
+
+connect "server-b"
+setmulticastname mcastname
+
+sendlnmulticast mcastname "ls -l"
+</pre>
+
+<h2>See also</h2>
+<ul>
+  <li><a href="sendmulticast.html">sendmulticast</a></li>
+  <li><a href="setmulticastname.html">setmulticastname</a></li>
+</ul>
+
+
+</body>
+</html>

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2017-07-26 03:47:58 UTC (rev 6888)
+++ trunk/doc/ja/html/about/history.html	2017-08-04 03:05:43 UTC (rev 6889)
@@ -44,6 +44,7 @@
         <ul>
           <li>teraterm.ini \x82\xC9 <a href="../setup/teraterm-misc.html#LogTimestampUTC">LogTimestampUTC</a> \x83G\x83\x93\x83g\x83\x8A\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B\x83f\x83t\x83H\x83\x8B\x83g\x82\xCDoff\x81B</li>
         </ul></li>
+      <li><a href="../macro/command/sendlnmulticast.html">sendlnmulticast</a> \x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 

Added: trunk/doc/ja/html/macro/command/sendlnmulticast.html
===================================================================
--- trunk/doc/ja/html/macro/command/sendlnmulticast.html	                        (rev 0)
+++ trunk/doc/ja/html/macro/command/sendlnmulticast.html	2017-08-04 03:05:43 UTC (rev 6889)
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+  "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+  <title>sendlnmulticast</title>
+  <meta http-equiv="Content-Style-Type" content="text/css">
+  <link rel="stylesheet" href="../../style.css" type="text/css">
+</head>
+
+<body>
+
+
+<h1>sendlnmulticast</h1>
+
+<p>
+\x83f\x81[\x83^\x82Ɖ\xFC\x8Ds\x82\xF0\x83}\x83\x8B\x83`\x83L\x83\x83\x83X\x83g\x91\x97\x90M\x82\xB7\x82\xE9\x81B
+</p>
+
+<pre class="macro-syntax">
+sendlnmulticast &lt;multicastname&gt; &lt;data1&gt; &lt;data2&gt;....
+</pre>
+
+<h2>\x89\xF0\x90\xE0</h2>
+
+<p>
+\x95\xB6\x8E\x9A\x97\xF1\x82Ƃ\xBB\x82\xEA\x82ɑ\xB1\x82\xAD\x89\xFC\x8Ds\x95\xB6\x8E\x9A\x82\xF0\x81A\x8Ew\x92肵\x82\xBD\x92[\x96\x96\x82Ƀ}\x83\x8B\x83`\x83L\x83\x83\x83X\x83g\x91\x97\x90M\x82\xB7\x82\xE9\x81B<br>
+&lt;data&gt; \x82̌`\x8E\xAE\x82́A<a href="sendmulticast.html">"sendmulticast"</a>\x83R\x83}\x83\x93\x83h\x82Ɠ\xAF\x82\xB6\x81B
+</p>
+
+<h2>\x97\xE1</h2>
+
+<pre class="macro-example">
+mcastname = "multicast-test"
+
+connect "server-a"
+setmulticastname mcastname
+
+unlink
+
+connect "server-b"
+setmulticastname mcastname
+
+sendlnmulticast mcastname "ls -l"
+</pre>
+
+<h2>\x8EQ\x8F\xC6</h2>
+<ul>
+  <li><a href="sendmulticast.html">sendmulticast</a></li>
+  <li><a href="setmulticastname.html">setmulticastname</a></li>
+</ul>
+
+</body>
+</html>

Modified: trunk/teraterm/ttpmacro/ttl.c
===================================================================
--- trunk/teraterm/ttpmacro/ttl.c	2017-07-26 03:47:58 UTC (rev 6888)
+++ trunk/teraterm/ttpmacro/ttl.c	2017-08-04 03:05:43 UTC (rev 6889)
@@ -4080,6 +4080,7 @@
 	return 0;
 }
 
+// sendbroadcast / sendlnbroadcast \x82̓\xF1\x82‚\xA9\x82痘\x97p (crlf\x82̒l\x82œ\xAE\x8D\xEC\x82\xF0\x95ς\xA6\x82\xE9)
 static WORD TTLSendBroadcast(BOOL crlf)
 {
 	TStrVal buf;
@@ -4095,7 +4096,6 @@
 	return SendCmnd(CmdSendBroadcast, 0);
 }
 
-// "setmulticastname"\x83R\x83}\x83\x93\x83h (2009.3.5 yutaka)
 WORD TTLSetMulticastName()
 {
 	TStrVal Str;
@@ -4109,8 +4109,8 @@
 	return SendCmnd(CmdSetMulticastName, 0);
 }
 
-// "sendmulticast"\x83R\x83}\x83\x93\x83h (2009.3.5 yutaka)
-WORD TTLSendMulticast()
+// sendmulticast / sendlnmulticast \x82̓\xF1\x82‚\xA9\x82痘\x97p (crlf\x82̒l\x82œ\xAE\x8D\xEC\x82\xF0\x95ς\xA6\x82\xE9)
+WORD TTLSendMulticast(BOOL crlf)
 {
 	TStrVal buf, Str;
 	WORD Err;
@@ -4124,7 +4124,7 @@
 	if (Err!=0) return Err;
 	SetFile(Str);
 
-	if ((Err = GetBroadcastString(buf, MaxStrLen, FALSE)) != 0)
+	if ((Err = GetBroadcastString(buf, MaxStrLen, crlf)) != 0)
 		return Err;
 
 	SetSecondFile(buf);
@@ -6209,8 +6209,10 @@
 			Err = TTLSendBroadcast(FALSE); break;
 		case RsvSendlnBroadcast:
 			Err = TTLSendBroadcast(TRUE); break;
+		case RsvSendlnMulticast:
+			Err = TTLSendMulticast(TRUE); break;
 		case RsvSendMulticast:
-			Err = TTLSendMulticast(); break;
+			Err = TTLSendMulticast(FALSE); break;
 		case RsvSetMulticastName:
 			Err = TTLSetMulticastName(); break;
 		case RsvSendFile:

Modified: trunk/teraterm/ttpmacro/ttmparse.c
===================================================================
--- trunk/teraterm/ttpmacro/ttmparse.c	2017-07-26 03:47:58 UTC (rev 6888)
+++ trunk/teraterm/ttpmacro/ttmparse.c	2017-08-04 03:05:43 UTC (rev 6889)
@@ -358,6 +358,7 @@
 		else if (_stricmp(Str,"sendbreak")==0) *WordId = RsvSendBreak;
 		else if (_stricmp(Str,"sendbroadcast")==0) *WordId = RsvSendBroadcast;
 		else if (_stricmp(Str,"sendlnbroadcast")==0) *WordId = RsvSendlnBroadcast;
+		else if (_stricmp(Str,"sendlnmulticast")==0) *WordId = RsvSendlnMulticast;
 		else if (_stricmp(Str,"sendmulticast")==0) *WordId = RsvSendMulticast;
 		else if (_stricmp(Str,"setfileattr")==0) *WordId = RsvSetFileAttr;
 		else if (_stricmp(Str,"setmulticastname")==0) *WordId = RsvSetMulticastName;

Modified: trunk/teraterm/ttpmacro/ttmparse.h
===================================================================
--- trunk/teraterm/ttpmacro/ttmparse.h	2017-07-26 03:47:58 UTC (rev 6888)
+++ trunk/teraterm/ttpmacro/ttmparse.h	2017-08-04 03:05:43 UTC (rev 6889)
@@ -232,6 +232,7 @@
 #define RsvFileUnLock   154
 #define RsvContinue     155
 #define RsvRegexOption  156
+#define RsvSendlnMulticast 157
 
 #define RsvSetDebug     175
 #define RsvYmodemRecv   176

Added: trunk/tests/#37414-sendlnmulticast.ttl
===================================================================
--- trunk/tests/#37414-sendlnmulticast.ttl	                        (rev 0)
+++ trunk/tests/#37414-sendlnmulticast.ttl	2017-08-04 03:05:43 UTC (rev 6889)
@@ -0,0 +1,27 @@
+mcast = "multicast-test"
+
+for i 1 3
+	call opentt
+	unlink
+next
+
+call opentt
+
+callmenu 50814
+
+sendlnmulticast mcast "date"
+
+pause 1
+
+sendlnmulticast mcast "echo 1" "echo 2" "echo 3"
+
+pause 5
+
+sendlnmulticast mcast "exit"
+end
+
+:opentt
+	cygconnect
+	wait "%" "$" "#"
+	setmulticastname mcast
+	return


Property changes on: trunk/tests/#37414-sendlnmulticast.ttl
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property



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