[Ttssh2-commit] [8385] /OSC52= コマンドラインオプションを追加

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 11月 21日 (木) 20:30:00 JST


Revision: 8385
          https://osdn.net/projects/ttssh2/scm/svn/commits/8385
Author:   doda
Date:     2019-11-21 20:29:59 +0900 (Thu, 21 Nov 2019)
Log Message:
-----------
/OSC52= コマンドラインオプションを追加

Ticket: #39780

問題:
  「リモートからのクリップボードアクセス」設定は接続するホストの信頼度に
  併せて値を変更したいが、コマンドラインでの変更は /F= での設定ファイル
  指定を使うしかないので手軽に変更できない。

対処:
  /OSC52= コマンドラインオプションを追加した

Ticket Links:
------------
    https://osdn.net/projects/ttssh2/tracker/detail/39780

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/en/html/commandline/teraterm.html
    trunk/doc/ja/html/about/history.html
    trunk/doc/ja/html/commandline/teraterm.html
    trunk/teraterm/ttpset/ttset.c

-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2019-11-21 11:29:55 UTC (rev 8384)
+++ trunk/doc/en/html/about/history.html	2019-11-21 11:29:59 UTC (rev 8385)
@@ -47,6 +47,7 @@
         <ul>
           <li>Added the <a href="../menu/setup-additional.html#ed3">"Accept clearing scroll buffer from remote"</a> setting on the <a href="../menu/setup-additional.html#TabControlSequence">Control Sequence tab</a> of the <a href="../menu/setup-additional.html">Additional settings dialog</a>.</li>
         </ul></li>
+	<li>Added <a href="../commandline/teraterm.html#osc52">/OSC52=</a> commandline option for change the <a href="../menu/setup-additional.html#ClipboardAccessFromRemote">"Clipboard access from remote"</a> setting.</li>
 
       <li>Serial port connection
         <ul>

Modified: trunk/doc/en/html/commandline/teraterm.html
===================================================================
--- trunk/doc/en/html/commandline/teraterm.html	2019-11-21 11:29:55 UTC (rev 8384)
+++ trunk/doc/en/html/commandline/teraterm.html	2019-11-21 11:29:59 UTC (rev 8385)
@@ -23,7 +23,7 @@
          [/TEKICON=<icon name>] [/TIMEOUT=<connecting timeout value>]
          [/V] [/VTICON=<icon name>] [/W="<window title>"] [/WAITCOM]
          [/X=<window pos (x)] [/Y=<window pos (y)] [/PIPE]
-         [/AUTOWINCLOSE=<flag>]
+         [/AUTOWINCLOSE=<flag>] [/OSC52=<operations to permit>]
          [;<comment>]
 </pre>
 
@@ -213,6 +213,17 @@
   <dt id="nolog">/NOLOG</dt>
   <dd>Start Tera Term without logging.</dd>
 
+  <dt id="osc52">/OSC52=<operations to permit></dt>
+  <dd>
+    operations to permit for clipboard access from remote host.
+    <ul>
+      <li><span class="syntax">/OCS52=off</span> deny read and write access.</li>
+      <li><span class="syntax">/OCS52=read</span> permits read access only</li>
+      <li><span class="syntax">/OCS52=write</span> permits write access only</li>
+      <li><span class="syntax">/OCS52=readwrite</span> permits read and write access</li>
+    </ul>
+  </dd>
+
   <dt id="p">/P=<TCP port#></dt>
   <dd>TCP port number</dd>
 

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2019-11-21 11:29:55 UTC (rev 8384)
+++ trunk/doc/ja/html/about/history.html	2019-11-21 11:29:59 UTC (rev 8385)
@@ -47,6 +47,7 @@
         <ul>
 	  <li><a href="../menu/setup-additional.html">Additional settings\x83_\x83C\x83A\x83\x8D\x83O</a>\x82\xCC<a href="../menu/setup-additional.html#TabControlSequence">Control Sequence\x83^\x83u</a>\x82\xC9<a href="../menu/setup-additional.html#ed3">\x81u\x83\x8A\x83\x82\x81[\x83g\x82\xA9\x82\xE7\x82̃X\x83N\x83\x8D\x81[\x83\x8B\x83o\x83b\x83t\x83@\x8F\xC1\x8B\x8E\x82\xF0\x8E󂯓\xFC\x82\xEA\x82\xE9\x81v</a>\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B\x83f\x83t\x83H\x83\x8B\x83g\x82\xCDoff\x81B</li>
         </ul></li>
+	<li><a href="../menu/setup-additional.html#ClipboardAccessFromRemote">\x81u\x83\x8A\x83\x82\x81[\x83g\x82\xA9\x82\xE7\x82̃N\x83\x8A\x83b\x83v\x83{\x81[\x83h\x83A\x83N\x83Z\x83X\x81v</a>\x90ݒ\xE8\x82\xF0\x95ύX\x82\xB7\x82\xE9\x88ׂ̃R\x83}\x83\x93\x83h\x83\x89\x83C\x83\x93\x83I\x83v\x83V\x83\x87\x83\x93\x82Ƃ\xB5\x82\xC4<a href="../commandline/teraterm.html#osc52">/OSC52=</a>\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
 
       <li>\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ڑ\xB1
         <ul>

Modified: trunk/doc/ja/html/commandline/teraterm.html
===================================================================
--- trunk/doc/ja/html/commandline/teraterm.html	2019-11-21 11:29:55 UTC (rev 8384)
+++ trunk/doc/ja/html/commandline/teraterm.html	2019-11-21 11:29:59 UTC (rev 8385)
@@ -27,7 +27,7 @@
          [/TEKICON=<icon name>] [/TIMEOUT=<connecting timeout value>]
          [/V] [/VTICON=<icon name>] [/W="<window title>"] [/WAITCOM]
          [/X=<window pos (x)] [/Y=<window pos (y)] [/PIPE]
-         [/AUTOWINCLOSE=<flag>]
+         [/AUTOWINCLOSE=<flag>] [/OSC52=<operations to permit>]
          [;<comment>]
 </pre>
 
@@ -214,6 +214,17 @@
   <dt id="nolog">/NOLOG</dt>
   <dd>\x8BN\x93\xAE\x8E\x9E\x82Ƀ\x8D\x83O\x82\xF0\x8AJ\x8En\x82\xB5\x82Ȃ\xA2</dd>
 
+  <dt id="osc52">/OSC52=<operations to permit></dt>
+  <dd>
+    \x83z\x83X\x83g\x82\xA9\x82\xE7\x82̃N\x83\x8A\x83b\x83v\x83{\x81[\x83h\x83A\x83N\x83Z\x83X\x82ŋ\x96\x89‚\xB7\x82鑀\x8D\xEC
+    <ul>
+      <li><span class="syntax">/OSC52=off</span> \x8B\x96\x89‚\xB5\x82Ȃ\xA2</li>
+      <li><span class="syntax">/OSC52=read</span> \x93ǂݍ\x9E\x82݂̂݋\x96\x89‚\xB7\x82\xE9</li>
+      <li><span class="syntax">/OSC52=write</span> \x8F\x91\x82\xAB\x8D\x9E\x82݂̂݋\x96\x89‚\xB7\x82\xE9</li>
+      <li><span class="syntax">/OSC52=readwrite</span> \x93ǂݏ\x91\x82\xAB\x82\xF0\x8B\x96\x89‚\xB7\x82\xE9</li>
+    </ul>
+  </dd>
+
   <dt id="p">/P=<TCP port#></dt>
   <dd>TCP \x83|\x81[\x83g\x94ԍ\x86</dd>
 

Modified: trunk/teraterm/ttpset/ttset.c
===================================================================
--- trunk/teraterm/ttpset/ttset.c	2019-11-21 11:29:55 UTC (rev 8384)
+++ trunk/teraterm/ttpset/ttset.c	2019-11-21 11:29:59 UTC (rev 8385)
@@ -4289,6 +4289,17 @@
 			ts->LogFN[0] = '\0';
 			ts->LogAutoStart = 0;
 		}
+		else if (_strnicmp(Temp, "/OSC52=", 7) == 0) {	/* Clipboard access */
+			ts->CtrlFlag &= ~CSF_CBMASK;
+			if (_stricmp(&Temp[7], "on") == 0 || _stricmp(&Temp[7], "readwrite") == 0)
+				ts->CtrlFlag |= CSF_CBRW;
+			else if (_stricmp(&Temp[7], "read") == 0)
+				ts->CtrlFlag |= CSF_CBREAD;
+			else if (_stricmp(&Temp[7], "write") == 0)
+				ts->CtrlFlag |= CSF_CBWRITE;
+			else if (_stricmp(&Temp[7], "off") == 0)
+				ts->CtrlFlag |= CSF_CBNONE;
+		}
 		else if (_strnicmp(Temp, "/P=", 3) == 0) {	/* TCP port num */
 			ParamPort = IdTCPIP;
 			ParamTCP = ParsePortName(&Temp[3]);


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